From 197780e3fb0862310b3fc401323dd7c5a6c9c3e7 Mon Sep 17 00:00:00 2001 From: Michael Kessler <michael.kessler@sgalinski.de> Date: Fri, 18 Feb 2022 14:00:35 +0100 Subject: [PATCH] [TASK] Integrate label into the select field inside the filter --- Resources/Private/Partials/Filter.html | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/Resources/Private/Partials/Filter.html b/Resources/Private/Partials/Filter.html index f3aa59f..2f10d24 100644 --- a/Resources/Private/Partials/Filter.html +++ b/Resources/Private/Partials/Filter.html @@ -1,34 +1,16 @@ <f:form id="tx-sgnews-filter" method="get" objectName="newsFilter"> <div class="tx-sgnews-filter-bar"> <div class="tx-sgnews-filter-bar-form-control"> - <label for="filter-categories"> - <f:if condition="{categoryLabel}"> - <f:then> - {categoryLabel} - </f:then> - <f:else> - <f:translate key="frontend.filter.category"/> - </f:else> - </f:if> - </label> <f:form.select class="tx-sgnews-select form-control" multiple="0" size="1" value="{selectedCategory.uid}" property="category" optionLabelField="title" optionValueField="uid" options="{categories}" - id="filter-categories" prependOptionLabel="" prependOptionValue=""/> + id="filter-categories" prependOptionValue="" + prependOptionLabel="{f:if(condition: '{categoryLabel}', then: '{categoryLabel}', else: '{f:translate(key: \'frontend.filter.category\')}')}" /> </div> <div class="tx-sgnews-filter-bar-form-control"> - <label for="filter-tags"> - <f:if condition="{tagLabel}"> - <f:then> - {tagLabel} - </f:then> - <f:else> - <f:translate key="frontend.filter.tag"/> - </f:else> - </f:if> - </label> <f:form.select class="tx-sgnews-select form-control" multiple="0" size="1" value="{selectedTag.uid}" property="tag" optionValueField="uid" options="{tags}" id="filter-tags" - optionLabelField="title" prependOptionLabel="" prependOptionValue=""/> + optionLabelField="title" prependOptionValue="" + prependOptionLabel="{f:if(condition: '{tagLabel}', then: '{tagLabel}', else: '{f:translate(key: \'frontend.filter.tag\')}')}"/> </div> </div> </f:form> -- GitLab