Improved structure of the search form filter options
authorMarcel Werk <burntime@woltlab.com>
Wed, 18 May 2022 16:24:37 +0000 (18:24 +0200)
committerMarcel Werk <burntime@woltlab.com>
Wed, 18 May 2022 16:24:37 +0000 (18:24 +0200)
com.woltlab.wcf/templates/search.tpl
ts/WoltLabSuite/Core/Ui/Search/Extended.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Search/Extended.js
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index e32350d785ea217985ae587c3a95ecf731f9ce74..143f273ef14d5f9cd6182f5bbb5f4e1dd0addf6b 100644 (file)
                
                        <div class="searchFilters defaultSearchFilters">
                                <dl>
-                                       <dt></dt>
+                                       <dt><label>{lang}wcf.search.searchIn{/lang}</label></dt>
                                        <dd>
-                                               <label><input type="checkbox" name="subjectOnly" value="1"> {lang}wcf.search.subjectOnly{/lang}</label>
+                                               <label><input type="radio" name="subjectOnly" value="" checked> {lang}wcf.search.searchIn.subjectAndMessage{/lang}</label>
+                                               <label><input type="radio" name="subjectOnly" value="1"> {lang}wcf.search.searchIn.subjectOnly{/lang}</label>
                                                {* deprecated *}{event name='queryOptions'}
                                        </dd>
                                </dl>
index 9f544e3ad8cc68fee645b30cfff771c615e0a77c..b4afc7102cad39468a50debdaffdc9febf1762c2 100644 (file)
@@ -194,7 +194,10 @@ export class UiSearchExtended {
           });
           if (id) {
             DatePicker.setDate(id, new Date(value));
+            return;
           }
+
+          element.value = value;
         } else if (element instanceof HTMLInputElement) {
           if (element.type === "checkbox") {
             element.checked = true;
index 95b89cc9d4a82ec46fa95332fb0354f68f38668d..32a99dfd7d264c089a5aef4a4a9408b1a1fbc1e0 100644 (file)
@@ -149,7 +149,9 @@ define(["require", "exports", "tslib", "../../Ajax", "../../Date/Picker", "../..
                         });
                         if (id) {
                             Picker_1.default.setDate(id, new Date(value));
+                            return;
                         }
+                        element.value = value;
                     }
                     else if (element instanceof HTMLInputElement) {
                         if (element.type === "checkbox") {
index 7f1d1f446ef15a8b377e8c32ae3a4ed2aaa3881b..0e2b2a903243aec3885257687e26efd5b856f1ba 100644 (file)
@@ -4514,8 +4514,10 @@ Dateianhänge:
                <item name="wcf.search.sortBy.relevance"><![CDATA[Relevanz]]></item>
                <item name="wcf.search.sortBy.time"><![CDATA[Datum]]></item>
                <item name="wcf.search.sortBy.username"><![CDATA[Autor]]></item>
-               <item name="wcf.search.subjectOnly"><![CDATA[Nur Betreff durchsuchen]]></item>
-               <item name="wcf.search.type"><![CDATA[Suche in]]></item>
+               <item name="wcf.search.searchIn"><![CDATA[Suchen in]]></item>
+               <item name="wcf.search.searchIn.subjectAndMessage"><![CDATA[Betreff und Nachricht]]></item>
+               <item name="wcf.search.searchIn.subjectOnly"><![CDATA[Nur Betreff]]></item>
+               <item name="wcf.search.type"><![CDATA[Art der Inhalte]]></item>
                <item name="wcf.search.type.everywhere"><![CDATA[Alles]]></item>
                <item name="wcf.search.object.com.woltlab.wcf.article"><![CDATA[Artikel]]></item>
                <item name="wcf.search.type.com.woltlab.wcf.article"><![CDATA[Artikel]]></item>
@@ -5618,5 +5620,6 @@ Benachrichtigungen auf <a href="{link isHtmlEmail=true}{/link}">{PAGE_TITLE|phra
        <item name="wcf.user.profile.customization" />
        <item name="wcf.acp.option.enable_desktop_notifications"/>
        <item name="wcf.acp.option.enable_desktop_notifications.description"/>
+       <item name="wcf.search.subjectOnly" />
 </delete>
 </language>
index c9e8dcd2676a274a40992aae880845742b520267..8f76d2c0e779fa79b4bb8b06cbb59ab73eb8cf55 100644 (file)
@@ -4516,8 +4516,10 @@ Attachments:
                <item name="wcf.search.sortBy.relevance"><![CDATA[Relevance]]></item>
                <item name="wcf.search.sortBy.time"><![CDATA[Time]]></item>
                <item name="wcf.search.sortBy.username"><![CDATA[Author]]></item>
-               <item name="wcf.search.subjectOnly"><![CDATA[Search subject only]]></item>
-               <item name="wcf.search.type"><![CDATA[Search in]]></item>
+               <item name="wcf.search.searchIn"><![CDATA[Search In]]></item>
+               <item name="wcf.search.searchIn.subjectAndMessage"><![CDATA[Subject and message]]></item>
+               <item name="wcf.search.searchIn.subjectOnly"><![CDATA[Subject only]]></item>
+               <item name="wcf.search.type"><![CDATA[Content Type]]></item>
                <item name="wcf.search.type.everywhere"><![CDATA[Everywhere]]></item>
                <item name="wcf.search.object.com.woltlab.wcf.article"><![CDATA[Article]]></item>
                <item name="wcf.search.type.com.woltlab.wcf.article"><![CDATA[Articles]]></item>
@@ -5620,5 +5622,6 @@ your notifications on <a href="{link isHtmlEmail=true}{/link}">{PAGE_TITLE|phras
        <item name="wcf.user.profile.customization" />
        <item name="wcf.acp.option.enable_desktop_notifications"/>
        <item name="wcf.acp.option.enable_desktop_notifications.description"/>
+       <item name="wcf.search.subjectOnly" />
 </delete>
 </language>