-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into ag/3255-domain-reports-take-three
- Loading branch information
Showing
22 changed files
with
235 additions
and
110 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { submitForm } from './helpers.js'; | ||
|
||
export function initDomainDNSSEC() { | ||
document.addEventListener('DOMContentLoaded', function() { | ||
let domain_dnssec_page = document.getElementById("domain-dnssec"); | ||
if (domain_dnssec_page) { | ||
const button = document.getElementById("disable-dnssec-button"); | ||
if (button) { | ||
button.addEventListener("click", function () { | ||
submitForm("disable-dnssec-form"); | ||
}); | ||
} | ||
} | ||
}); | ||
} |
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,27 @@ | ||
import { submitForm } from './helpers.js'; | ||
|
||
export function initDomainDSData() { | ||
document.addEventListener('DOMContentLoaded', function() { | ||
let domain_dsdata_page = document.getElementById("domain-dsdata"); | ||
if (domain_dsdata_page) { | ||
const override_button = document.getElementById("disable-override-click-button"); | ||
const cancel_button = document.getElementById("btn-cancel-click-button"); | ||
const cancel_close_button = document.getElementById("btn-cancel-click-close-button"); | ||
if (override_button) { | ||
override_button.addEventListener("click", function () { | ||
submitForm("disable-override-click-form"); | ||
}); | ||
} | ||
if (cancel_button) { | ||
cancel_button.addEventListener("click", function () { | ||
submitForm("btn-cancel-click-form"); | ||
}); | ||
} | ||
if (cancel_close_button) { | ||
cancel_close_button.addEventListener("click", function () { | ||
submitForm("btn-cancel-click-form"); | ||
}); | ||
} | ||
} | ||
}); | ||
} |
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,20 @@ | ||
import { submitForm } from './helpers.js'; | ||
|
||
export function initDomainManagersPage() { | ||
document.addEventListener('DOMContentLoaded', function() { | ||
let domain_managers_page = document.getElementById("domain-managers"); | ||
if (domain_managers_page) { | ||
// Add event listeners for all buttons matching user-delete-button-{NUMBER} | ||
const deleteButtons = document.querySelectorAll('[id^="user-delete-button-"]'); // Select buttons with ID starting with "user-delete-button-" | ||
deleteButtons.forEach((button) => { | ||
const buttonId = button.id; // e.g., "user-delete-button-1" | ||
const number = buttonId.split('-').pop(); // Extract the NUMBER part | ||
const formId = `user-delete-form-${number}`; // Generate the corresponding form ID | ||
|
||
button.addEventListener("click", function () { | ||
submitForm(formId); // Pass the form ID to submitForm | ||
}); | ||
}); | ||
} | ||
}); | ||
} |
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,12 @@ | ||
import { submitForm } from './helpers.js'; | ||
|
||
export function initDomainRequestForm() { | ||
document.addEventListener('DOMContentLoaded', function() { | ||
const button = document.getElementById("domain-request-form-submit-button"); | ||
if (button) { | ||
button.addEventListener("click", function () { | ||
submitForm("submit-domain-request-form"); | ||
}); | ||
} | ||
}); | ||
} |
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,19 @@ | ||
export function initFormErrorHandling() { | ||
document.addEventListener('DOMContentLoaded', function() { | ||
const errorSummary = document.getElementById('form-errors'); | ||
const firstErrorField = document.querySelector('.usa-input--error'); | ||
if (firstErrorField) { | ||
// Scroll to the first field in error | ||
firstErrorField.scrollIntoView({ behavior: 'smooth', block: 'center' }); | ||
|
||
// Add focus to the first field in error | ||
setTimeout(() => { | ||
firstErrorField.focus(); | ||
}, 50); | ||
} else if (errorSummary) { | ||
// Scroll to the error summary | ||
errorSummary.scrollIntoView({ behavior: 'smooth', block: 'center' }); | ||
} | ||
|
||
}); | ||
} |
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
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
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.