mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
UX: Specify pattern and maxlength for 2FA input fields.
This commit is contained in:
parent
7d7f6faf40
commit
a9699da672
5 changed files with 16 additions and 4 deletions
|
@ -46,6 +46,8 @@
|
|||
</div>
|
||||
{{#second-factor-form}}
|
||||
{{text-field value=loginSecondFactor
|
||||
pattern='[0-9]{6}'
|
||||
maxlength='6'
|
||||
id="login-second-factor"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
|
|
|
@ -34,7 +34,13 @@
|
|||
</table>
|
||||
</div>
|
||||
{{#second-factor-form}}
|
||||
{{text-field value=loginSecondFactor id="login-second-factor" autocorrect="off" autocapitalize="off" autofocus="autofocus"}}
|
||||
{{text-field value=loginSecondFactor
|
||||
pattern='[0-9]{6}'
|
||||
maxlength='6'
|
||||
id="login-second-factor"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
autofocus="autofocus"}}
|
||||
{{/second-factor-form}}
|
||||
</form>
|
||||
{{/if}}
|
||||
|
|
|
@ -20,7 +20,9 @@
|
|||
<div class="control-group">
|
||||
<div class="controls">
|
||||
{{text-field value=second_factor_token
|
||||
id="second_factor_token"
|
||||
pattern='[0-9]{6}'
|
||||
maxlength='6'
|
||||
id="second-factor-token"
|
||||
classNames="input-large"
|
||||
autofocus="autofocus"}}
|
||||
</div>
|
||||
|
@ -69,6 +71,8 @@
|
|||
|
||||
<div class="controls">
|
||||
{{text-field value=second_factor_token
|
||||
pattern='[0-9]{6}'
|
||||
maxlength='6'
|
||||
id="second-factor-token"
|
||||
classNames="input-large"
|
||||
autofocus="autofocus"}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue