Add input mode support for `multifactor\backup\CodeFormField `
authorMatthias Schmidt <gravatronics@live.com>
Mon, 21 Dec 2020 18:19:06 +0000 (19:19 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Mon, 21 Dec 2020 18:19:06 +0000 (19:19 +0100)
com.woltlab.wcf/templates/__multifactorBackupCodeField.tpl
wcfsetup/install/files/acp/templates/__multifactorBackupCodeField.tpl
wcfsetup/install/files/lib/system/user/multifactor/backup/CodeFormField.class.php

index ab41b26c6a96bff3b7335f9cc48a9bc3078559ea..5623d65ed21bc79d5ebfca8088bd9ee4d2c273b4 100644 (file)
@@ -3,8 +3,8 @@
        *}name="{@$field->getPrefixedId()}" {*
        *}value="{if !$field->isI18n() || !$field->hasI18nValues() || $availableLanguages|count === 1}{$field->getValue()}{/if}" {*
        *}{if !$field->getFieldClasses()|empty}class="{implode from=$field->getFieldClasses() item='class' glue=' '}{$class}{/implode}" {/if}{*
-       *}pattern="[0-9\s]*" {*
-       *}inputmode="numeric"{*
+       *}pattern="[0-9\s]*"{*
+       *}{if $field->getInputMode() !== null} inputmode="{$field->getInputMode()}"{/if}{*
        *}{if $field->getChunks() && $field->getChunkLength()} size="{$field->getChunks() - 1 + $field->getChunks() * $field->getChunkLength()}"{/if}{*
        *}{if $field->getAutoComplete() !== null} autocomplete="{$field->getAutoComplete()}"{/if}{*
        *}{if $field->isAutofocused()} autofocus{/if}{*
index ab41b26c6a96bff3b7335f9cc48a9bc3078559ea..5623d65ed21bc79d5ebfca8088bd9ee4d2c273b4 100644 (file)
@@ -3,8 +3,8 @@
        *}name="{@$field->getPrefixedId()}" {*
        *}value="{if !$field->isI18n() || !$field->hasI18nValues() || $availableLanguages|count === 1}{$field->getValue()}{/if}" {*
        *}{if !$field->getFieldClasses()|empty}class="{implode from=$field->getFieldClasses() item='class' glue=' '}{$class}{/implode}" {/if}{*
-       *}pattern="[0-9\s]*" {*
-       *}inputmode="numeric"{*
+       *}pattern="[0-9\s]*"{*
+       *}{if $field->getInputMode() !== null} inputmode="{$field->getInputMode()}"{/if}{*
        *}{if $field->getChunks() && $field->getChunkLength()} size="{$field->getChunks() - 1 + $field->getChunks() * $field->getChunkLength()}"{/if}{*
        *}{if $field->getAutoComplete() !== null} autocomplete="{$field->getAutoComplete()}"{/if}{*
        *}{if $field->isAutofocused()} autofocus{/if}{*
index b025ee9ba4906918d5c2f79e3e69889573801057..ed88fa3be54d02df28e0ca965f4e7c1bfdf473a8 100644 (file)
@@ -38,6 +38,7 @@ class CodeFormField extends TextFormField {
                $this->minimumLength($this->getChunks() * $this->getChunkLength());
                $this->addFieldClass('multifactorBackupCode');
                $this->autoComplete('off');
+               $this->inputMode('numeric');
                
                $placeholder = '';
                $gen = Helper::digitStream();