From aa223bd70e8ab6a52c84bdd813b959c1bd2e79ac Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sun, 24 Feb 2019 14:36:18 +0100 Subject: [PATCH] Set form container classes via PHP API This way, the default classes can also be removed again See #2509 --- com.woltlab.wcf/templates/__formContainer.tpl | 6 +++++- com.woltlab.wcf/templates/__tabFormContainer.tpl | 6 +++++- com.woltlab.wcf/templates/__tabMenuFormContainer.tpl | 6 +++++- .../templates/__tabTabMenuFormContainer.tpl | 5 ++++- .../install/files/acp/templates/__formContainer.tpl | 6 +++++- .../files/acp/templates/__tabFormContainer.tpl | 6 +++++- .../files/acp/templates/__tabMenuFormContainer.tpl | 6 +++++- .../files/acp/templates/__tabTabMenuFormContainer.tpl | 5 ++++- .../form/builder/container/FormContainer.class.php | 7 +++++++ .../form/builder/container/TabFormContainer.class.php | 7 +++++++ .../builder/container/TabMenuFormContainer.class.php | 8 ++++++++ .../container/TabTabMenuFormContainer.class.php | 11 +++++++++-- 12 files changed, 69 insertions(+), 10 deletions(-) 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}{* +*}>