summaryrefslogtreecommitdiff
path: root/httemplate/elements/select-cust_main-status.html
diff options
context:
space:
mode:
authorivan <ivan>2007-08-01 22:26:52 +0000
committerivan <ivan>2007-08-01 22:26:52 +0000
commiteb4ff7f73c5d4bdf74a3472448b5a195598ff4cd (patch)
treebb38241e8c865c3bca861da7749071feeadd2b5b /httemplate/elements/select-cust_main-status.html
parent32b5d3a31f112a381f0a15ac5e3a2204242f3405 (diff)
event refactor, landing on HEAD!
Diffstat (limited to 'httemplate/elements/select-cust_main-status.html')
-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>