[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [BP][FIX] Tracker preview: the User Selector field doesn't work when multiple selection is allowed
"Joel Mpunga \(@joelmpunga79\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <68b99a31e288d_2cdd1a82289e@gitlab-sidekiq-low-urgency-cpu-bound-v2-77ffcd4d7b-qdxsw.mail> |
Joel Mpunga pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki Commits: 93fc86e8 by Joel Mpunga at 2025-09-04T13:48:06+00:00 [BP][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 --- * [FIX] Tracker preview: the User Selector field doesn't work when multiple selection is allowed See merge request tikiwiki/tiki!8151 (cherry picked from commit 5d704b792c39d072dfb61b88ac46910777c67c51) c3364193 [FIX] Tracker preview: the User Selector field doesn't work when multiple selection is allowed Co-authored-by: Joel Mpunga <[email protected]> See merge request tikiwiki/tiki!8502 - - - - - 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/93fc86e8d3137d117a7870d63add124c48958aba -- View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/93fc86e8d3137d117a7870d63add124c48958aba 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