[Rt-commit] rt branch 5.0/remove-empty-option-from-multiple-select-cfs created. rt-5.0.5-155-gcc5b9096b4
BPS Git Server
git at git.bestpractical.com
Thu Feb 1 20:37:10 UTC 2024
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".
The branch, 5.0/remove-empty-option-from-multiple-select-cfs has been created
at cc5b9096b4ad9693add8e6200adfddec77e7dbe5 (commit)
- Log -----------------------------------------------------------------
commit cc5b9096b4ad9693add8e6200adfddec77e7dbe5
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Feb 1 15:20:16 2024 -0500
Remove the empty option from multiple-value select custom fields
For multiple-value selects, unlike vanilla version where we need to keep
the empty option so users can easily deselect all real values, current
selectpicker version doesn't need this workaround, just like the previous
chosen version.
diff --git a/share/html/Elements/EditCustomFieldSelect b/share/html/Elements/EditCustomFieldSelect
index a6f23854c2..a62a34dda6 100644
--- a/share/html/Elements/EditCustomFieldSelect
+++ b/share/html/Elements/EditCustomFieldSelect
@@ -175,7 +175,7 @@ my $use_chosen = CachedCustomFieldValues($CustomField)->Count >= 10 ? 1 : 0;
$m->callback( CallbackName => 'Chosen', UseChosen => \$use_chosen, CustomField => $CustomField );
# it's weird to see "(no value) X" in the input when selecting multiple values
-$show_empty_option = 0 if $use_chosen && $Multiple;
+$show_empty_option = 0 if $Multiple;
</%init>
<%ARGS>
$Object => undef
-----------------------------------------------------------------------
hooks/post-receive
--
rt
More information about the rt-commit
mailing list