[Rt-commit] r5175 - in rt/branches/3.5-TESTING: .

jesse at bestpractical.com jesse at bestpractical.com
Mon May 8 11:37:41 EDT 2006


Author: jesse
Date: Mon May  8 11:37:40 2006
New Revision: 5175

Modified:
   rt/branches/3.5-TESTING/   (props changed)
   rt/branches/3.5-TESTING/html/Elements/EditCustomField
   rt/branches/3.5-TESTING/html/Elements/ShowCustomFields

Log:
 r13302 at hualien:  jesse | 2006-05-08 11:20:08 -0400
 RT-Ticket: 7511
 RT-Status: resolved
 RT-Update: correspond
 
 * Patch from Todd Chapman to add callbacks to customize custom field entry widgets 


Modified: rt/branches/3.5-TESTING/html/Elements/EditCustomField
==============================================================================
--- rt/branches/3.5-TESTING/html/Elements/EditCustomField	(original)
+++ rt/branches/3.5-TESTING/html/Elements/EditCustomField	Mon May  8 11:37:40 2006
@@ -69,8 +69,12 @@
 # we don't see a value later, since browsers aren't compelled to submit empty form fields
 $m->out("\n".'<input type="hidden" class="hidden" name="'.$NamePrefix.$CustomField->Id.'-Values-Magic" value="1" />'."\n");
 
+my $EditComponent = "EditCustomField$Type";
+$m->comp('/Elements/Callback', _CallbackName => 'EditComponentName', Name => \$EditComponent, CustomField => $CustomField, Object => $Object );
+$EditComponent = "EditCustomField$Type" unless $m->comp_exists($EditComponent);
+
 return $m->comp(
-    "EditCustomField$Type",
+    $EditComponent,
     %ARGS,
     Rows => $Rows,
     Cols => $Cols,

Modified: rt/branches/3.5-TESTING/html/Elements/ShowCustomFields
==============================================================================
--- rt/branches/3.5-TESTING/html/Elements/ShowCustomFields	(original)
+++ rt/branches/3.5-TESTING/html/Elements/ShowCustomFields	Mon May  8 11:37:40 2006
@@ -57,6 +57,7 @@
 <a href="<%$Value->LinkValueTo|n%>" target="_new">
 % }
 % my $comp = "ShowCustomField".$CustomField->Type;
+% $m->comp('/Elements/Callback', _CallbackName => 'ShowComponentName', Name => \$comp, CustomField => $CustomField, Object => $Object );
 % if ($m->comp_exists($comp)) {
 <& $comp, Object => $Value &>
 %   } else {


More information about the Rt-commit mailing list