mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-06 01:35:22 +02:00
UX bug fixes
This commit is contained in:
parent
9e7f878549
commit
0a17f396cb
1 changed files with 19 additions and 1 deletions
|
@ -530,7 +530,7 @@ function hideDeletedForms() {
|
|||
let isDotgovDomain = document.querySelector(".dotgov-domain-form");
|
||||
// The Nameservers formset features 2 required and 11 optionals
|
||||
if (isNameserversForm) {
|
||||
cloneIndex = 2;
|
||||
// cloneIndex = 2;
|
||||
formLabel = "Name server";
|
||||
// DNSSEC: DS Data
|
||||
} else if (isDsDataForm) {
|
||||
|
@ -766,3 +766,21 @@ function toggleTwoDomElements(ele1, ele2, index) {
|
|||
}
|
||||
})();
|
||||
|
||||
/**
|
||||
* An IIFE that listens to the other contacts radio form on DAs and toggles the contacts/no other contacts forms
|
||||
*
|
||||
*/
|
||||
(function otherContactsFormListener() {
|
||||
let isNameserversForm = document.querySelector(".nameservers-form");
|
||||
if (isNameserversForm) {
|
||||
let forms = document.querySelectorAll(".repeatable-form");
|
||||
if (forms.length < 3) {
|
||||
// Hide the delete buttons on the 2 nameservers
|
||||
forms.forEach((form, index) => {
|
||||
Array.from(form.querySelectorAll('.delete-record')).forEach((deleteButton) => {
|
||||
deleteButton.setAttribute("disabled", "true");
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue