[freeside-commits] freeside/rt/share/html/Admin/Elements EditScripOptions, 1.1, 1.2
Mark Wells
mark at wavetail.420.am
Fri May 13 16:20:55 PDT 2011
Update of /home/cvs/cvsroot/freeside/rt/share/html/Admin/Elements
In directory wavetail.420.am:/tmp/cvs-serv27525/rt/share/html/Admin/Elements
Modified Files:
EditScripOptions
Log Message:
notify on custom field change, #11274
Index: EditScripOptions
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/share/html/Admin/Elements/EditScripOptions,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -d -r1.1 -r1.2
--- EditScripOptions 17 Nov 2010 20:44:11 -0000 1.1
+++ EditScripOptions 13 May 2011 23:20:53 -0000 1.2
@@ -2,10 +2,14 @@
<tr><td></td><td><table>
% my $prefix = $Name.'Rules-';
% foreach my $o (@options) {
+% my $curr_value = $rules{ $o->{'name'} };
<tr><td align="right"><% $o->{'label'} %>:</td>
<td>
% if ( $o->{'type'} eq 'text' ) {
- <input type="text" name="<% $prefix.$o->{'name'} %>" value="<% $rules{$o->{'name'}} %>">
+ <input type="text" name="<% $prefix.$o->{'name'} %>" value="<% $curr_value %>">
+% }
+% elsif ( $o->{'type'} eq 'checkbox' ) {
+ <input type="checkbox" name="<% $prefix.$o->{'name'} %>" value="1" <% $curr_value ? 'CHECKED' : '' %>>
% }
% elsif ( $o->{'type'} eq 'select' and ref $o->{'options'} ) {
<select name="<% $prefix.$o->{'name'} %>">
@@ -13,7 +17,7 @@
% while (@choices) {
% my $v = shift @choices;
% my $l = shift @choices;
- <option value="<% $v %>"<% ($rules{$o->{'name'}} eq $v) ? ' SELECTED' : ''%>>
+ <option value="<% $v %>"<% ($curr_value eq $v) ? ' SELECTED' : ''%>>
<% $l %></option>
% }
</select>
More information about the freeside-commits
mailing list