[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Tracker preview: the User Selector field doesn't work when multiple selection is allowed

Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <68924ca862c0a_2cd5d181751e@gitlab-sidekiq-low-urgency-cpu-bound-v2-6b9b65f69d-bb89t.mail>

Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
5d704b79 by Joel Mpunga at 2025-08-05T18:17:57+00:00
[FIX] Tracker preview: the User Selector field doesn't work when multiple selection is allowed
---
* [FIX] Tracker preview: the User Selector field doesn't work when multiple selection is allowed

See merge request tikiwiki/tiki!8151

- - - - -


1 changed file:

- templates/trackerinput/userselector_grouped.tpl


Changes:

=====================================
templates/trackerinput/userselector_grouped.tpl
=====================================
@@ -18,8 +18,7 @@
                     <option value="{$data.selected_users[ix]}" selected>{if ($field.showRealname == 'y')}{$data.selected_users[ix]|username}{else}{$data.selected_users[ix]}{/if}</option>
                 {/section}
             </select>
-            <input type="hidden" name="{$field.html_name}" value="">
-            <p id="info" class="italic" style="font-style: italic; font-size: 0.8em; color: red"></p>
+            <input type="hidden" name="{$field.html_name}" id="hidden_{$field.fieldId}" value="{$data.selected_users|implode:','}">
         </div>
     {/if}
 </div>
@@ -54,6 +53,7 @@
                 $("#info").removeClass("d-none");
             }
 
+
             var to_remove = $.map(selected, function(user) {
                 return $.inArray(user, all_users) < 0 ? user : null;
             });
@@ -88,4 +88,9 @@
             }
         }
     }).trigger('change');
+
+    $("#user_selector_{{$field.fieldId}}").on("change", function() {
+        var selectedUsers = $(this).val() || [];
+        $("#hidden_{{$field.fieldId}}").val(selectedUsers.join(","));
+    }).trigger('change');
 {/jq}



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

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