From cbc21f4ffbec15c30074832fe492e2e459bd7090 Mon Sep 17 00:00:00 2001 From: Eduardo Martinez Echevarria Date: Mon, 2 Dec 2024 19:22:22 +0100 Subject: [PATCH] Change text of submit button --- app/packs/src/decidim/decidim_awesome/admin/users_autoblocks.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/packs/src/decidim/decidim_awesome/admin/users_autoblocks.js b/app/packs/src/decidim/decidim_awesome/admin/users_autoblocks.js index e709d844..154cc863 100644 --- a/app/packs/src/decidim/decidim_awesome/admin/users_autoblocks.js +++ b/app/packs/src/decidim/decidim_awesome/admin/users_autoblocks.js @@ -9,6 +9,8 @@ document.addEventListener("DOMContentLoaded", () => { const messages = JSON.parse(submitButton.dataset.performBlockMessage); const justificationMessage = form.querySelector("[data-justification-message]"); + submitButton.textContent = messages[event.target.checked]; + if (event.target.checked) { submitButton.setAttribute("data-confirm", submitButton.dataset.confirmMessage); justificationMessage.classList.remove("hidden");