diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-05-16 18:26:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-16 18:26:49 +0200 |
commit | b91196f4b73fff91997b8077619ae25b6d04a59e (patch) | |
tree | 9d52a2fbed1170b5180540878ff4fa9292ad3ff1 /app/javascript/core | |
parent | 3a084113067656ef9318b9fb5bcfea4fd2de6ffe (diff) |
Add confirmation page when importing blocked domains (#1773)
* Move glitch-soc-specific strings to glitch-soc-specific locale files * Add confirmation page when importing blocked domains
Diffstat (limited to 'app/javascript/core')
-rw-r--r-- | app/javascript/core/admin.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/javascript/core/admin.js b/app/javascript/core/admin.js index ef0a8f267..c1b9f07a4 100644 --- a/app/javascript/core/admin.js +++ b/app/javascript/core/admin.js @@ -102,6 +102,12 @@ ready(() => { const registrationMode = document.getElementById('form_admin_settings_registrations_mode'); if (registrationMode) onChangeRegistrationMode(registrationMode); + const checkAllElement = document.querySelector('#batch_checkbox_all'); + if (checkAllElement) { + checkAllElement.checked = [].every.call(document.querySelectorAll(batchCheckboxClassName), (content) => content.checked); + checkAllElement.indeterminate = !checkAllElement.checked && [].some.call(document.querySelectorAll(batchCheckboxClassName), (content) => content.checked); + } + document.querySelector('a#add-instance-button')?.addEventListener('click', (e) => { const domain = document.getElementById('by_domain')?.value; |