X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main%2Ftop_misc.html;h=7ce283c6c495cf1489e3a8518c2349ee6b2e1f46;hb=5a204201503f8e0db6087db6e53b84297cbc739a;hp=575b73727b9f7c8d2ab746853e2ed9d038916630;hpb=d0c5ddbd31af8b1747d447f31623e1af05961eb4;p=freeside.git diff --git a/httemplate/edit/cust_main/top_misc.html b/httemplate/edit/cust_main/top_misc.html index 575b73727..7ce283c6c 100644 --- a/httemplate/edit/cust_main/top_misc.html +++ b/httemplate/edit/cust_main/top_misc.html @@ -1,4 +1,42 @@ -<% &ntable("#cccccc") %> + + + + + + + + + + + + +% foreach my $field ($cust_main->virtual_fields) { + <% $cust_main->pvf($field)->widget('HTML', 'edit',$cust_main->getfield($field)) %> +% } %# tags <& /elements/tr-select-cust_tag.html, @@ -108,6 +146,30 @@ &> % } +% # permission to edit ticket subjects +% if ( $conf->exists('ticket_system-selfservice_edit_subject') ) { + + + + +% } else { + +% } + +% # permission to edit +% if ( $conf->exists('cust_main-edit_calling_list_exempt') ) { + + + + +% } else { + +% } +
Residentialresidential_commercial eq 'Commercial' ? '' : 'CHECKED' %> + >
Commercialresidential_commercial eq 'Commercial' ? 'CHECKED' : '' %> + >
+ edit_subject ? 'CHECKED' : '' %>><% mt('Can edit ticket subjects') |h %>
+ calling_list_exempt ? 'CHECKED' : '' %>><% mt('Calling list exempt') |h %>
<%init> @@ -116,6 +178,23 @@ my( $cust_main, %opt ) = @_; my $custnum = $opt{'custnum'}; +if ( $cgi->param('error') ) { + $cust_main->set('residential_commercial', + ($cgi->param('residential_commercial') eq 'Commercial') + ? 'Commercial' + : 'Residential' + ); +} elsif ( $custnum ) { #editing + $cust_main->set('residential_commercial', + length($cust_main->company) + ? 'Commercial' + : 'Residential' + ); +} else { #new customer + #config to default to commercial and/or disable residential when someone needs + $cust_main->set('residential_commercial', 'Residential'); +} + my $conf = new FS::Conf; my $curuser = $FS::CurrentUser::CurrentUser;