[Rt-commit] r2261 - in rt/branches/3.4-RELEASE: .
html/Admin/Elements
jesse at bestpractical.com
jesse at bestpractical.com
Thu Feb 24 17:51:29 EST 2005
Author: jesse
Date: Thu Feb 24 17:51:28 2005
New Revision: 2261
Modified:
rt/branches/3.4-RELEASE/ (props changed)
rt/branches/3.4-RELEASE/html/Admin/Elements/ObjectCustomFields
Log:
r5946 at hualien: jesse | 2005-02-24 16:44:28 -0500
Refactoring Custom Field admin UI for extensibility
Modified: rt/branches/3.4-RELEASE/html/Admin/Elements/ObjectCustomFields
==============================================================================
--- rt/branches/3.4-RELEASE/html/Admin/Elements/ObjectCustomFields (original)
+++ rt/branches/3.4-RELEASE/html/Admin/Elements/ObjectCustomFields Thu Feb 24 17:51:28 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