diff options
author | Ivan Kohler <ivan@freeside.biz> | 2017-05-15 16:18:19 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2017-05-15 16:18:19 -0700 |
commit | 1b3abef9815111c52b1370ba5168a592ae9cfcb0 (patch) | |
tree | cbc008b797c08f16392efd2ae461a7e6cc597c52 /httemplate/elements/select-cust_location.html | |
parent | 24d450cf92a14baa588b71e1eb05e80285486a67 (diff) |
no need for a one-choice "Add new location" location dropdown on prospect add, RT#76000
Diffstat (limited to 'httemplate/elements/select-cust_location.html')
-rw-r--r-- | httemplate/elements/select-cust_location.html | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/httemplate/elements/select-cust_location.html b/httemplate/elements/select-cust_location.html index 29563c50e..24df352ae 100644 --- a/httemplate/elements/select-cust_location.html +++ b/httemplate/elements/select-cust_location.html @@ -1,3 +1,13 @@ +% my @pre_options = $opt{pre_options} ? @{ $opt{pre_options} } : (); +% if ( ! @pre_options +% && ! $cust_main +% && ! $opt{is_optional} +% && ! @{ $opt{cust_location} } +% && $addnew +% ) { + <INPUT NAME="locationnum" ID="locationnum" TYPE="hidden" VALUE="-1"> +% } else { + <SELECT NAME = "locationnum" ID = "locationnum" % if ( $opt{onchange} ) { @@ -6,7 +16,6 @@ > % #false laziness w/select-table.html -% my @pre_options = $opt{pre_options} ? @{ $opt{pre_options} } : (); % while ( @pre_options ) { % my $pre_opt = shift(@pre_options); % my $pre_label = shift(@pre_options); @@ -48,6 +57,7 @@ % } </SELECT> +% } <%init> my $conf = new FS::Conf; |