[Rt-commit] r7455 - in rt/branches/3.7-EXPERIMENTAL:
html/Widgets/Form
ruz at bestpractical.com
ruz at bestpractical.com
Wed Apr 4 17:52:15 EDT 2007
Author: ruz
Date: Wed Apr 4 17:52:14 2007
New Revision: 7455
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/html/Widgets/Form/Select
Log:
r4888 at cubic-pc: cubic | 2007-04-04 14:53:45 +0400
* remove NamePrefix and make Name mandatory argument
Modified: rt/branches/3.7-EXPERIMENTAL/html/Widgets/Form/Select
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Widgets/Form/Select (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Widgets/Form/Select Wed Apr 4 17:52:14 2007
@@ -2,7 +2,7 @@
% if ( $Description ) {
<% $Description %>:
% }
-<select name="<% $NamePrefix %><% $Name %>">
+<select name="<% $Name %>">
% if ( $Empty ) {
% my $selected = '';
@@ -24,7 +24,7 @@
</select>
% if ( $Alternative ) {
-<input type="text" class="alternative" name="<% $NamePrefix %>Alternative-<% $Name %>" value="<% join ', ', @CurrentValue %>" />
+<input type="text" class="alternative" name="Alternative-<% $Name %>" value="<% join ', ', @CurrentValue %>" />
% }
</div>
<%INIT>
@@ -32,7 +32,6 @@
if ( $ValuesCallback ) {
my $values = $ValuesCallback->(
CurrentUser => $session{'CurrentUser'},
- NamePrefix => $NamePrefix,
Name => $Name,
);
if ( ref $values eq 'ARRAY' ) {
@@ -44,8 +43,7 @@
}
</%INIT>
<%ARGS>
-$NamePrefix => 'Select-',
-$Name => '',
+$Name
$Description => undef,
@Values => (),
@@ -65,10 +63,9 @@
<%METHOD Process>
<%ARGS>
-$Arguments => {},
+$Name
-$NamePrefix => 'Select-',
-$Name => undef,
+$Arguments => {},
@Values => (),
%ValuesLabel => (),
@@ -79,7 +76,7 @@
$Multiple => 0,
</%ARGS>
<%INIT>
-my $value = $Arguments->{ $NamePrefix . $Name };
+my $value = $Arguments->{ $Name };
if( !defined $value || $value eq '__empty_value__' ) {
unless ( $Empty ) {
return [ @CurrentValue ] if $Multiple;
@@ -90,7 +87,7 @@
$value = [$value] unless ref $value;
if ( $Alternative ) {
- my $alt = $Arguments->{ $NamePrefix ."Alternative-". $Name };
+ my $alt = $Arguments->{ "Alternative-". $Name };
if( $Multiple ) {
push @$value, split /\s*,\s*/, $alt;
} else {
More information about the Rt-commit
mailing list