[Rt-commit] r3989 - in rt/branches/3.4-RELEASE: . html/Elements
alexmv at bestpractical.com
alexmv at bestpractical.com
Mon Oct 24 17:26:18 EDT 2005
Author: alexmv
Date: Mon Oct 24 17:26:18 2005
New Revision: 3989
Modified:
rt/branches/3.4-RELEASE/ (props changed)
rt/branches/3.4-RELEASE/html/Elements/EditCustomField
rt/branches/3.4-RELEASE/html/Elements/EditCustomFieldSelect
Log:
r6881 at zoq-fot-pik: chmrr | 2005-10-24 17:25:14 -0400
* Ensure custom fields keep correct fallback values; for instance, if
"add another attachment" is clicked
Modified: rt/branches/3.4-RELEASE/html/Elements/EditCustomField
==============================================================================
--- rt/branches/3.4-RELEASE/html/Elements/EditCustomField (original)
+++ rt/branches/3.4-RELEASE/html/Elements/EditCustomField Mon Oct 24 17:26:18 2005
@@ -49,6 +49,10 @@
$Values = $Object->CustomFieldValues($CustomField->id);
$Values->Columns( qw( id CustomField ObjectType ObjectId Disabled Content ContentType ContentEncoding ) );
$NamePrefix ||= join('-', 'Object', ref($Object), $Object->Id, 'CustomField', '');
+} elsif (not $Default) {
+ my %TOP = $m->request_args;
+ $Default = $TOP{ $NamePrefix .$CustomField->Id . '-Values' }
+ || $TOP{ $NamePrefix .$CustomField->Id . '-Value' };
}
my $Type = $CustomField->Type;
Modified: rt/branches/3.4-RELEASE/html/Elements/EditCustomFieldSelect
==============================================================================
--- rt/branches/3.4-RELEASE/html/Elements/EditCustomFieldSelect (original)
+++ rt/branches/3.4-RELEASE/html/Elements/EditCustomFieldSelect Mon Oct 24 17:26:18 2005
@@ -53,7 +53,8 @@
% if ($Values) {
<% $Values->HasEntry($value->Name) && ($selected = 1) && 'SELECTED' %>
% } elsif ($Default) {
- <% ($Default eq $value->Name) && ($selected = 1) && 'SELECTED' %>
+ <% (ref $Default ? (grep {$_ eq $value->Name} @{$Default}) : ($Default eq $value->Name))
+ && ($selected = 1) && 'SELECTED' %>
% }
><% $value->Name%></option>
% }
More information about the Rt-commit
mailing list