From: Matthias Schmidt Date: Sun, 24 Feb 2019 13:36:18 +0000 (+0100) Subject: Set form container classes via PHP API X-Git-Tag: 5.2.0_Alpha_1~272 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aa223bd70e8ab6a52c84bdd813b959c1bd2e79ac;p=GitHub%2FWoltLab%2FWCF.git Set form container classes via PHP API This way, the default classes can also be removed again See #2509 --- diff --git a/com.woltlab.wcf/templates/__formContainer.tpl b/com.woltlab.wcf/templates/__formContainer.tpl index 9a1a0bee22..1bc1bbc956 100644 --- a/com.woltlab.wcf/templates/__formContainer.tpl +++ b/com.woltlab.wcf/templates/__formContainer.tpl @@ -1,4 +1,8 @@ -
getAttributes() key='attributeName' item='attributeValue'} {$attributeName}="{$attributeValue}"{/foreach}{if !$container->checkDependencies()} style="display: none;"{/if}> +
getClasses()|empty}class="{implode from=$container->getClasses() item='class' glue=' '}{$class}{/implode}" {/if}{* + *}{foreach from=$container->getAttributes() key='attributeName' item='attributeValue'} {$attributeName}="{$attributeValue}"{/foreach}{* + *}{if !$container->checkDependencies()} style="display: none;"{/if}{* +*}> {if $container->getLabel() !== null} {if $container->getDescription() !== null}
diff --git a/com.woltlab.wcf/templates/__tabFormContainer.tpl b/com.woltlab.wcf/templates/__tabFormContainer.tpl index 179eadff14..b7e12b038f 100644 --- a/com.woltlab.wcf/templates/__tabFormContainer.tpl +++ b/com.woltlab.wcf/templates/__tabFormContainer.tpl @@ -1,4 +1,8 @@ -
getAttributes() key='attributeName' item='attributeValue'} {$attributeName}="{$attributeValue}"{/foreach}{if !$container->checkDependencies()} style="display: none;"{/if}> +
getClasses()|empty}class="{implode from=$container->getClasses() item='class' glue=' '}{$class}{/implode}" {/if}{* + *}{foreach from=$container->getAttributes() key='attributeName' item='attributeValue'} {$attributeName}="{$attributeValue}"{/foreach}{* + *}{if !$container->checkDependencies()} style="display: none;"{/if}{* +*}> {include file='__formContainerChildren'}
diff --git a/com.woltlab.wcf/templates/__tabMenuFormContainer.tpl b/com.woltlab.wcf/templates/__tabMenuFormContainer.tpl index f8f3e15b80..8b349ccee5 100644 --- a/com.woltlab.wcf/templates/__tabMenuFormContainer.tpl +++ b/com.woltlab.wcf/templates/__tabMenuFormContainer.tpl @@ -1,4 +1,8 @@ -
getAttributes() key='attributeName' item='attributeValue'} {$attributeName}="{$attributeValue}"{/foreach}{if !$container->checkDependencies()} style="display: none;"{/if}{if !$container->checkDependencies()} style="display: none;"{/if}> +
getClasses()|empty}class="{implode from=$container->getClasses() item='class' glue=' '}{$class}{/implode}" {/if}{* + *}{foreach from=$container->getAttributes() key='attributeName' item='attributeValue'} {$attributeName}="{$attributeValue}"{/foreach}{* + *}{if !$container->checkDependencies()} style="display: none;"{/if}{* +*}>