summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorivan <ivan>2008-06-18 05:27:15 +0000
committerivan <ivan>2008-06-18 05:27:15 +0000
commit2ff5aac65083fa8fe6a573f3704d3c1ae0123e55 (patch)
tree82713b1a5b3c4fafa9c2827c6902a9109488eab6 /httemplate
parent19186dc87def6367e0e88f9d3c2a651fb7e88826 (diff)
and lastly, add select-cust_main-status.html to _1_7_BRANCH
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/elements/select-cust_main-status.html30
1 files changed, 30 insertions, 0 deletions
diff --git a/httemplate/elements/select-cust_main-status.html b/httemplate/elements/select-cust_main-status.html
new file mode 100644
index 000000000..2e0b6cb24
--- /dev/null
+++ b/httemplate/elements/select-cust_main-status.html
@@ -0,0 +1,30 @@
+<SELECT NAME="<% $opt{'field'} || 'status' %>"
+ <% $opt{'multiple'} ? 'MULTIPLE' : '' %>
+ <% $onchange %>
+>
+
+ <OPTION VALUE="">all
+
+% foreach my $option ( @{ $opt{'statuses'} } ) {
+
+ <OPTION VALUE="<% $option %>"
+ <% $option eq $curr_value ? 'SELECTED' : '' %>
+ ><% $option %>
+
+% }
+
+</SELECT>
+
+<%init>
+
+my %opt = @_;
+
+$opt{'statuses'} ||= [ FS::cust_main->statuses() ]; # { disabled=>'' } )
+
+my $onchange = $opt{'onchange'}
+ ? 'onChange="'. $opt{'onchange'}. '(this)"'
+ : '';
+
+my $curr_value = $opt{'curr_value'} || $opt{'value'};
+
+</%init>