From: ivan Date: Sun, 10 Oct 2010 00:26:33 +0000 (+0000) Subject: add lock_agentnum and lock_pkgpart parameters to new customer page, RT#9782 X-Git-Tag: freeside_1_9_5~17 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=2f0ff297f42947c17bff651297bd0295232d03f2 add lock_agentnum and lock_pkgpart parameters to new customer page, RT#9782 --- diff --git a/httemplate/edit/cust_main/first_pkg/select-part_pkg.html b/httemplate/edit/cust_main/first_pkg/select-part_pkg.html index 871e1cdee..20f0e1982 100644 --- a/httemplate/edit/cust_main/first_pkg/select-part_pkg.html +++ b/httemplate/edit/cust_main/first_pkg/select-part_pkg.html @@ -147,7 +147,9 @@ foreach my $part_pkg ( @part_pkg ) { $layermap{$pkgpart_svcpart} = $svcdb{$pkgpart}; } -my @options = ( '', map $pkgpart_svcpart{ $_->pkgpart }, @part_pkg ); +my @options = (); +push @options, '' unless $opt{'disable_empty'}; +push @options, map $pkgpart_svcpart{ $_->pkgpart }, @part_pkg; my %labels = ( '' => ( $opt{'empty_label'} || '(none)' ), map { $pkgpart_svcpart{ $_->pkgpart } => $_->pkg_comment } @part_pkg diff --git a/httemplate/edit/cust_main/top_misc.html b/httemplate/edit/cust_main/top_misc.html index cec24bd09..6ad4023ca 100644 --- a/httemplate/edit/cust_main/top_misc.html +++ b/httemplate/edit/cust_main/top_misc.html @@ -8,13 +8,29 @@ %> %# agent -<% include('/elements/tr-select-agent.html', - 'curr_value' => $cust_main->agentnum, - 'label' => "${r}Agent", - 'empty_label' => 'Select agent', - 'disable_empty' => ( $cust_main->agentnum ? 1 : 0 ), - ) -%> +% if ( $cgi->param('lock_agentnum') =~ /^(\d+)$/ && $curuser->agentnum($1) ) { +% +% my $agentnum = $1; +% $cust_main->agentnum($agentnum); + + + + + Agent + <% $cust_main->agent->agent |h %> + + +% } else { + + <% include('/elements/tr-select-agent.html', + 'curr_value' => $cust_main->agentnum, + 'label' => "${r}Agent", + 'empty_label' => 'Select agent', + 'disable_empty' => ( $cust_main->agentnum ? 1 : 0 ), + ) + %> + +% } %# agent_custid % if ( $conf->exists('cust_main-edit_agent_custid') ) { diff --git a/httemplate/elements/freeside.css b/httemplate/elements/freeside.css index c310e2fa0..da93f2ba8 100644 --- a/httemplate/elements/freeside.css +++ b/httemplate/elements/freeside.css @@ -14,3 +14,14 @@ a:link, a:visited { /* a:focus { background-color: #ccccee } */ +/* 2.1 look, whatever */ +.fsdisabled { + background-color: #dddddd; + color: #666666; + border: 1px solid #999999; + padding: 1px; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + border-radius: 2px; +} +