From 1614ac3f3d2097c728b648eb6db1f6e016cc7965 Mon Sep 17 00:00:00 2001 From: Qi HU Date: Mon, 13 Oct 2025 12:15:15 +0800 Subject: [PATCH] refactor(ui): improve captcha form responsiveness - adjust layout spacing on public auth-related templates - ensure captcha challenge areas remain visible on small screens - align image driver output with refreshed markup Signed-off-by: Qi HU --- .../Captcha/Drivers/ImageCaptchaDriver.php | 2 +- public/complains.php | 8 ++++++-- public/confirm_resend.php | 15 ++++++++------- public/login.php | 7 ++++--- public/recover.php | 3 ++- public/signup.php | 13 +++++++------ 6 files changed, 28 insertions(+), 20 deletions(-) diff --git a/app/Services/Captcha/Drivers/ImageCaptchaDriver.php b/app/Services/Captcha/Drivers/ImageCaptchaDriver.php index 69952c99..05adf6bb 100644 --- a/app/Services/Captcha/Drivers/ImageCaptchaDriver.php +++ b/app/Services/Captcha/Drivers/ImageCaptchaDriver.php @@ -31,7 +31,7 @@ class ImageCaptchaDriver implements CaptchaDriverInterface return implode("\n", [ sprintf('%sCAPTCHA', htmlspecialchars($imageLabel, ENT_QUOTES, 'UTF-8'), $imageUrl), - sprintf('%s', htmlspecialchars($codeLabel, ENT_QUOTES, 'UTF-8'), htmlspecialchars($imagehash, ENT_QUOTES, 'UTF-8')), + sprintf('%s', htmlspecialchars($codeLabel, ENT_QUOTES, 'UTF-8'), htmlspecialchars($imagehash, ENT_QUOTES, 'UTF-8')), ]); } diff --git a/public/complains.php b/public/complains.php index 91b80f5b..52a913b4 100644 --- a/public/complains.php +++ b/public/complains.php @@ -164,9 +164,13 @@ if($_SERVER['REQUEST_METHOD'] === 'POST'){

+ - - + +
autocomplete="email" />
diff --git a/public/confirm_resend.php b/public/confirm_resend.php index 0022b1d9..86673660 100644 --- a/public/confirm_resend.php +++ b/public/confirm_resend.php @@ -110,13 +110,14 @@ else

-
- - - - - + + +

-
+ + + + diff --git a/public/login.php b/public/login.php index ed7d14d2..9aac3024 100644 --- a/public/login.php +++ b/public/login.php @@ -59,9 +59,10 @@ if (!$useChallengeResponseAuthentication) {


[]

/>
/>
+
/>
- - - + + + +
style="width: 180px; border: 1px solid gray"/>
/>
autocomplete="current-password" />
/>
- + + diff --git a/public/signup.php b/public/signup.php index a0fffbdc..756697c4 100644 --- a/public/signup.php +++ b/public/signup.php @@ -78,24 +78,25 @@ print("
".$lang_signup['text_select_lang']. $s . "
"); +$formInputStyle = 'style="width: min(100%, 320px); min-width: 180px; border: 1px solid gray; box-sizing: border-box"'; if ($isPreRegisterEmailAndUsername && !empty($inv["pre_register_username"])) { - $usernameInput = sprintf('', $inv["pre_register_username"]); + $usernameInput = sprintf('', $formInputStyle, htmlspecialchars($inv["pre_register_username"], ENT_QUOTES)); } else { - $usernameInput = ''; + $usernameInput = ''; } if ($isPreRegisterEmailAndUsername && !empty($inv["pre_register_email"])) { - $emailInput = sprintf('', $inv["pre_register_email"]); + $emailInput = sprintf('', $formInputStyle, htmlspecialchars($inv["pre_register_email"], ENT_QUOTES)); } else { - $emailInput = ''; + $emailInput = ''; } ?> - - +
name="email" autocomplete="email" />
".$lang_signup['text_cookies_note']."


+
class="wantpassword" autocomplete="new-password" />
class="passagain" autocomplete="new-password" />