@eeacms/volto-clms-theme 1.1.146 → 1.1.147
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -16
- package/package.json +1 -1
- package/src/components/CLMSDownloadCartView/CLMSCartContent.jsx +6 -0
- package/src/components/CLMSDownloadCartView/CLMSDownloadCartView.jsx +11 -10
- package/src/components/CLMSDownloadCartView/Fields/ProjectionNaming.jsx +18 -15
- package/src/customizations/volto/components/theme/Unauthorized/Unauthorized.jsx +105 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,11 +4,16 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
-
### [1.1.
|
|
7
|
+
### [1.1.147](https://github.com/eea/volto-clms-theme/compare/1.1.146...1.1.147) - 10 May 2024
|
|
8
8
|
|
|
9
9
|
#### :hammer_and_wrench: Others
|
|
10
10
|
|
|
11
|
-
- cart
|
|
11
|
+
- fix cart funtionalities [Ion Lizarazu - [`d845e41`](https://github.com/eea/volto-clms-theme/commit/d845e4136ed578e60f9c50f52d7ec2cdecb6afdf)]
|
|
12
|
+
- remove unneeded state [Ion Lizarazu - [`cd4fbfa`](https://github.com/eea/volto-clms-theme/commit/cd4fbfaddbe2c81130738b06513ceb788f875a18)]
|
|
13
|
+
- remove the nuts request optimization try [Ion Lizarazu - [`c0a17c6`](https://github.com/eea/volto-clms-theme/commit/c0a17c652b6496ed2b6209d945874f68995732ea)]
|
|
14
|
+
- include CclLoginModal component in the Unauthorized file [Ion Lizarazu - [`e348186`](https://github.com/eea/volto-clms-theme/commit/e348186bb8fc854d1c1c5431c4f576e1150dc404)]
|
|
15
|
+
### [1.1.146](https://github.com/eea/volto-clms-theme/compare/1.1.145...1.1.146) - 7 May 2024
|
|
16
|
+
|
|
12
17
|
### [1.1.145](https://github.com/eea/volto-clms-theme/compare/1.1.144...1.1.145) - 7 May 2024
|
|
13
18
|
|
|
14
19
|
#### :house: Internal changes
|
|
@@ -429,7 +434,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
429
434
|
|
|
430
435
|
- to render nothing, return null [Mikel Larreategi - [`2fb3580`](https://github.com/eea/volto-clms-theme/commit/2fb35802b23e3aba5fd166aeefd103c929ffb5d1)]
|
|
431
436
|
- simplify condtioin [Mikel Larreategi - [`f9b43da`](https://github.com/eea/volto-clms-theme/commit/f9b43da91d360e0028402f9a7ba762f16b0d9b22)]
|
|
432
|
-
- test: [JENKINS] Use java17 for sonarqube scanner [valentinab25 - [`7c6e9ca`](https://github.com/eea/volto-clms-theme/commit/7c6e9cac9da0c06d0f24711303404f5055fba7d1)]
|
|
433
437
|
### [1.1.80](https://github.com/eea/volto-clms-theme/compare/1.1.79...1.1.80) - 17 November 2023
|
|
434
438
|
|
|
435
439
|
#### :bug: Bug Fixes
|
|
@@ -440,7 +444,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
440
444
|
|
|
441
445
|
#### :hammer_and_wrench: Others
|
|
442
446
|
|
|
443
|
-
- test: [JENKINS] Run cypress in started frontend container [valentinab25 - [`37c3299`](https://github.com/eea/volto-clms-theme/commit/37c3299dd19c95057e70d48152bfef2365f2416c)]
|
|
444
447
|
- CLMS-2509 (Bug): Lint [Urkorue - [`1bbc011`](https://github.com/eea/volto-clms-theme/commit/1bbc011481c0ee1feb68d0cf57c4a5a9f4c224ca)]
|
|
445
448
|
- CLMS-2509 (Bug): Timeseries icon centered [Urkorue - [`fc38685`](https://github.com/eea/volto-clms-theme/commit/fc3868598ab592f01bb3ee23f985ada5c11227d4)]
|
|
446
449
|
### [1.1.78](https://github.com/eea/volto-clms-theme/compare/1.1.77...1.1.78) - 16 November 2023
|
|
@@ -493,17 +496,14 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
493
496
|
|
|
494
497
|
#### :hammer_and_wrench: Others
|
|
495
498
|
|
|
496
|
-
- test: [JENKINS] Add cpu limit on cypress docker [valentinab25 - [`c55db1c`](https://github.com/eea/volto-clms-theme/commit/c55db1c20cfef1eb34c587343a4822fa4bde3c54)]
|
|
497
499
|
### [1.1.73](https://github.com/eea/volto-clms-theme/compare/1.1.72...1.1.73) - 6 November 2023
|
|
498
500
|
|
|
499
501
|
#### :hammer_and_wrench: Others
|
|
500
502
|
|
|
501
|
-
- test: [JENKINS] Increase shm-size to cypress docker [valentinab25 - [`3a543b9`](https://github.com/eea/volto-clms-theme/commit/3a543b9000c1168d54edfb8003eb08dfa7c85031)]
|
|
502
503
|
- comment Integration tests [Ion Lizarazu - [`74713f8`](https://github.com/eea/volto-clms-theme/commit/74713f8f78d77ba193d8c27462cc8787d698ab81)]
|
|
503
504
|
- uncomment cypress tests [Ion Lizarazu - [`3526a5c`](https://github.com/eea/volto-clms-theme/commit/3526a5c46481667b0518c6cce0927e67726c6f6c)]
|
|
504
505
|
- use chrome instead of chromium to run cypress tests [Ion Lizarazu - [`6ae3a06`](https://github.com/eea/volto-clms-theme/commit/6ae3a06dbec1914c06a55c0dcb826c49b75f9739)]
|
|
505
506
|
- ccltabs activeTab condition having first child [Ion Lizarazu - [`3cf9376`](https://github.com/eea/volto-clms-theme/commit/3cf9376d55f5f41b7e42c25e5925cd871ec71d81)]
|
|
506
|
-
- test: [JENKINS] Improve cypress time [valentinab25 - [`f41ecfe`](https://github.com/eea/volto-clms-theme/commit/f41ecfea8b5a1e409303ffcc7befe7f51316d652)]
|
|
507
507
|
### [1.1.72](https://github.com/eea/volto-clms-theme/compare/1.1.71...1.1.72) - 2 November 2023
|
|
508
508
|
|
|
509
509
|
### [1.1.71](https://github.com/eea/volto-clms-theme/compare/1.1.70...1.1.71) - 31 October 2023
|
|
@@ -514,7 +514,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
514
514
|
|
|
515
515
|
#### :house: Internal changes
|
|
516
516
|
|
|
517
|
-
- chore: [JENKINS] Refactor automated testing [valentinab25 - [`67ca3bb`](https://github.com/eea/volto-clms-theme/commit/67ca3bb111f34842569c12b9c87a2a91bd14b09e)]
|
|
518
517
|
|
|
519
518
|
#### :hammer_and_wrench: Others
|
|
520
519
|
|
|
@@ -611,7 +610,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
611
610
|
|
|
612
611
|
- readme [Mikel Larreategi - [`3c0ab05`](https://github.com/eea/volto-clms-theme/commit/3c0ab051981a4efad7712bc46182eed9d79fd10f)]
|
|
613
612
|
- remove from addons [Mikel Larreategi - [`89c2e7d`](https://github.com/eea/volto-clms-theme/commit/89c2e7d793193e6bb64642f0b06a01cd3c81108a)]
|
|
614
|
-
- yarn.lock added after running yarn [Unai - [`ad307be`](https://github.com/eea/volto-clms-theme/commit/ad307be72bbfe753f7571ea4d784a09978e0f7f2)]
|
|
615
613
|
- prettier issue fix [Unai - [`8bc0650`](https://github.com/eea/volto-clms-theme/commit/8bc0650918f9fa1065d19d2c15ce153a5fc5abbb)]
|
|
616
614
|
- set a limit of 5 items in the download queue [Mikel Larreategi - [`b81cc83`](https://github.com/eea/volto-clms-theme/commit/b81cc8383165bafbbff52fbeeb365d413051802e)]
|
|
617
615
|
- adjust logo size [Mikel Larreategi - [`b90a72c`](https://github.com/eea/volto-clms-theme/commit/b90a72c07102025a7e90607b25d34611ddd4f4f6)]
|
|
@@ -753,7 +751,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
753
751
|
|
|
754
752
|
- fix cart items concat function [Ion Lizarazu - [`4b72249`](https://github.com/eea/volto-clms-theme/commit/4b72249ef17a0cda22661809fce5be7c2d1f6649)]
|
|
755
753
|
- revert Jenkinsfile [Ion Lizarazu - [`64f6cd0`](https://github.com/eea/volto-clms-theme/commit/64f6cd08100357843b507c00d3286d7debe0ef04)]
|
|
756
|
-
- yarn.lock file [Ion Lizarazu - [`8444ad1`](https://github.com/eea/volto-clms-theme/commit/8444ad1606b3939e4609bdd186e5ace2252588a8)]
|
|
757
754
|
- packages.json versions order [Ion Lizarazu - [`4fd7a86`](https://github.com/eea/volto-clms-theme/commit/4fd7a86ab43238841b421e1ed10ebd52ab420a15)]
|
|
758
755
|
- downloadablefilestablewidget param modification [Ion Lizarazu - [`5dd794a`](https://github.com/eea/volto-clms-theme/commit/5dd794a33a8eddd042a753b7ab47e7d2a323b011)]
|
|
759
756
|
- add technical_documents_accordion_text field to the dataset view [Ion Lizarazu - [`96ed1e5`](https://github.com/eea/volto-clms-theme/commit/96ed1e5e2c2b501bd303bc76b333a70ad1614c16)]
|
|
@@ -878,7 +875,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
878
875
|
|
|
879
876
|
- remove NUTS text for area naming in the cart [ionlizarazu - [`062e0a3`](https://github.com/eea/volto-clms-theme/commit/062e0a375f5352bc13c18ff7ec33fad4bcc59f2f)]
|
|
880
877
|
- dependencies [ionlizarazu - [`405ef96`](https://github.com/eea/volto-clms-theme/commit/405ef96090fe7bd4af73a49d3285a92fad712e3b)]
|
|
881
|
-
- yarn.lock [ionlizarazu - [`7132119`](https://github.com/eea/volto-clms-theme/commit/71321195c4dd4fceed67f2f0872f3e24bba61c17)]
|
|
882
878
|
- volto-blocks-grid module mapping [ionlizarazu - [`4fec3ca`](https://github.com/eea/volto-clms-theme/commit/4fec3cabc437322ad92ed90d682250bd123ccaaf)]
|
|
883
879
|
- volto-blocks-grid v7.0.2 [ionlizarazu - [`2557e60`](https://github.com/eea/volto-clms-theme/commit/2557e6039d3cea33ca0bd11a0a3ef4764c611f78)]
|
|
884
880
|
- remove styling from teaser block [ionlizarazu - [`879e684`](https://github.com/eea/volto-clms-theme/commit/879e684057c88f52f60f0fa54cbaa155c7d14688)]
|
|
@@ -966,7 +962,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
966
962
|
|
|
967
963
|
#### :house: Internal changes
|
|
968
964
|
|
|
969
|
-
- chore: [JENKINS] Remove alpha testing version [valentinab25 - [`b4cbf65`](https://github.com/eea/volto-clms-theme/commit/b4cbf6557fbc67f7fc4cea5aa2cb19804f3d7e3c)]
|
|
970
965
|
|
|
971
966
|
#### :hammer_and_wrench: Others
|
|
972
967
|
|
|
@@ -2165,7 +2160,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
2165
2160
|
#### :hammer_and_wrench: Others
|
|
2166
2161
|
|
|
2167
2162
|
- related products and datasets added to news and meeting views and login-plone route created [Unai - [`5704a1a`](https://github.com/eea/volto-clms-theme/commit/5704a1a766148746162b60efaf232ea90dc20cf4)]
|
|
2168
|
-
- Revert "[JENKINS] Use eeacms/plone-backend and Volto alpha version- Refs #151967" [Mikel Larreategi - [`46eb694`](https://github.com/eea/volto-clms-theme/commit/46eb69415280a3c982405299135027ae4221426a)]
|
|
2169
2163
|
- sort items according to the lowercased label and put those with special meaning at the end [Mikel Larreategi - [`6410abe`](https://github.com/eea/volto-clms-theme/commit/6410abe096f60dcad54dced2026c9df9b7946d68)]
|
|
2170
2164
|
- lint fix [Unai - [`1264a7a`](https://github.com/eea/volto-clms-theme/commit/1264a7adfe8d679fea1bd821ad087add20f4271d)]
|
|
2171
2165
|
- footer newsletter subscription change, global search maxLength change from 8000 to 200 and /login design change [Unai - [`a09d24a`](https://github.com/eea/volto-clms-theme/commit/a09d24adbb6fa053fb2a2cc0071506b906593b42)]
|
|
@@ -2316,7 +2310,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
2316
2310
|
- search block new features [ionlizarazu - [`8e814cb`](https://github.com/eea/volto-clms-theme/commit/8e814cbd359782540c21fe37b37ef146d331f0d6)]
|
|
2317
2311
|
- language selector cookie management [ionlizarazu - [`1385ac9`](https://github.com/eea/volto-clms-theme/commit/1385ac95795702206d3623ba6e780faa43a89e0a)]
|
|
2318
2312
|
- toolbar cookie management [ionlizarazu - [`5c23200`](https://github.com/eea/volto-clms-theme/commit/5c23200790b20e1d4f1bc966463c37bf4c808f47)]
|
|
2319
|
-
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`0316a0d`](https://github.com/eea/volto-clms-theme/commit/0316a0d8b6fb0fa14af13002415f3c95d9f8ede3)]
|
|
2320
2313
|
### [1.0.84](https://github.com/eea/volto-clms-theme/compare/1.0.83...1.0.84) - 18 March 2022
|
|
2321
2314
|
|
|
2322
2315
|
#### :hammer_and_wrench: Others
|
|
@@ -3221,13 +3214,11 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
3221
3214
|
#### :hammer_and_wrench: Others
|
|
3222
3215
|
|
|
3223
3216
|
- replace @collective/volto-dropdownmenu with volto-dropdownmenu [ionlizarazu - [`07f004f`](https://github.com/eea/volto-clms-theme/commit/07f004fe0219e403fb51bc045c83d34f3b981f76)]
|
|
3224
|
-
- yarn.lock [ionlizarazu - [`fe1ca04`](https://github.com/eea/volto-clms-theme/commit/fe1ca04889d29fe7b653db4c69af2751b84b8a1a)]
|
|
3225
3217
|
- add NODE_ENV parameter [ionlizarazu - [`101f27c`](https://github.com/eea/volto-clms-theme/commit/101f27c25b8fbd192e1b11865e95cf5ffee08c1b)]
|
|
3226
3218
|
- upgrade volto-dropdownmenu version [ionlizarazu - [`2081855`](https://github.com/eea/volto-clms-theme/commit/2081855301f4c708776e0dbab39db143cee00dbc)]
|
|
3227
3219
|
- HomeSearch block missing url behaviour [ionlizarazu - [`d20a378`](https://github.com/eea/volto-clms-theme/commit/d20a378ce3f254b8343692348f314bf281974542)]
|
|
3228
3220
|
- babel configuration [ionlizarazu - [`203ea2d`](https://github.com/eea/volto-clms-theme/commit/203ea2de07f99ca3403e4ca220ca74d7ce69b61d)]
|
|
3229
3221
|
- prettier [ionlizarazu - [`e79e26b`](https://github.com/eea/volto-clms-theme/commit/e79e26bf2fa40ba7b4eb53a24dabd87928221c28)]
|
|
3230
|
-
- add yarn lock [ionlizarazu - [`e1ab28b`](https://github.com/eea/volto-clms-theme/commit/e1ab28b060d5a74431c368b0de82a68dabce1eab)]
|
|
3231
3222
|
- Jenkinsfile cypress test [ionlizarazu - [`b385d65`](https://github.com/eea/volto-clms-theme/commit/b385d65986f717c60f8c434a08fc11b829d08eb4)]
|
|
3232
3223
|
- cypress [ionlizarazu - [`a243cf0`](https://github.com/eea/volto-clms-theme/commit/a243cf0182fa3dd113c16ff495c71e310252d83b)]
|
|
3233
3224
|
- some fixes [ionlizarazu - [`046279b`](https://github.com/eea/volto-clms-theme/commit/046279b9d05bea8a64eca03eed493e02621534c9)]
|
package/package.json
CHANGED
|
@@ -500,6 +500,12 @@ const CLMSCartContent = (props) => {
|
|
|
500
500
|
<button
|
|
501
501
|
onClick={() => {
|
|
502
502
|
removeCartItem(item?.unique_id);
|
|
503
|
+
setCartItems(
|
|
504
|
+
cartItems.filter(
|
|
505
|
+
(i) => item?.unique_id !== i.unique_id,
|
|
506
|
+
),
|
|
507
|
+
);
|
|
508
|
+
|
|
503
509
|
if (
|
|
504
510
|
pagination.length === 1 &&
|
|
505
511
|
currentPage > 1
|
|
@@ -32,7 +32,7 @@ const CLMSDownloadCartView = (props) => {
|
|
|
32
32
|
const cart = useSelector((state) => state.cart_items.items);
|
|
33
33
|
const content = useSelector((state) => state.content.data);
|
|
34
34
|
const datasetTimeseries = useSelector((state) => state.datasetTimeseries);
|
|
35
|
-
const nutsnames = useSelector((state) => state.nutsnames);
|
|
35
|
+
// const nutsnames = useSelector((state) => state.nutsnames);
|
|
36
36
|
|
|
37
37
|
const { isLoggedIn } = useCartState();
|
|
38
38
|
const { formatMessage } = useIntl();
|
|
@@ -85,15 +85,16 @@ const CLMSDownloadCartView = (props) => {
|
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
87
|
if (localsessionNutsIDList.length > 0) {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
88
|
+
dispatch(getNutsNames(localsessionNutsIDList));
|
|
89
|
+
// if (nutsnames.nutsnames) {
|
|
90
|
+
// const missingnn = localsessionNutsIDList.filter(
|
|
91
|
+
// (nid) => !nutsnames.nutsnames[nid],
|
|
92
|
+
// );
|
|
93
|
+
// if (missingnn.length > 0)
|
|
94
|
+
// dispatch(getNutsNames(localsessionNutsIDList));
|
|
95
|
+
// } else {
|
|
96
|
+
// dispatch(getNutsNames(localsessionNutsIDList));
|
|
97
|
+
// }
|
|
97
98
|
}
|
|
98
99
|
|
|
99
100
|
return () => {};
|
|
@@ -19,6 +19,23 @@ export const ProjectionNaming = ({ item, cartItems, setCartItems }) => {
|
|
|
19
19
|
|
|
20
20
|
let [choices, setChoices] = useState([]);
|
|
21
21
|
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
choices.length > 0 &&
|
|
24
|
+
setProjectionValue(
|
|
25
|
+
item?.unique_id,
|
|
26
|
+
item?.projection
|
|
27
|
+
? item.projection
|
|
28
|
+
: choices.find((ch) => ch.default)
|
|
29
|
+
? choices.find((ch) => ch.default).key
|
|
30
|
+
: choices[0].key,
|
|
31
|
+
cartItems,
|
|
32
|
+
);
|
|
33
|
+
setTimeout(() => {
|
|
34
|
+
setLoading(false);
|
|
35
|
+
}, 200);
|
|
36
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
37
|
+
}, [choices]);
|
|
38
|
+
|
|
22
39
|
useEffect(() => {
|
|
23
40
|
if (
|
|
24
41
|
projections_uid?.[item.dataset_uid] &&
|
|
@@ -50,24 +67,10 @@ export const ProjectionNaming = ({ item, cartItems, setCartItems }) => {
|
|
|
50
67
|
};
|
|
51
68
|
}),
|
|
52
69
|
);
|
|
53
|
-
setTimeout(() => {
|
|
54
|
-
choices.length > 0 &&
|
|
55
|
-
setProjectionValue(
|
|
56
|
-
item?.unique_id,
|
|
57
|
-
item?.projection
|
|
58
|
-
? item.projection
|
|
59
|
-
: choices.find((ch) => ch.default)
|
|
60
|
-
? choices.find((ch) => ch.default).key
|
|
61
|
-
: choices[0].key,
|
|
62
|
-
cartItems,
|
|
63
|
-
);
|
|
64
|
-
setTimeout(() => {
|
|
65
|
-
setLoading(false);
|
|
66
|
-
}, 200);
|
|
67
|
-
}, 200);
|
|
68
70
|
} else {
|
|
69
71
|
setLoading(true);
|
|
70
72
|
}
|
|
73
|
+
return () => {};
|
|
71
74
|
|
|
72
75
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
73
76
|
}, [JSON.stringify(projections_uid?.[item.dataset_uid]), item.unique_id]);
|
|
@@ -1,14 +1,116 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module components/theme/Unauthorized/Unauthorized
|
|
3
3
|
*/
|
|
4
|
-
import React from 'react';
|
|
4
|
+
import React, { useEffect } from 'react';
|
|
5
5
|
import { FormattedMessage } from 'react-intl';
|
|
6
|
-
import { useSelector } from 'react-redux';
|
|
6
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
7
7
|
import { Link } from 'react-router-dom';
|
|
8
8
|
import { Container } from 'semantic-ui-react';
|
|
9
9
|
|
|
10
10
|
import { withServerErrorCode } from '@plone/volto/helpers/Utils/Utils';
|
|
11
|
-
import CclLoginModal from '@eeacms/volto-clms-theme/components/CclLoginModal/CclLoginModal';
|
|
11
|
+
// import CclLoginModal from '@eeacms/volto-clms-theme/components/CclLoginModal/CclLoginModal';
|
|
12
|
+
|
|
13
|
+
import { UniversalLink } from '@plone/volto/components';
|
|
14
|
+
import config from '@plone/volto/registry';
|
|
15
|
+
import { getRegistry } from '@eeacms/volto-clms-theme/actions';
|
|
16
|
+
import CclModal from '@eeacms/volto-clms-theme/components/CclModal/CclModal';
|
|
17
|
+
import { toBase64 } from '../../../../../components/CclUtils';
|
|
18
|
+
|
|
19
|
+
const CclLoginModal = (props) => {
|
|
20
|
+
let {
|
|
21
|
+
classname = 'header-login-link',
|
|
22
|
+
triggerComponent = () => (
|
|
23
|
+
<span className={classname}>
|
|
24
|
+
<FormattedMessage id="loginRegister" defaultMessage="Register/Login" />
|
|
25
|
+
</span>
|
|
26
|
+
),
|
|
27
|
+
otherPath = undefined,
|
|
28
|
+
} = props;
|
|
29
|
+
const dispatch = useDispatch();
|
|
30
|
+
const registryRecords = useSelector((state) => state?.registry?.records);
|
|
31
|
+
const [loginUrl, setLoginUrl] = React.useState('');
|
|
32
|
+
const registry_key = config.settings?.registry?.login_url || null;
|
|
33
|
+
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
if (registryRecords && registry_key in registryRecords) {
|
|
36
|
+
if (otherPath) {
|
|
37
|
+
setLoginUrl(
|
|
38
|
+
`${registryRecords[registry_key]}?came_from=${toBase64(otherPath)}`,
|
|
39
|
+
);
|
|
40
|
+
} else {
|
|
41
|
+
setLoginUrl(
|
|
42
|
+
`${registryRecords[registry_key]}?came_from=${toBase64(
|
|
43
|
+
window.location.href,
|
|
44
|
+
)}`,
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}, [otherPath, registryRecords, registry_key]);
|
|
49
|
+
|
|
50
|
+
function modalStatus(status) {
|
|
51
|
+
if (status === true) {
|
|
52
|
+
dispatch(getRegistry(registry_key));
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<CclModal
|
|
58
|
+
trigger={triggerComponent()}
|
|
59
|
+
size="tiny"
|
|
60
|
+
modalStatus={modalStatus}
|
|
61
|
+
>
|
|
62
|
+
<div className="content">
|
|
63
|
+
<div className="modal-login-title">
|
|
64
|
+
This website uses EU Login for user authentication.
|
|
65
|
+
</div>
|
|
66
|
+
<div className="modal-login-text">
|
|
67
|
+
<p>
|
|
68
|
+
{' '}
|
|
69
|
+
EU Login, the European Commission Authentication Service, enables
|
|
70
|
+
you to access various web applications centrally using the same
|
|
71
|
+
e-mail and password. You can read more{' '}
|
|
72
|
+
<UniversalLink
|
|
73
|
+
openLinkInNewTab
|
|
74
|
+
href="https://ecas.ec.europa.eu/cas/about.html"
|
|
75
|
+
>
|
|
76
|
+
here
|
|
77
|
+
</UniversalLink>
|
|
78
|
+
.
|
|
79
|
+
</p>
|
|
80
|
+
<p>
|
|
81
|
+
{' '}
|
|
82
|
+
If you have EU Login account, please click 'Login using EU Login'.
|
|
83
|
+
</p>
|
|
84
|
+
<p>
|
|
85
|
+
If you don't have EU Login account, please follow this{' '}
|
|
86
|
+
<UniversalLink
|
|
87
|
+
openLinkInNewTab
|
|
88
|
+
href="https://ecas.ec.europa.eu/cas/eim/external/register.cgi"
|
|
89
|
+
>
|
|
90
|
+
link
|
|
91
|
+
</UniversalLink>{' '}
|
|
92
|
+
to create it.
|
|
93
|
+
</p>
|
|
94
|
+
<p>
|
|
95
|
+
If you have other questions, please contact our
|
|
96
|
+
<UniversalLink openLinkInNewTab href="/en/contact-service-helpdesk">
|
|
97
|
+
{' '}
|
|
98
|
+
Service desk
|
|
99
|
+
</UniversalLink>
|
|
100
|
+
.
|
|
101
|
+
</p>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
<div className="actions">
|
|
105
|
+
<div className="modal-buttons">
|
|
106
|
+
<a href={loginUrl || '#'} className="ccl-button ccl-button-green">
|
|
107
|
+
Login using EU Login
|
|
108
|
+
</a>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
</CclModal>
|
|
112
|
+
);
|
|
113
|
+
};
|
|
12
114
|
|
|
13
115
|
/**
|
|
14
116
|
* unauthorized function.
|