@eeacms/volto-clms-theme 1.0.193 → 1.0.194
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
CHANGED
|
@@ -4,11 +4,13 @@ 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.0.
|
|
7
|
+
### [1.0.194](https://github.com/eea/volto-clms-theme/compare/1.0.193...1.0.194) - 30 March 2023
|
|
8
8
|
|
|
9
|
-
#### :
|
|
9
|
+
#### :rocket: New Features
|
|
10
10
|
|
|
11
|
-
-
|
|
11
|
+
- feat: CLMS-1880 hide the button when the subscription/unsubscription process finishes and show a different message [Mikel Larreategi - [`6c93f0b`](https://github.com/eea/volto-clms-theme/commit/6c93f0b7d6661345d88a21f8633b4af65401b1f9)]
|
|
12
|
+
|
|
13
|
+
### [1.0.193](https://github.com/eea/volto-clms-theme/compare/1.0.192...1.0.193) - 30 March 2023
|
|
12
14
|
|
|
13
15
|
### [1.0.192](https://github.com/eea/volto-clms-theme/compare/1.0.191...1.0.192) - 27 March 2023
|
|
14
16
|
|
package/package.json
CHANGED
|
@@ -20,6 +20,11 @@ const messages = defineMessages({
|
|
|
20
20
|
defaultMessage:
|
|
21
21
|
'Click on the button below to confirm your {subscribe_or_unsubscribe}',
|
|
22
22
|
},
|
|
23
|
+
process_finished: {
|
|
24
|
+
id: 'Your {subscribe_or_unsubscribe} request was processed correctly',
|
|
25
|
+
defaultMessage:
|
|
26
|
+
'Your {subscribe_or_unsubscribe} request was processed correctly',
|
|
27
|
+
},
|
|
23
28
|
errorMessage: {
|
|
24
29
|
id: 'An error has occured. Please try again',
|
|
25
30
|
defaultMessage: 'An error has occured. Please try again',
|
|
@@ -44,6 +49,7 @@ class ConfirmSubscriptionView extends Component {
|
|
|
44
49
|
this.handlePost = this.handlePost.bind(this);
|
|
45
50
|
this.state = {
|
|
46
51
|
type_conf: null,
|
|
52
|
+
action_completed: false,
|
|
47
53
|
};
|
|
48
54
|
}
|
|
49
55
|
|
|
@@ -52,6 +58,7 @@ class ConfirmSubscriptionView extends Component {
|
|
|
52
58
|
this.setState({ type_conf });
|
|
53
59
|
}
|
|
54
60
|
requestSuccessToast = () => {
|
|
61
|
+
this.setState({ action_completed: true });
|
|
55
62
|
toast.success(
|
|
56
63
|
<Toast
|
|
57
64
|
success
|
|
@@ -115,20 +122,36 @@ class ConfirmSubscriptionView extends Component {
|
|
|
115
122
|
: 'subscription',
|
|
116
123
|
})}
|
|
117
124
|
</h1>
|
|
118
|
-
|
|
119
|
-
<div className="event-detail
|
|
120
|
-
<
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
{this.state.action_completed ? (
|
|
126
|
+
<div className="event-detail">
|
|
127
|
+
<div className="event-detail-content">
|
|
128
|
+
<p>
|
|
129
|
+
{this.props.intl.formatMessage(messages.process_finished, {
|
|
130
|
+
subscribe_or_unsubscribe: this.props.isUnsubscribe
|
|
131
|
+
? 'unsubscription'
|
|
132
|
+
: 'subscription',
|
|
133
|
+
})}
|
|
134
|
+
</p>
|
|
135
|
+
</div>
|
|
127
136
|
</div>
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
137
|
+
) : (
|
|
138
|
+
<>
|
|
139
|
+
<div className="event-detail">
|
|
140
|
+
<div className="event-detail-content">
|
|
141
|
+
<p>
|
|
142
|
+
{this.props.intl.formatMessage(messages.description, {
|
|
143
|
+
subscribe_or_unsubscribe: this.props.isUnsubscribe
|
|
144
|
+
? 'unsubscription'
|
|
145
|
+
: 'subscription',
|
|
146
|
+
})}
|
|
147
|
+
</p>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
<CclButton onClick={this.handlePost}>
|
|
151
|
+
<ButtonText loading={this.props.loading} />
|
|
152
|
+
</CclButton>
|
|
153
|
+
</>
|
|
154
|
+
)}
|
|
132
155
|
</div>
|
|
133
156
|
) : (
|
|
134
157
|
<NotFound />
|