mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-25 03:58:39 +02:00
wip
This commit is contained in:
parent
8d8c31f37a
commit
5c3459b7c7
2 changed files with 16 additions and 7 deletions
|
@ -1189,6 +1189,20 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||
tableAnnouncementRegion.innerHTML = '';
|
||||
}
|
||||
|
||||
function resetSearch() {
|
||||
domainsSearchInput.value = '';
|
||||
loadDomains(1, 'id', 'asc', hasLoaded, '');
|
||||
|
||||
resetheaders();
|
||||
}
|
||||
|
||||
resetButton = document.querySelector('.domains__reset-button');
|
||||
if (resetButton) {
|
||||
resetButton.addEventListener('click', function() {
|
||||
resetSearch();
|
||||
});
|
||||
}
|
||||
|
||||
// Load the first page initially
|
||||
loadDomains(1);
|
||||
}
|
||||
|
@ -1248,19 +1262,14 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||
throw new Error(`HTTP error! status: ${response.status}`);
|
||||
}
|
||||
loadDomainRequests(pageToDisplay, currentSortBy, currentOrder, hasLoaded, currentSearchTerm);
|
||||
//return response.json();
|
||||
})
|
||||
// .then(data => {
|
||||
// console.log('response', data);
|
||||
// // Perform any additional actions, e.g., updating the UI
|
||||
// })
|
||||
.catch(error => console.error('Error fetching domain requests:', error));
|
||||
}
|
||||
|
||||
// Helper function to get the CSRF token from the cookie
|
||||
function getCsrfToken() {
|
||||
return document.querySelector('input[name="csrfmiddlewaretoken"]').value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
</div>
|
||||
<div class="domains__no-search-results display-none">
|
||||
<p>Nothing, nada, zilch.</p>
|
||||
<p>Reset your search or try a different search term.</p>
|
||||
<p><button class='usa-button usa-button--unstyled domains__reset-button' type='button'>Reset your search</button> or try a different search term.</p>
|
||||
</div>
|
||||
</section>
|
||||
<nav aria-label="Pagination" class="usa-pagination flex-justify" id="domains-pagination">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue