Skip to content

Commit

Permalink
IBX-2159: Page Builder: add notification/feedback to user about inval…
Browse files Browse the repository at this point in the history
…id fields/layout
  • Loading branch information
tischsoic committed Jan 31, 2022
1 parent 8601f6a commit bb04740
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/bundle/Resources/public/js/scripts/admin.content.edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@
};
const focusOnFirstError = () => {
const invalidFields = doc.querySelectorAll('.ibexa-field-edit.is-invalid');

if (!invalidFields.length) {
return;
}

const invalidSection = invalidFields[0].closest('.ibexa-anchor-navigation-sections__section');

fields.forEach((field) => field.removeAttribute('tabindex'));
Expand Down
6 changes: 6 additions & 0 deletions src/bundle/Resources/public/scss/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,12 @@
fill: $ibexa-color-info;
}

&.ibexa-btn--error {
background-color: $ibexa-color-danger-100;
border-color: $ibexa-color-danger;
fill: $ibexa-color-danger;
}

&:not(.ibexa-btn--selected) {
&:hover,
&:focus {
Expand Down

0 comments on commit bb04740

Please sign in to comment.