mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-22 18:56:15 +02:00
fix broken javascript
This commit is contained in:
parent
ceeb537a07
commit
0545dbcc6d
1 changed files with 4 additions and 17 deletions
|
@ -14,8 +14,8 @@ export const domain_purpose_choice_callbacks = {
|
||||||
//show the purpose details container
|
//show the purpose details container
|
||||||
showElement(element);
|
showElement(element);
|
||||||
// change just the text inside the em tag
|
// change just the text inside the em tag
|
||||||
const labelElement = element.querySelector('.usa-label em');
|
const labelElement = element.querySelector('p em');
|
||||||
labelElement.innerHTML = 'Explain why a new domain is need instead ofusing a' +
|
labelElement.innerHTML = 'Explain why a new domain is need instead of using a' +
|
||||||
'subdomain of an existing website.' +
|
'subdomain of an existing website.' +
|
||||||
'<br><br>' + // Adding double line break for spacing
|
'<br><br>' + // Adding double line break for spacing
|
||||||
'Include any information or data that shows how the new domain would ' +
|
'Include any information or data that shows how the new domain would ' +
|
||||||
|
@ -37,7 +37,7 @@ export const domain_purpose_choice_callbacks = {
|
||||||
// show the purpose details container
|
// show the purpose details container
|
||||||
showElement(element);
|
showElement(element);
|
||||||
// change just the text inside the em tag
|
// change just the text inside the em tag
|
||||||
const labelElement = element.querySelector('.usa-label em');
|
const labelElement = element.querySelector('p em');
|
||||||
labelElement.innerHTML = 'Explain why a redirect is necessary. ' +
|
labelElement.innerHTML = 'Explain why a redirect is necessary. ' +
|
||||||
'<span class="usa-label--required">*</span>';
|
'<span class="usa-label--required">*</span>';
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ export const domain_purpose_choice_callbacks = {
|
||||||
// Show the purpose details container
|
// Show the purpose details container
|
||||||
showElement(element);
|
showElement(element);
|
||||||
// change just the text inside the em tag
|
// change just the text inside the em tag
|
||||||
const labelElement = element.querySelector('.usa-label em');
|
const labelElement = element.querySelector('p em');
|
||||||
labelElement.innerHTML = 'Describe how this domain will be used. ' +
|
labelElement.innerHTML = 'Describe how this domain will be used. ' +
|
||||||
'<span class="usa-label--required">*</span>';
|
'<span class="usa-label--required">*</span>';
|
||||||
|
|
||||||
|
@ -67,19 +67,6 @@ export const domain_purpose_choice_callbacks = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Function to check if errors are currently displayed
|
|
||||||
function checkForErrors(element) {
|
|
||||||
const errorMessage = element.querySelector('#id_purpose-purpose__error-message');
|
|
||||||
const formGroup = element.querySelector('.usa-form-group.usa-form-group--error');
|
|
||||||
|
|
||||||
// If either errors exist, set the flag to true
|
|
||||||
if (errorMessage || formGroup) {
|
|
||||||
errorsHaveBeenDisplayed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return errorsHaveBeenDisplayed;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Helper function to clear error messages in a textarea
|
// Helper function to clear error messages in a textarea
|
||||||
function clearErrors(element) {
|
function clearErrors(element) {
|
||||||
// Find the error message div
|
// Find the error message div
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue