Split long lines in form field templates into multiple lines
authorMatthias Schmidt <gravatronics@live.com>
Sun, 25 Mar 2018 14:38:44 +0000 (16:38 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 25 Mar 2018 14:38:44 +0000 (16:38 +0200)
See #2509

wcfsetup/install/files/acp/templates/__textFormField.tpl
wcfsetup/install/files/acp/templates/__userFormField.tpl
wcfsetup/install/files/acp/templates/__usernameFormField.tpl

index 600f0bcf0028589dde7c5985d6d4079a0e6d9c20..06691313106ca21e8f82e9b1459825c8c813818a 100644 (file)
@@ -1,6 +1,17 @@
 {include file='__formFieldHeader'}
 
-<input type="text" id="{@$field->getPrefixedId()}" name="{@$field->getPrefixedId()}" value="{$field->getValue()}" class="long"{if $field->isAutofocused()} autofocus{/if}{if $field->isRequired()} required{/if}{if $field->isImmutable()} disabled{/if}{if $field->getMinimumLength() !== null} minlength="{$field->getMinimumLength()}"{/if}{if $field->getMaximumLength() !== null} maxlength="{$field->getMaximumLength()}"{/if}{if $field->getPlaceholder() !== null} placeholder="{$field->getPlaceholder()}"{/if}">
+<input type="text" {*
+       *}id="{@$field->getPrefixedId()}" {*
+       *}name="{@$field->getPrefixedId()}" {*
+       *}value="{if !$field->isI18n() || !$field->hasI18nValues()}{$field->getValue()}{/if}" {*
+       *}class="long"{*
+       *}{if $field->isAutofocused()} autofocus{/if}{*
+       *}{if $field->isRequired()} required{/if}{*
+       *}{if $field->isImmutable()} disabled{/if}{*
+       *}{if $field->getMinimumLength() !== null} minlength="{$field->getMinimumLength()}"{/if}{*
+       *}{if $field->getMaximumLength() !== null} maxlength="{$field->getMaximumLength()}"{/if}{*
+       *}{if $field->getPlaceholder() !== null} placeholder="{$field->getPlaceholder()}"{/if}{*
+*}>
 
 {if $field->isI18n()}
        {include file='multipleLanguageInputJavascript'}
index 41ba4a03299f04f5fba8f2598a31705880b9ace6..61976291f7ff63874e5449f17921870765b707b6 100644 (file)
@@ -1,6 +1,14 @@
 {include file='__formFieldHeader'}
 
-<input type="text" id="{@$field->getPrefixedId()}" name="{@$field->getPrefixedId()}" value="{if $field->allowsMultiple()}{if $field->getValue()|is_array}{implode from=$field->getValue() item=username}{$username}{/implode}{/if}{else}{$field->getValue()}{/if}" class="long"{if $field->isAutofocused()} autofocus{/if}{if $field->isRequired()} required{/if}{if $field->isImmutable()} disabled{/if}">
+<input type="text" {*
+       *}id="{@$field->getPrefixedId()}" {*
+       *}name="{@$field->getPrefixedId()}" {*
+       *}value="{if $field->allowsMultiple()}{if $field->getValue()|is_array}{implode from=$field->getValue() item=username}{$username}{/implode}{/if}{else}{$field->getValue()}{/if}" {*
+       *}class="long"{*
+       *}{if $field->isAutofocused()} autofocus{/if}{*
+       *}{if $field->isRequired()} required{/if}{*
+       *}{if $field->isImmutable()} disabled{/if}{*
+*}>
 
 <script data-relocate="true">
        require(['WoltLabSuite/Core/Ui/ItemList/User'], function(UiItemListUser) {
index 1a2e2732cb660cddec0a610f64ba4fe827553714..4e502abff74300bf7b5cc6ba23ff0822c4d12d1b 100644 (file)
@@ -1,5 +1,16 @@
 {include file='__formFieldHeader'}
 
-<input type="text" id="{@$field->getPrefixedId()}" name="{@$field->getPrefixedId()}" value="{$field->getValue()}" class="long"{if $field->isAutofocused()} autofocus{/if}{if $field->isRequired()} required{/if}{if $field->isImmutable()} disabled{/if}{if $field->getMinimumLength() !== null} minlength="{$field->getMinimumLength()}"{/if}{if $field->getMaximumLength() !== null} maxlength="{$field->getMaximumLength()}"{/if}{if $field->getPlaceholder() !== null} placeholder="{$field->getPlaceholder()}"{/if}">
+<input type="text" {*
+       *}id="{@$field->getPrefixedId()}" {*
+       *}name="{@$field->getPrefixedId()}" {*
+       *}value="{$field->getValue()}" {*
+       *}class="long"{*
+       *}{if $field->isAutofocused()} autofocus{/if}{*
+       *}{if $field->isRequired()} required{/if}{*
+       *}{if $field->isImmutable()} disabled{/if}{*
+       *}{if $field->getMinimumLength() !== null} minlength="{$field->getMinimumLength()}"{/if}{*
+       *}{if $field->getMaximumLength() !== null} maxlength="{$field->getMaximumLength()}"{/if}{*
+       *}{if $field->getPlaceholder() !== null} placeholder="{$field->getPlaceholder()}"{/if}{*
+*}>
 
 {include file='__formFieldFooter'}