[freeside-commits] freeside/httemplate/elements hidden.html, NONE, 1.2.2.2 tablebreak-tr-title.html, NONE, 1.1.2.2 tr-checkbox.html, NONE, 1.1.2.2 tr-fixed-country.html, NONE, 1.1.2.2 tr-fixed-state.html, NONE, 1.1.2.2 tr-fixed.html, NONE, 1.2.2.2 tr-input-money.html, NONE, 1.1.2.2 tr-input-percentage.html, NONE, 1.1.2.2 tr-input-text.html, NONE, 1.2.2.2 tr-select.html, NONE, 1.1.2.2 tr-td-label.html, NONE, 1.1.2.2
Ivan,,,
ivan at wavetail.420.am
Thu Jan 3 18:23:22 PST 2008
Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail:/tmp/cvs-serv9887
Added Files:
Tag: FREESIDE_1_7_BRANCH
hidden.html tablebreak-tr-title.html tr-checkbox.html
tr-fixed-country.html tr-fixed-state.html tr-fixed.html
tr-input-money.html tr-input-percentage.html
tr-input-text.html tr-select.html tr-td-label.html
Log Message:
reprocussions: backporting elements from HEAD needed for edit.html
--- NEW FILE: tr-input-money.html ---
<% include('tr-input-text.html', @_,
'type' => 'text',
'prefix' => $money_char,
'size' => 8,
)
%>
<%once>
my $conf = new FS::Conf;
my $money_char = $conf->config('money_char') || '$';
</%once>
--- NEW FILE: tr-input-percentage.html ---
<% include('tr-input-text.html', @_,
'type' => 'text',
'postfix' => '%',
'size' => 5, #6? check in IE (not a big deal)
'maxlength' => 7,
'text-align' => 'right',
)
%>
--- NEW FILE: tablebreak-tr-title.html ---
</TABLE>
<TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0>
<% include('tr-title.html', @_ ) %>
--- NEW FILE: tr-checkbox.html ---
<% include('tr-td-label.html', @_ ) %>
<TD <% $style %>>
<INPUT TYPE = "checkbox"
NAME = "<% $opt{field} %>"
ID = "<% $opt{id} %>"
VALUE = "<% $opt{value} %>"
<% $opt{curr_value} eq $opt{value} ? ' CHECKED' : '' %>
<% $onchange %>
>
</TD>
</TR>
<%init>
my %opt = @_;
my $onchange = $opt{'onchange'}
? 'onChange="'. $opt{'onchange'}. '(this)"'
: '';
my $style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : '';
</%init>
--- NEW FILE: tr-select.html ---
<% include('tr-td-label.html', @_ ) %>
<TD <% $style %>>
<SELECT NAME = "<% $opt{field} %>"
ID = "<% $opt{id} %>"
previousValue = "<% $curr_value %>"
previousText = "<% $labels->{$curr_value} || $curr_value %>"
<% $onchange %>
>
% if ( $opt{options} ) {
%
% foreach my $option ( @{ $opt{options} } ) { #just arrayref for now
<OPTION VALUE="<% $option %>"
<% $opt{curr_value} eq $option ? 'SELECTED' : '' %>
>
<% $labels->{$option} || $option %>
</OPTION>
% }
%
% } else { #deprecated weird value hashref used only by reason.html
%
% my $aref = $opt{'value'}->{'values'};
% my $vkey = $opt{'value'}->{'vcolumn'};
% my $ckey = $opt{'value'}->{'ccolumn'};
% foreach my $v (@$aref) {
<OPTION VALUE="<% $v->$vkey %>"
<% ($opt{curr_value} eq $v->$vkey) ? 'SELECTED' : '' %>
>
<% $v->$ckey %>
</OPTION>
% }
%
% }
</SELECT>
</TD>
</TR>
<%init>
my %opt = @_;
my $onchange = $opt{'onchange'}
? 'onChange="'. $opt{'onchange'}. '(this)"'
: '';
my $labels = $opt{'option_labels'} || $opt{'labels'};
my $style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : '';
my $curr_value = $opt{'curr_value'};
</%init>
--- NEW FILE: tr-fixed-country.html ---
<% include('tr-fixed.html', %opt ) %>
<%init>
my %opt = @_;
my $value = $opt{'curr_value'} || $opt{'value'};
$opt{'formatted_value'} = code2country($value). " ($value)";
</%init>
--- NEW FILE: tr-td-label.html ---
<TR>
<TD ALIGN="right" VALIGN="top" STYLE="<% $style %>" ID="<% $opt{label_id} || $opt{id}. '_label0' %>">
<% $opt{label} %>
</TD>
<%init>
my %opt = @_;
my $style = 'padding-top: 3px';
$style .= '; '. $opt{'cell_style'}
if $opt{'cell_style'};
</%init>
--- NEW FILE: tr-input-text.html ---
<% include('tr-td-label.html', @_ ) %>
<TD <% $style %>>
<% $opt{'prefix'} %><INPUT TYPE = "<% $opt{type} || 'text' %>"
NAME = "<% $opt{field} %>"
ID = "<% $opt{id} %>"
VALUE = "<% $value |h %>"
<% $size %>
<% $maxlength %>
<% $align %>
<% $onchange %>
><% $opt{'postfix'} %>
</TD>
</TR>
<%init>
my %opt = @_;
my $value = length($opt{curr_value}) ? $opt{curr_value} : $opt{value};
my $onchange = $opt{'onchange'}
? 'onChange="'. $opt{'onchange'}. '(this)"'
: '';
my $size = $opt{'size'}
? 'SIZE="'. $opt{'size'}. '"'
: '';
my $maxlength = $opt{'maxlength'}
? 'MAXLENGTH="'. $opt{'maxlength'}. '"'
: '';
my $align = $opt{'text-align'}
? 'STYLE="text-align: '. $opt{'text-align'}. '"'
: '';
my $style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : '';
</%init>
--- NEW FILE: hidden.html ---
<INPUT TYPE = "hidden"
NAME = "<% $opt{field} %>"
ID = "<% $opt{field} %>"
VALUE = "<% $opt{curr_value} || $opt{value} |h %>"
>
<%init>
my %opt = @_;
</%init>
--- NEW FILE: tr-fixed-state.html ---
<% include('tr-fixed.html', %opt ) %>
<%init>
my %opt = @_;
my $value = $opt{'curr_value'} || $opt{'value'};
$opt{'formatted_value'} = state_label($value, $opt{'object'}->country);
</%init>
--- NEW FILE: tr-fixed.html ---
<% include('tr-td-label.html', @_ ) %>
<TD BGCOLOR="#dddddd" <% $style %>><% $opt{'formatted_value'} || $opt{'curr_value'} || $opt{'value'} |h %></TD>
</TR>
<% include('hidden.html', %opt ) %>
<%init>
my %opt = @_;
my $style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : '';
</%init>
More information about the freeside-commits
mailing list