diff --git a/doc/smarty3-templates.md b/doc/smarty3-templates.md index f174f2164..1fadcb221 100644 --- a/doc/smarty3-templates.md +++ b/doc/smarty3-templates.md @@ -80,7 +80,7 @@ Field parameter: ### field_input.tpl -A single line input field for textual input. +A single line input field for any type of input. Field parameter: 0. Name of the field, @@ -89,7 +89,7 @@ Field parameter: 3. Help text for the input box, 4. if set to "required" modern browser will check that this input box is filled when submitting the form, 5. if set to "autofocus" modern browser will put the cursur into this box once the page is loaded, -6. if set to "email" or "url" modern browser will check that the filled in value corresponds to an email address or URL. +6. if set, it will be used for the input type, default is `text` (possible types: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#%3Cinput%3E_types). ### field_intcheckbox.tpl diff --git a/src/Module/TwoFactor/Verify.php b/src/Module/TwoFactor/Verify.php index f6f040f5a..27001683e 100644 --- a/src/Module/TwoFactor/Verify.php +++ b/src/Module/TwoFactor/Verify.php @@ -64,7 +64,7 @@ class Verify extends BaseModule '$errors_label' => L10n::tt('Error', 'Errors', count(self::$errors)), '$errors' => self::$errors, '$recovery_message' => L10n::t('Don’t have your phone? Enter a two-factor recovery code', '2fa/recovery'), - '$verify_code' => ['verify_code', L10n::t('Please enter a code from your authentication app'), '', '', 'required', 'autofocus placeholder="000000"'], + '$verify_code' => ['verify_code', L10n::t('Please enter a code from your authentication app'), '', '', 'required', 'autofocus placeholder="000000"', 'number'], '$verify_label' => L10n::t('Verify code and complete login'), ]); } diff --git a/view/templates/field_input.tpl b/view/templates/field_input.tpl index 399cf0c43..956c6259c 100644 --- a/view/templates/field_input.tpl +++ b/view/templates/field_input.tpl @@ -1,8 +1,8 @@ -