From d8b74761c6cefdd83360d3f2add0e9ccdc6064c7 Mon Sep 17 00:00:00 2001 From: Jonas Kohl Date: Sat, 14 Sep 2024 17:59:13 +0200 Subject: Even more changes (devel commit messages are useless) --- src/application/views/view_user.php | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'src/application/views/view_user.php') diff --git a/src/application/views/view_user.php b/src/application/views/view_user.php index 23d2b71..79b57d2 100644 --- a/src/application/views/view_user.php +++ b/src/application/views/view_user.php @@ -26,13 +26,13 @@ $dateJoined = DateTime::createFromImmutable($user->created); $dateJoined->setTime(0, 0, 0, 0); ?> -
+ @@ -97,18 +97,22 @@ if (($_formError = RequestUtils::getAndClearFormError()) !== null) { profilePicture); -$_checkbox_disabled_class = $_checkbox_disabled ? " disabled" : ""; +$_checkbox_disabled_class = $_checkbox_disabled ? " disabled text-muted" : ""; ?>
@@ -141,12 +145,19 @@ $(function() { }); $(function() { - $("#i_pfp").hide().prop("disabled", true).prop("required", false); + function _hide() { + $("#i_pfp").hide().prop("disabled", true).prop("required", false); + $("#i_pfp + .file-input-group").hide().find("button").prop("disabled", true); + } + _hide(); + setTimeout(_hide, 10); $("[name='pfp_action']").on("change input check click", function() { - if ($("#pfp_action_3").is(":checked")) + if ($("#pfp_action_3").is(":checked")) { $("#i_pfp").show().prop("disabled", false).prop("required", true); - else - $("#i_pfp").hide().prop("disabled", true).prop("required", false); + $("#i_pfp + .file-input-group").show().find("button").prop("disabled", false); + } else { + _hide(); + } }) }); -- cgit v1.2.3