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 (#282)
  • Loading branch information
tischsoic authored Feb 1, 2022
1 parent 07bfb06 commit 74355d5
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 @@ -210,6 +210,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 74355d5

Please sign in to comment.