mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2026-11-20 23:43:26 +03:00
Improve form focus and TOTP input semantics (#1105)
- use a softer, consistent primary-blue focus treatment for standard data-entry controls - identify TOTP inputs as one-time codes and request numeric keyboards on supported devices - keep TOTP digits visible while they are entered - fix the TOTP setup input ID so its label points to the actual control thanks @TrapoSAMA
This commit is contained in:
1 parent
bdda34aa09
commit
875113f305
4 files changed
+15
-5
No files matched your search
Vendored
+7
@@ -160,3 +160,10 @@ div#login{ max-width: 35em; }
|
||||
.virtual-list-scroll > #admin_table { min-width: 720px; margin-bottom: 0; }
|
||||
.virtual-search form { margin-bottom: .25rem; }
|
||||
.virtual-search .form-control { margin-left: auto; max-width: 18rem; }
|
||||
|
||||
/* Use a consistent, soft focus treatment for data-entry controls. */
|
||||
.form-control:focus,
|
||||
.form-select:focus {
|
||||
border-color: #0d6efd;
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 .5rem rgba(13, 110, 253, .6);
|
||||
}
|
||||
@@ -7,8 +7,9 @@
|
||||
|
||||
<div class="mb-3 {if $pTOPT_code_text}is-invalid{/if}">
|
||||
<label class="col-md-4 col-sm-4" for="fTOTP_code">{$PALANG.pTOTP_code}:</label>
|
||||
<div class="col-md-6 col-sm-8"><input id="fTOTP_code" class="form-control" autocomplete="off"
|
||||
type="text" name="fTOTP_code" size="6" autofocus/></div>
|
||||
<div class="col-md-6 col-sm-8"><input id="fTOTP_code" class="form-control"
|
||||
type="text" name="fTOTP_code" size="6"
|
||||
inputmode="numeric" autocomplete="one-time-code" autofocus/></div>
|
||||
<span class="form-text">{$pTOPT_code_text}</span>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -33,7 +33,8 @@
|
||||
<label for="fTOTP_code">
|
||||
{$PALANG.pTOTP_confirm}:
|
||||
</label>
|
||||
<input class="flat" type="text" name="fTOTP_code" autocomplete="one-time-code" />
|
||||
<input id="fTOTP_code" class="flat" type="text" name="fTOTP_code"
|
||||
inputmode="numeric" autocomplete="one-time-code" />
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
+3
-2
@@ -25,8 +25,9 @@
|
||||
</div>
|
||||
<div class="mb-3 {if $pTOTP_code_text}is-invalid{/if}">
|
||||
<label class="col-md-2" for="fTOTP_code">{$PALANG.pTOTP_code}:</label>
|
||||
<div class="col-md-6 col-sm-8"><input id="TOTP_code" class="form-control" type="text" name="fTOTP_code"
|
||||
size="6"/>
|
||||
<div class="col-md-6 col-sm-8"><input id="fTOTP_code" class="form-control" type="text"
|
||||
name="fTOTP_code" size="6" inputmode="numeric"
|
||||
autocomplete="one-time-code"/>
|
||||
<span class="text-warning">{$pTOTP_code_text}</span> <!-- error text -->
|
||||
<span class="form-text">{$PALANG.pTOTP_code_text}</span>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user