[freeside-commits] freeside/httemplate/elements
tr-input-beginning_ending.html, 1.5,
1.6 select-cust_pkg-status.html, 1.2, 1.3
Ivan,,,
ivan at wavetail.420.am
Wed Feb 14 00:48:37 PST 2007
Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail:/tmp/cvs-serv419/httemplate/elements
Modified Files:
tr-input-beginning_ending.html select-cust_pkg-status.html
Log Message:
add more options to advanced package reporting
Index: select-cust_pkg-status.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/select-cust_pkg-status.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- select-cust_pkg-status.html 23 Aug 2006 22:25:38 -0000 1.2
+++ select-cust_pkg-status.html 14 Feb 2007 08:48:35 -0000 1.3
@@ -1,20 +1,21 @@
-%
-% my( $status, %opt ) = @_;
-%
-% $opt{'statuses'} ||= [ FS::cust_pkg->statuses() ]; # { disabled=>'' } )
-%
-%
-
-
-<SELECT NAME="status">
+<SELECT NAME="status" <% $opt{'onchange'} %>>
<OPTION VALUE="">all
-% foreach my $status ( @{ $opt{'statuses'} } ) {
-
- <OPTION VALUE="<% $status %>"><% $status %>
+% foreach my $option ( @{ $opt{'statuses'} } ) {
+ <OPTION VALUE="<% $option %>" <% $option eq $status ? 'SELECTED' : '' %>><% $option %>
% }
-
</SELECT>
+<%init>
+ my( $status, %opt ) = @_;
+ $opt{'statuses'} ||= [ FS::cust_pkg->statuses() ]; # { disabled=>'' } )
+
+ if ( exists $opt{'onchange'} && $opt{'onchange'} ) {
+ $opt{'onchange'} = ' onChange="' . $opt{'onchange'}. '"';
+ } else {
+ $opt{'onchange'} = '';
+ }
+
+</%init>
Index: tr-input-beginning_ending.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/tr-input-beginning_ending.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- tr-input-beginning_ending.html 22 Jan 2007 11:36:40 -0000 1.5
+++ tr-input-beginning_ending.html 14 Feb 2007 08:48:35 -0000 1.6
@@ -3,29 +3,33 @@
<SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/calendar-en.js"></SCRIPT>
<SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/calendar-setup.js"></SCRIPT>
-
<TR>
<TD ALIGN="right">From date: </TD>
- <TD><INPUT TYPE="text" NAME="beginning" ID="beginning_text" VALUE="" SIZE=<%$size%> MAXLENGTH=<%$maxlength%>> <IMG SRC="<%$fsurl%>images/calendar.png" ID="beginning_button" STYLE="cursor: pointer" TITLE="Select date"><BR><i>m/d/y<% $time_hint %></i></TD>
+ <TD><INPUT TYPE="text" NAME="<% $opt{prefix} %>beginning" ID="<% $opt{prefix} %>beginning_text" VALUE="" SIZE=<%$size%> MAXLENGTH=<%$maxlength%>> <IMG SRC="<%$fsurl%>images/calendar.png" ID="<% $opt{prefix} %>beginning_button" STYLE="cursor: pointer" TITLE="Select date"><IMG SRC="<%$fsurl%>images/calendar-disabled.png" ID="<% $opt{prefix} %>beginning_disabled" STYLE="display:none"><BR><i>m/d/y<% $time_hint %></i></TD>
<SCRIPT TYPE="text/javascript">
Calendar.setup({
- inputField: "beginning_text",
+ inputField: "<% $opt{prefix} %>beginning_text",
ifFormat: "%m/%d/%Y<% $time_format %>",
- button: "beginning_button",
+ button: "<% $opt{prefix} %>beginning_button",
align: "BR"
<% $input_time %>
});
</SCRIPT>
-</TR>
+% unless ( $opt{layout} =~ /^h/i ) { #horizontal
+
+</TR>
<TR>
+
+% }
+
<TD ALIGN="right">To date: </TD>
- <TD><INPUT TYPE="text" NAME="ending" ID="ending_text" VALUE="" SIZE=<%$size%> MAXLENGTH=<%$maxlength%>> <IMG SRC="<%$fsurl%>images/calendar.png" ID="ending_button" STYLE="cursor: pointer" TITLE="Select date"><BR><i>m/d/y<% $time_hint %></i></TD>
+ <TD><INPUT TYPE="text" NAME="<% $opt{prefix} %>ending" ID="<% $opt{prefix} %>ending_text" VALUE="" SIZE=<%$size%> MAXLENGTH=<%$maxlength%>> <IMG SRC="<%$fsurl%>images/calendar.png" ID="<% $opt{prefix} %>ending_button" STYLE="cursor: pointer" TITLE="Select date"><IMG SRC="<%$fsurl%>images/calendar-disabled.png" ID="<% $opt{prefix} %>ending_disabled" STYLE="display:none"><BR><i>m/d/y<% $time_hint %></i></TD>
<SCRIPT TYPE="text/javascript">
Calendar.setup({
- inputField: "ending_text",
+ inputField: "<% $opt{prefix} %>ending_text",
ifFormat: "%m/%d/%Y<% $time_format %>",
- button: "ending_button",
+ button: "<% $opt{prefix} %>ending_button",
align: "BR"
<% $input_time %>
});
@@ -34,13 +38,18 @@
<TR>
<TD></TD>
- <TD>
+ <TD COLSPAN=<% $opt{layout} =~ /^h/i ? 3 : 1 %>>
<FONT SIZE="-1">(leave one or both dates blank for an open-ended search)</FONT>
</TD>
</TR>
<%init>
+
my %opt = @_;
+
+$opt{prefix} = '' unless defined $opt{prefix};
+$opt{prefix} .= '_' if $opt{prefix};
+
my( $input_time, $time_format, $time_hint ) = ( '', '', '' );
my( $size, $maxlength ) = ( 11, 10 );
if ( $opt{'input_time'} ) {
@@ -50,4 +59,5 @@
$size = 21;
$maxlength = 27;
}
+
</%init>
More information about the freeside-commits
mailing list