*}id="{@$field->getPrefixedId()}" {*
*}name="{@$field->getPrefixedId()}" {*
*}value="{if !$field->isI18n() || !$field->hasI18nValues() || $availableLanguages|count === 1}{$field->getValue()}{/if}" {*
- *}class="multifactorTotpCode" {*
+ *}{if !$field->getFieldClasses()|empty}class="{implode from=$field->getFieldClasses() item='class' glue=' '}{$class}{/implode}" {/if}{*
*}autocomplete="off" {*
*}{if $field->getMaximumLength() !== null}size="{$field->getMaximumLength()}" {/if}{*
*}pattern="[0-9]*" {*
*}id="{@$field->getPrefixedId()}" {*
*}name="{@$field->getPrefixedId()}" {*
*}value="{if !$field->isI18n() || !$field->hasI18nValues() || $availableLanguages|count === 1}{$field->getValue()}{/if}" {*
- *}class="multifactorTotpCode" {*
+ *}{if !$field->getFieldClasses()|empty}class="{implode from=$field->getFieldClasses() item='class' glue=' '}{$class}{/implode}" {/if}{*
*}autocomplete="off" {*
*}{if $field->getMaximumLength() !== null}size="{$field->getMaximumLength()}" {/if}{*
*}pattern="[0-9]*" {*
public function __construct() {
$this->minimumLength(Totp::CODE_LENGTH);
$this->maximumLength(Totp::CODE_LENGTH);
+ $this->addFieldClass('multifactorTotpCode');
$placeholder = '';
$gen = Helper::digitStream();