Commit 4b9eead8 authored by Boris Kocherov's avatar Boris Kocherov Committed by Vincent Bechu

erp5_web_renderjs_ui: use 'error' class for validation errors

i need it because use span for displaying icons in json form
parent 7010cf14
...@@ -141,6 +141,7 @@ ...@@ -141,6 +141,7 @@
if (this.state.error_text) { if (this.state.error_text) {
if (span === null) { if (span === null) {
span = document.createElement('span'); span = document.createElement('span');
span.setAttribute('class', 'error');
span.textContent = this.state.error_text; span.textContent = this.state.error_text;
this.props.container_element.appendChild(span); this.props.container_element.appendChild(span);
} else { } else {
......
...@@ -1190,11 +1190,11 @@ div[data-gadget-scope='header'] .ui-header ul { ...@@ -1190,11 +1190,11 @@ div[data-gadget-scope='header'] .ui-header ul {
.gadget-content form .ui-field-contain { .gadget-content form .ui-field-contain {
position: relative; position: relative;
} }
.gadget-content form .ui-field-contain > span { .gadget-content form .ui-field-contain > span.error {
animation: fadein 0.2s ease-out; animation: fadein 0.2s ease-out;
} }
@media not screen and (max-width: 85em), only screen and (min-width: 45em) and (max-width: 85em) { @media not screen and (max-width: 85em), only screen and (min-width: 45em) and (max-width: 85em) {
.gadget-content form .ui-field-contain > span { .gadget-content form .ui-field-contain > span.error {
background-color: #FF6600; background-color: #FF6600;
color: #f8fff3; color: #f8fff3;
left: 25%; left: 25%;
...@@ -1206,7 +1206,7 @@ div[data-gadget-scope='header'] .ui-header ul { ...@@ -1206,7 +1206,7 @@ div[data-gadget-scope='header'] .ui-header ul {
width: auto; width: auto;
z-index: 1001; z-index: 1001;
} }
.gadget-content form .ui-field-contain > span:before { .gadget-content form .ui-field-contain > span.error:before {
position: absolute; position: absolute;
top: 100%; top: 100%;
left: 2em; left: 2em;
...@@ -1218,7 +1218,7 @@ div[data-gadget-scope='header'] .ui-header ul { ...@@ -1218,7 +1218,7 @@ div[data-gadget-scope='header'] .ui-header ul {
} }
} }
@media not screen and (min-width: 45em) { @media not screen and (min-width: 45em) {
.gadget-content form .ui-field-contain > span { .gadget-content form .ui-field-contain > span.error {
margin-left: 6pt; margin-left: 6pt;
color: #FF6600; color: #FF6600;
} }
......
...@@ -1403,7 +1403,7 @@ div[data-gadget-scope='header'] .ui-header { ...@@ -1403,7 +1403,7 @@ div[data-gadget-scope='header'] .ui-header {
// relative for displaying popups with errors // relative for displaying popups with errors
position: relative; position: relative;
& > span { & > span.error {
animation: fadein @transition-timing; animation: fadein @transition-timing;
@media @desktop, @tablet { @media @desktop, @tablet {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment