From: nupplaPhil Date: Thu, 5 Dec 2019 20:42:33 +0000 (+0100) Subject: General usage of type in input fields X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c28f1fec519de3728fc8b9497cc6dac3f22f33c1;p=friendica.git General usage of type in input fields --- diff --git a/doc/smarty3-templates.md b/doc/smarty3-templates.md index abb1ed563d..6e98d08653 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", "url" or "int" modern browser will check that the filled in value corresponds to an email address, URL or numeric. +6. if set, it will be used for the input type, default is `text` (possible types: https://www.w3schools.com/html/html_form_input_types.asp). ### field_intcheckbox.tpl diff --git a/src/Module/TwoFactor/Verify.php b/src/Module/TwoFactor/Verify.php index 958585925e..27001683e9 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"', 'int'], + '$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 4815302ae9..956c6259c1 100644 --- a/view/templates/field_input.tpl +++ b/view/templates/field_input.tpl @@ -1,7 +1,7 @@
- + {{if $field.3}} {{$field.3 nofilter}} {{/if}}