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

"Baraka Kinywa \(@bkinywa24\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <68a5a832e7ac4_2c28d4d3c7519@gitlab-sidekiq-low-urgency-cpu-bound-v2-78d9d68c78-d8xff.mail>

Baraka Kinywa pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki


Commits:
bc8fa56e by Landry Bitege at 2025-08-20T13:41:02+03:00
[FIX][UX] Improve UX when preference search input is empty
---
* [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

See merge request tikiwiki/tiki!8338

- - - - -


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/bc8fa56eff6a967c1706db08028c0e3a0e8509d4

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/bc8fa56eff6a967c1706db08028c0e3a0e8509d4
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.