Only add form field label element if label exists
authorMatthias Schmidt <gravatronics@live.com>
Sun, 24 Feb 2019 13:38:25 +0000 (14:38 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 24 Feb 2019 13:38:25 +0000 (14:38 +0100)
See #2509

com.woltlab.wcf/templates/__formFieldHeader.tpl
wcfsetup/install/files/acp/templates/__formFieldHeader.tpl

index 865a32195293cdf1785daeb1107eebccf314f1cf..41def24519d049adf972a188f68f7438d8d7a7a2 100644 (file)
@@ -1,3 +1,3 @@
-       <dt><label for="{@$field->getPrefixedId()}">{@$field->getLabel()}</label></dt>
 <dl id="{@$field->getPrefixedId()}Container" {if !$field->getClasses()|empty} class="{implode from=$field->getClasses() item='class' glue=' '}{$class}{/implode}"{/if}{foreach from=$field->getAttributes() key='attributeName' item='attributeValue'} {$attributeName}="{$attributeValue}"{/foreach}{if !$field->checkDependencies()} style="display: none;"{/if}>
+       <dt>{if $field->getLabel() !== null}<label for="{@$field->getPrefixedId()}">{@$field->getLabel()}</label>{/if}</dt>
        <dd>
index 865a32195293cdf1785daeb1107eebccf314f1cf..41def24519d049adf972a188f68f7438d8d7a7a2 100644 (file)
@@ -1,3 +1,3 @@
-       <dt><label for="{@$field->getPrefixedId()}">{@$field->getLabel()}</label></dt>
 <dl id="{@$field->getPrefixedId()}Container" {if !$field->getClasses()|empty} class="{implode from=$field->getClasses() item='class' glue=' '}{$class}{/implode}"{/if}{foreach from=$field->getAttributes() key='attributeName' item='attributeValue'} {$attributeName}="{$attributeValue}"{/foreach}{if !$field->checkDependencies()} style="display: none;"{/if}>
+       <dt>{if $field->getLabel() !== null}<label for="{@$field->getPrefixedId()}">{@$field->getLabel()}</label>{/if}</dt>
        <dd>