[Rt-commit] rt branch 5.0/add-callback-editcustomfieldselect-beforevalues created. rt-5.0.5-163-g506bd66c71

BPS Git Server git at git.bestpractical.com
Mon Apr 8 20:00:21 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/add-callback-editcustomfieldselect-beforevalues has been created
        at  506bd66c716b71abbefac121b3d04c8001246d1d (commit)

- Log -----------------------------------------------------------------
commit 506bd66c716b71abbefac121b3d04c8001246d1d
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date:   Mon Apr 8 16:59:19 2024 -0300

    Add callback to EditCustomFieldSelect before rendering values
    
    In some cases, we might want to modify or restrict the values that are
    displayed in the custom field select box. This callback allows us to do
    that.

diff --git a/share/html/Elements/EditCustomFieldSelect b/share/html/Elements/EditCustomFieldSelect
index 005c5c6819..e9bb82d3e8 100644
--- a/share/html/Elements/EditCustomFieldSelect
+++ b/share/html/Elements/EditCustomFieldSelect
@@ -212,6 +212,8 @@ $MaxValues => 1
 % $_ = lc $_ foreach @Default;
 % my $selected;
 % my $CFVs = CachedCustomFieldValues($CustomField);
+% $m->callback( CallbackPage => '/Elements/EditCustomFieldSelect', CallbackName => 'MassageCustomFieldValues',
+%               CustomField => $CustomField, CustomFieldValues => $CFVs, ARGSRef => \%ARGS );
 % my @levels;
 % while ( my $value = $CFVs->Next ) {
 %       my $name = $value->Name;

-----------------------------------------------------------------------


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list