[Rt-commit] rt branch, 3.8/admin-editcfs-callbacks, created. rt-3.8.9-14-g0721bc1
Kevin Falcone
falcone at bestpractical.com
Fri Mar 4 12:13:42 EST 2011
The branch, 3.8/admin-editcfs-callbacks has been created
at 0721bc1c2ad895ea828621750f11de711435502b (commit)
- Log -----------------------------------------------------------------
commit 0721bc1c2ad895ea828621750f11de711435502b
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Fri Mar 4 11:14:11 2011 -0500
Allow users to add an extra dynamic column to the display
Also allow them to update OCFs based on that extra column
diff --git a/share/html/Admin/Elements/EditCustomFields b/share/html/Admin/Elements/EditCustomFields
index bf65c9e..91d5cff 100755
--- a/share/html/Admin/Elements/EditCustomFields
+++ b/share/html/Admin/Elements/EditCustomFields
@@ -59,10 +59,7 @@
Rows => 0,
Page => 1,
Format => $format,
- DisplayFormat =>
- $id
- ? ("'__RemoveCheckBox.{$id}__',". $format .", '__MoveCF.{$id}__'")
- : ("'__CheckBox.{RemoveCustomField}__',". $format .", '__MoveCF.{$id}__'"),
+ DisplayFormat => $display_format,
AllowSorting => 0,
ShowEmpty => 0,
PassArguments => [
@@ -151,6 +148,8 @@ if ( $UpdateCFs ) {
}
}
+$m->callback(CallbackName => 'UpdateExtraFields', Results => \@results, Object => $Object, %ARGS);
+
my $applied_cfs = RT::CustomFields->new( $session{'CurrentUser'} );
$applied_cfs->LimitToLookupType($lookup);
$applied_cfs->LimitToGlobalOrObjectId($id);
@@ -162,6 +161,11 @@ $not_applied_cfs->LimitToNotApplied( $id ? ($id, 0) : (0) );
my $format = RT->Config->Get('AdminSearchResultFormat')->{'CustomFields'};
+my $display_format = $id
+ ? ("'__RemoveCheckBox.{$id}__',". $format .", '__MoveCF.{$id}__'")
+ : ("'__CheckBox.{RemoveCustomField}__',". $format .", '__MoveCF.{$id}__'");
+$m->callback(CallbackName => 'EditDisplayFormat', DisplayFormat => \$display_format, id => $id);
+
</%INIT>
<%ARGS>
$Object
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list