summaryrefslogtreecommitdiff
path: root/httemplate/elements/select-cust-fields.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/elements/select-cust-fields.html')
-rw-r--r--httemplate/elements/select-cust-fields.html24
1 files changed, 24 insertions, 0 deletions
diff --git a/httemplate/elements/select-cust-fields.html b/httemplate/elements/select-cust-fields.html
new file mode 100644
index 0000000..98feaf8
--- /dev/null
+++ b/httemplate/elements/select-cust-fields.html
@@ -0,0 +1,24 @@
+%
+% my( $cust_fields, %opt ) = @_;
+%
+% use FS::ConfDefaults;
+% $opt{'avail_fields'} ||= [ FS::ConfDefaults->cust_fields_avail() ];
+%
+% tie my %hash, 'Tie::IxHash', @{ $opt{'avail_fields'} };
+%
+%
+
+
+<SELECT NAME="cust_fields">
+
+ <OPTION VALUE="">(configured default)
+%
+% foreach my $value ( keys %hash ) {
+
+
+ <OPTION VALUE="<% $value %>"><% $hash{$value} %>
+% }
+
+
+</SELECT>
+