*}step="{@$field->getStep()}" {*
*}id="{@$field->getPrefixedId()}" {*
*}name="{@$field->getPrefixedId()}" {*
- *}value="{$field->getValue()}" {*
- *}class="short"{*
+ *}value="{$field->getValue()}"{*
+ *}{if !$field->getFieldClasses()|empty} class="{implode from=$field->getFieldClasses() item='class' glue=' '}{$class}{/implode}"{/if}{*
*}{if $field->isAutofocused()} autofocus{/if}{*
*}{if $field->isRequired()} required{/if}{*
*}{if $field->isImmutable()} disabled{/if}{*
*}step="{@$field->getStep()}" {*
*}id="{@$field->getPrefixedId()}" {*
*}name="{@$field->getPrefixedId()}" {*
- *}value="{$field->getValue()}" {*
- *}class="short"{*
+ *}value="{$field->getValue()}"{*
+ *}{if !$field->getFieldClasses()|empty} class="{implode from=$field->getFieldClasses() item='class' glue=' '}{$class}{/implode}"{/if}{*
*}{if $field->isAutofocused()} autofocus{/if}{*
*}{if $field->isRequired()} required{/if}{*
*}{if $field->isImmutable()} disabled{/if}{*
* @package WoltLabSuite\Core\System\Form\Builder\Field
* @since 5.2
*/
-abstract class AbstractNumericFormField extends AbstractFormField implements IAutoFocusFormField, IImmutableFormField, IMaximumFormField, IMinimumFormField, INullableFormField, IPlaceholderFormField, ISuffixedFormField {
+abstract class AbstractNumericFormField extends AbstractFormField implements IAutoFocusFormField, ICssClassFormField, IImmutableFormField, IMaximumFormField, IMinimumFormField, INullableFormField, IPlaceholderFormField, ISuffixedFormField {
use TAutoFocusFormField;
+ use TCssClassFormField;
use TImmutableFormField;
use TMaximumFormField;
use TMinimumFormField;
*/
protected $templateName = '__numericFormField';
+ /**
+ * Creates a new instance of `AbstractNumericFormField`.
+ */
+ public function __construct() {
+ $this->addFieldClass('short');
+ }
+
/**
* Returns the default value for the input element's step attribute.
*