Skip to content

Commit b9b1bba

Browse files
committed
ui: added styling for error messages
1 parent 4ed316f commit b9b1bba

File tree

4 files changed

+32
-3
lines changed

4 files changed

+32
-3
lines changed

invenio_app_rdm/config.py

+1
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,7 @@ def github_link_render(record):
935935
"metadata.version",
936936
"metadata.publisher",
937937
],
938+
"funding-section": ["metadata.funding"],
938939
"alternate-identifiers-section": ["metadata.identifiers"],
939940
"related-works-section": ["metadata.related_identifiers"],
940941
"visibility-section": ["access.embargo.until"],

invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/form.overrides

+17-3
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,25 @@
155155

156156
.generate-ck-editor-heights(30);
157157

158-
.ui.form .error-label {
158+
.ui.form .accordion-label {
159159
padding: 0.5rem 0.7rem !important;
160-
background-color: @errorTextColor;
161-
color: white;
162160
margin-left: 1rem;
161+
&.error {
162+
background-color: @errorTextColor;
163+
color: white;
164+
}
165+
&.info {
166+
background-color: @infoBackgroundColor;
167+
color: @infoTextColor;
168+
}
169+
&.warning {
170+
background-color: @warningBackgroundColor;
171+
color: @warningTextColor;
172+
}
173+
&.failure {
174+
background-color: @errorBackgroundColor;
175+
color: @errorTextColor;
176+
}
163177
}
164178

165179
.ui.form .success.message,

invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/message.variables

+2
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
***********************************************/
44

55
@infoTextColor: #0e576c;
6+
@infoBackgroundColor: #f8ffff;
7+
@infoBorderColor: #a9d5de;

invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/label.overrides

+12
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@
2828
&.transparent {
2929
background-color: transparent;
3030
}
31+
32+
&.info {
33+
border: 1px solid @infoBorderColor;
34+
background-color: @infoBackgroundColor;
35+
color: @infoTextColor;
36+
}
37+
38+
&.warning {
39+
border: 1px solid @warningColor;
40+
background-color: @warningBackgroundColor;
41+
color: @warningColor;
42+
}
3143
}
3244

3345
.subject {

0 commit comments

Comments
 (0)