-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(nimbus): Show invalid fields errors
Because - There is no warning message displayed on the summary page for pages with invalid fields - The user has no way of knowing which fields are invalid and why This commit - Adds a warning message on the summary page if there are pages with invalid fields - Includes links to the pages with invalid fields in the warning message - Highlights the invalid fields and displays the reasons for the errors on the form when the link in the warning message is clicked Fixes #12009
- Loading branch information
Showing
10 changed files
with
414 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
experimenter/experimenter/nimbus_ui_new/static/js/show_errors.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
document.addEventListener("DOMContentLoaded", function () { | ||
const urlParams = new URLSearchParams(window.location.search); | ||
if (urlParams.get("show_errors")) { | ||
const formIds = ["audience-form", "metrics-form"]; | ||
|
||
formIds.forEach(function (formId) { | ||
const form = document.getElementById(formId); | ||
if (form) { | ||
form.requestSubmit(); | ||
} | ||
}); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.