[TikiWiki-commits] [Git][tikiwiki/tiki][27.x] [BP][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 <69a184c591466_3b187838449c0@gitlab-sidekiq-low-urgency-cpu-bound-v2-7f6f7b97c5-2dw4x.mail>

MAGENE Sem Joel pushed to branch 27.x at Tiki Wiki CMS Groupware / Tiki


Commits:
1cb52a0e by MAGENE Sem Joel at 2026-02-27T11:41:45+00:00
[BP][FIX][UX] Trackers: add missing success feedback for batch actions on items and fields
---
* [BP][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
---
* [FIX][UX] Trackers: add missing success feedback for batch actions on items and fields

See merge request tikiwiki/tiki!9645

(cherry picked from commit c0b54b2b91a34847b07577b859f59c7f4d45ed14)

See merge request tikiwiki/tiki!9657

(cherry picked from commit 58ddbcd7ba8574892e7a56678943b8d344373d7d)

See merge request tikiwiki/tiki!9659

- - - - -


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
=====================================
@@ -199,6 +199,7 @@
                                                 success: function () {
                                                     $link.closest('tr').remove();
                                                     $.fn.resetFieldsCache();
+                                                    feedback(tr("Field successfully removed."), "success");
                                                 }
                                             });
                                         }


=====================================
templates/tiki-admin_tracker_fields.tpl
=====================================
@@ -68,6 +68,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
=====================================
@@ -298,6 +298,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)) {
@@ -305,11 +306,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/1cb52a0ecabfa6b5d21a8b06efd7b8be80dfd3a9

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