[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX][UX] Improve UX when preference search input is empty

"luci \(@luciash\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <68a323f5c5ad4_2cd6ca4526e2@gitlab-sidekiq-low-urgency-cpu-bound-v2-5b8f9fb769-7vft8.mail>

luci pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
615bd8d9 by Landry Bitege at 2025-08-18T12:52:41+00:00
[FIX][UX] Improve UX when preference search input is empty
---
* [FIX][UX] Improve UX when preference search input is empty

See merge request tikiwiki/tiki!8086

- - - - -


2 changed files:

- templates/admin/admin_navbar.tpl
- tiki-admin.php


Changes:

=====================================
templates/admin/admin_navbar.tpl
=====================================
@@ -93,7 +93,7 @@
     {/if}
 </nav>
 
-{if $lm_searchresults}
+{if $lm_searchresults && $lm_criteria}
     <div class="alert alert-secondary alert-dismissible pe-3" id="pref_searchresults">
         <button type="button" class="btn-close mt-3" aria-hidden="true" data-bs-dismiss="alert" aria-label="{tr}Close{/tr}"></button>
             <h3 class="alert-heading">{tr}Preference Search Results{/tr}</h3>
@@ -110,7 +110,7 @@
             {ticket}
         </form>
     </div>
-{elseif $lm_criteria}
+{elseif $lm_criteria ne ''}
     {remarksbox type="note" title="{tr}No results{/tr}" icon="magnifier"}
         {tr}No preferences were found for your search query.{/tr}<br>
         {tr _0='<a class="alert-link" href="tiki-admin.php?prefrebuild">' _1='</a>'}Not what you expected? Try %0rebuilding%1 the preferences search index.{/tr}


=====================================
tiki-admin.php
=====================================
@@ -231,8 +231,8 @@ if (isset($_POST['lm_preference']) && $access->checkCsrf()) {
 }
 
 if (isset($_REQUEST['lm_criteria'])) {
-    if (empty($_REQUEST['lm_criteria'])) {
-        Feedback::errorAndDie(tra('Your search request is empty'), \Laminas\Http\Response::STATUS_CODE_400);
+    if ($_REQUEST['lm_criteria'] == '') {
+        Feedback::error(tra('Your search request is empty'), \Laminas\Http\Response::STATUS_CODE_400);
     }
     set_time_limit(0);
     try {



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/615bd8d9362b5e6598d6baee42538187fac32dc4

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/615bd8d9362b5e6598d6baee42538187fac32dc4
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.