[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX][UX] Trackers: add missing success feedback for batch actions on items and fields

"MAGENE Sem Joel \(@Jomagene\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <69a09c75d79dd_3b18770c9355e@gitlab-sidekiq-low-urgency-cpu-bound-v2-fc67bfcb4-pn89q.mail>

MAGENE Sem Joel pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
c0b54b2b by MAGENE Sem Joel at 2026-02-26T19:10:11+00:00
[FIX][UX] Trackers: add missing success feedback for batch actions on items and fields
---
* [FIX][UX] Trackers: add missing success feedback for batch actions on items and fields

See merge request tikiwiki/tiki!9645

- - - - -


3 changed files:

- lib/jquery_tiki/tiki-trackers.js
- templates/tiki-admin_tracker_fields.tpl
- tiki-view_tracker.php


Changes:

=====================================
lib/jquery_tiki/tiki-trackers.js
=====================================
@@ -160,6 +160,7 @@
                                                 success: function () {
                                                     $link.closest('tr').remove();
                                                     $.fn.resetFieldsCache();
+                                                    feedback(tr("Field successfully removed."), "success");
                                                 }
                                             });
                                         }


=====================================
templates/tiki-admin_tracker_fields.tpl
=====================================
@@ -89,6 +89,9 @@
                         $container.tracker_load_fields(trackerId);
                         if (action === 'remove_fields') {
                             $.fn.resetFieldsCache();
+                            feedback(tr('Fields successfully removed.'), 'success');
+                        } else if (action === 'save_fields') {
+                            feedback(tr('Fields successfully saved.'), 'success');
                         }
                     }
                 });


=====================================
tiki-view_tracker.php
=====================================
@@ -355,6 +355,7 @@ if (! empty($_REQUEST['remove'])) {
     }
 } elseif (isset($_REQUEST["batchaction"]) and $_REQUEST["batchaction"] == 'delete' && $access->checkCsrf()) {
     $transaction = $tikilib->begin();
+    $deleted = 0;
 
     foreach ($_REQUEST['action'] ?? [] as $batchid) {
         if (! empty($batchid)) {
@@ -362,11 +363,17 @@ if (! empty($_REQUEST['remove'])) {
             $actionObject = Tracker_Item::fromInfo($item_info);
             if ($actionObject->canRemove()) {
                 $trklib->remove_tracker_item($batchid);
+                $deleted++;
             }
         }
     }
 
     $transaction->commit();
+    if ($deleted === 1) {
+        Feedback::success(tr('Successfully deleted 1 item.'));
+    } elseif ($deleted > 1) {
+        Feedback::success(tr('Successfully deleted %0 items.', $deleted));
+    }
 
     // redirect to the tracker item list of the last item deleted
     if (isset($item_info) && ! empty($item_info['trackerId'])) {



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

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/c0b54b2b91a34847b07577b859f59c7f4d45ed14
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help

_______________________________________________
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.