diff --git a/templates/identity/account/create-client-credentials.html.ejs b/templates/identity/account/create-client-credentials.html.ejs
index 0db39c698..fcf162118 100644
--- a/templates/identity/account/create-client-credentials.html.ejs
+++ b/templates/identity/account/create-client-credentials.html.ejs
@@ -15,7 +15,7 @@
-
+
diff --git a/templates/identity/account/create-pod.html.ejs b/templates/identity/account/create-pod.html.ejs
index 93f3463dc..107853698 100644
--- a/templates/identity/account/create-pod.html.ejs
+++ b/templates/identity/account/create-pod.html.ejs
@@ -34,7 +34,7 @@
-
+
diff --git a/templates/identity/account/link-webid.html.ejs b/templates/identity/account/link-webid.html.ejs
index e34c29cec..14d0edac1 100644
--- a/templates/identity/account/link-webid.html.ejs
+++ b/templates/identity/account/link-webid.html.ejs
@@ -13,7 +13,7 @@
-
+
diff --git a/templates/identity/account/pod-settings.html.ejs b/templates/identity/account/pod-settings.html.ejs
index 24b31b0a6..26af2c965 100644
--- a/templates/identity/account/pod-settings.html.ejs
+++ b/templates/identity/account/pod-settings.html.ejs
@@ -23,7 +23,7 @@
-
+
diff --git a/templates/identity/login.html.ejs b/templates/identity/login.html.ejs
index dd0ea7508..5d6f2b92b 100644
--- a/templates/identity/login.html.ejs
+++ b/templates/identity/login.html.ejs
@@ -8,7 +8,7 @@
-
+
diff --git a/templates/identity/oidc/consent.html.ejs b/templates/identity/oidc/consent.html.ejs
index e3b0e7161..90782d9e7 100644
--- a/templates/identity/oidc/consent.html.ejs
+++ b/templates/identity/oidc/consent.html.ejs
@@ -21,7 +21,7 @@
-
+
diff --git a/templates/identity/password/create.html.ejs b/templates/identity/password/create.html.ejs
index 50e84407e..50c2d21ca 100644
--- a/templates/identity/password/create.html.ejs
+++ b/templates/identity/password/create.html.ejs
@@ -21,7 +21,7 @@
-
+
diff --git a/templates/identity/password/forgot.html.ejs b/templates/identity/password/forgot.html.ejs
index b53d4d9b1..4e1e3e103 100644
--- a/templates/identity/password/forgot.html.ejs
+++ b/templates/identity/password/forgot.html.ejs
@@ -13,7 +13,7 @@
-
+
diff --git a/templates/identity/password/login.html.ejs b/templates/identity/password/login.html.ejs
index 000f4214c..6799c2e9b 100644
--- a/templates/identity/password/login.html.ejs
+++ b/templates/identity/password/login.html.ejs
@@ -20,7 +20,7 @@
-
+
@@ -51,7 +51,7 @@
controls = await fetchControls('<%= idpIndex %>');
location.href = controls.html.account.account;
}
- })
+ });
updateElement('register-link', controls.html.password.register, { href: true });
updateElement('forgot-link', controls.html.password.forgot, { href: true });
diff --git a/templates/identity/password/register.html.ejs b/templates/identity/password/register.html.ejs
index 9fdf202dc..4c03124fc 100644
--- a/templates/identity/password/register.html.ejs
+++ b/templates/identity/password/register.html.ejs
@@ -21,7 +21,7 @@
-
+
diff --git a/templates/identity/password/reset.html.ejs b/templates/identity/password/reset.html.ejs
index eb1f504de..632580394 100644
--- a/templates/identity/password/reset.html.ejs
+++ b/templates/identity/password/reset.html.ejs
@@ -16,7 +16,7 @@
-
+
diff --git a/templates/identity/password/update.html.ejs b/templates/identity/password/update.html.ejs
index f80ea6ad2..e8a60259c 100644
--- a/templates/identity/password/update.html.ejs
+++ b/templates/identity/password/update.html.ejs
@@ -20,7 +20,7 @@
-
+
diff --git a/templates/scripts/util.js b/templates/scripts/util.js
index efd935674..bd0571ac6 100644
--- a/templates/scripts/util.js
+++ b/templates/scripts/util.js
@@ -54,6 +54,10 @@ async function postJsonForm(target = '', expectRedirect = false, transform = jso
function addPostListener(callback, formId = 'mainForm', errorId = 'error') {
const form = document.getElementById(formId);
+ // By default, we disable all submit buttons to prevent them from being clicked before content is loaded
+ const submit = form.querySelector('button[type="submit"]');
+ submit.disabled = false;
+
form.addEventListener('submit', async(event) => {
event.preventDefault();
diff --git a/templates/styles/main.css b/templates/styles/main.css
index 951d68f4d..6d0754257 100644
--- a/templates/styles/main.css
+++ b/templates/styles/main.css
@@ -228,6 +228,9 @@ button:hover {
button[type=submit] {
font-weight: 600;
}
+button:disabled {
+ background-color: var(--solid-gray);
+}
button.alternate {
display: block;