From f037653908cab0b9f7eda21515466b3733b85599 Mon Sep 17 00:00:00 2001 From: Simon Leary Date: Thu, 29 Jan 2026 11:18:55 -0500 Subject: [PATCH 1/4] use title to show why button is disabled --- webroot/panel/account.php | 84 +++++++++++++++++++--------------- webroot/panel/groups.php | 12 ++++- webroot/panel/modal/new_pi.php | 19 ++++---- webroot/panel/pi.php | 18 ++++++-- 4 files changed, 82 insertions(+), 51 deletions(-) diff --git a/webroot/panel/account.php b/webroot/panel/account.php index 8b2ea960a..d61a58dda 100644 --- a/webroot/panel/account.php +++ b/webroot/panel/account.php @@ -209,11 +209,13 @@ "; echo $CSRFTokenHiddenFormInput; if ($SQL->accDeletionRequestExists($USER->uid)) { - echo ""; echo " - + "; } else { if ($SQL->requestExists($USER->uid, UnitySQL::REQUEST_BECOME_PI)) { @@ -296,38 +298,46 @@ "; if ($hasGroups) { - echo "

You cannot request to delete your account while you are in a PI group.

"; + $request_account_deletion_disabled = "disabled"; + $request_account_deletion_title = "You cannot request to delete your account while you are in a PI group."; } else { - if ($SQL->accDeletionRequestExists($USER->uid)) { - echo " -

Your request has been submitted and is currently pending.

-
- $CSRFTokenHiddenFormInput - - -
- "; - } else { - echo " -
- $CSRFTokenHiddenFormInput - - -
- "; - } + $request_account_deletion_disabled = ""; + $request_account_deletion_title = ""; +} +if ($SQL->accDeletionRequestExists($USER->uid)) { + echo " +

Your request has been submitted and is currently pending.

+
+ $CSRFTokenHiddenFormInput + + +
+ "; +} else { + echo " +
+ $CSRFTokenHiddenFormInput + + +
+ "; } ?> @@ -348,9 +358,9 @@ function enableOrDisableSubmitLoginShell() { if ($("#loginSelector").val() == ldapLoginShell) { - $("#submitLoginShell").prop("disabled", true); + $("#submitLoginShell").prop("disabled", true).prop("title", "Login shell is unchanged"); } else { - $("#submitLoginShell").prop("disabled", false); + $("#submitLoginShell").prop("disabled", false).prop("title", ""); } } $("#loginSelector").change(enableOrDisableSubmitLoginShell); diff --git a/webroot/panel/groups.php b/webroot/panel/groups.php index 369928314..3b26247f0 100644 --- a/webroot/panel/groups.php +++ b/webroot/panel/groups.php @@ -218,8 +218,16 @@ accDeletionRequestExists($USER->uid)) { - echo ""; - echo ""; + echo " + + "; } else { echo ""; } diff --git a/webroot/panel/modal/new_pi.php b/webroot/panel/modal/new_pi.php index 27f52b444..855c92cff 100644 --- a/webroot/panel/modal/new_pi.php +++ b/webroot/panel/modal/new_pi.php @@ -45,7 +45,12 @@ Terms of Service . - +