[Rt-commit] r2384 - in rt/branches/PLATANO-EXPERIMENTAL: . html/Admin/Elements

jesse at bestpractical.com jesse at bestpractical.com
Mon Mar 14 02:33:54 EST 2005


Author: jesse
Date: Mon Mar 14 02:33:54 2005
New Revision: 2384

Modified:
   rt/branches/PLATANO-EXPERIMENTAL/   (props changed)
   rt/branches/PLATANO-EXPERIMENTAL/html/Admin/Elements/ObjectCustomFields
Log:
 r8488 at hualien:  jesse | 2005-03-14 02:27:47 -0500
  r5946 at hualien:  jesse | 2005-02-24 16:44:28 -0500
  Refactoring Custom Field admin UI for extensibility
 


Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Admin/Elements/ObjectCustomFields
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Admin/Elements/ObjectCustomFields	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Admin/Elements/ObjectCustomFields	Mon Mar 14 02:33:54 2005
@@ -58,8 +58,9 @@
 
 <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, Object => $Object &>
 <%INIT>
-$ObjectType =~ /^RT::(Queue|User|Group)$/
-    or Abort(loc("Object of type [_1] cannot take custom fields", $ObjectType));
+# XXX TODO: Validate here?
+#$ObjectType =~ /^RT::(Queue|User|Group)$/
+#    or Abort(loc("Object of type [_1] cannot take custom fields", $ObjectType));
 
 
 
@@ -72,7 +73,7 @@
 my $QualifiedType;
 my $FriendlySubTypes;
 if ($SubType =~/^RT::(.*)$/)  {
-    $FriendlySubTypes = $1."s";
+    $FriendlySubTypes = RT::CustomField->new($session{'CurrentUser'})->FriendlyLookupType($Object->CustomFieldLookupType);
    $QualifiedType = "$Type-$1"; 
 } else {
     $QualifiedType = $Type;
@@ -91,7 +92,8 @@
 $title =  loc('Edit Custom Fields for [_1]', $Object->Name);
 }
 elsif ($SubType) {
-$title=   loc("Modify Custom Fields which apply to [_1] for all [_2]", loc(lc($FriendlySubTypes)), loc(lc($Types)));
+
+    $title=   loc("Modify Custom Fields which apply to [_1] for all [_2]", loc(lc($FriendlySubTypes)), loc(lc($Types)));
 } else {
  $title =loc("Modify Custom Fields which apply to all [_1]", loc(lc($Types)));
 


More information about the Rt-commit mailing list