diff options
author | Ivan Kohler <ivan@freeside.biz> | 2016-08-25 15:06:45 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2016-08-25 15:06:45 -0700 |
commit | 64aec88c35418b8c630811cdf5afb19b2a1c4299 (patch) | |
tree | 2ebcc93b3ab5d0ab4cd3a9f583d7d727e07f3d07 /httemplate/edit | |
parent | 3fc0a546caf38b444b63744726c5080ce5d9bbbb (diff) |
usability: customer tags with checkboxes instead of a select-multiple
Diffstat (limited to 'httemplate/edit')
-rwxr-xr-x | httemplate/edit/cust_main.cgi | 2 | ||||
-rw-r--r-- | httemplate/edit/cust_main/basics.html | 1 | ||||
-rwxr-xr-x | httemplate/edit/process/cust_main.cgi | 7 |
3 files changed, 7 insertions, 3 deletions
diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index b314d2d6e..3ba1e859b 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -303,8 +303,6 @@ if ( $cgi->param('error') ) { $ss = ''; $stateid = ''; - $cgi->param('tagnum', FS::part_tag->default_tags); - if ( $cgi->param('qualnum') =~ /^(\d+)$/ ) { my $qualnum = $1; my $qual = qsearchs('qual', { 'qualnum' => $qualnum } ) diff --git a/httemplate/edit/cust_main/basics.html b/httemplate/edit/cust_main/basics.html index c3768ac42..a30d7f88c 100644 --- a/httemplate/edit/cust_main/basics.html +++ b/httemplate/edit/cust_main/basics.html @@ -123,6 +123,7 @@ %# tags <& /elements/tr-select-cust_tag.html, 'custnum' => $custnum, + 'default' => { map { $_=>1 } FS::part_tag->default_tags }, 'cgi' => $cgi, &> diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 74f8f2382..2cb1648f7 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -109,7 +109,12 @@ if ( $cgi->param('no_credit_limit') ) { $new->setfield('credit_limit', ''); } -$new->tagnum( [ $cgi->param('tagnum') ] ); +#$new->tagnum( [ $cgi->param('tagnum') ] ); +my $params = $cgi->Vars; +$new->tagnum( [ + map { /^tagnum(\d+)/ && $1 } + grep { /^tagnum(\d+)/ && $cgi->param($_) } keys %$params +] ); $error ||= $new->set_national_id_from_cgi( $cgi ); |