summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorivan <ivan>2010-10-10 00:26:24 +0000
committerivan <ivan>2010-10-10 00:26:24 +0000
commitb76d8cd6704292a90d71bfea31859ed22e2fa23f (patch)
tree6e68bd327d7205b1c394b041eb2d88d0606f8740 /httemplate
parent6889413a55f87e4b7f6b6637773f87a0de52b3b4 (diff)
add lock_agentnum and lock_pkgpart parameters to new customer page, RT#9782
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/edit/cust_main/first_pkg/select-part_pkg.html4
-rw-r--r--httemplate/edit/cust_main/top_misc.html32
-rw-r--r--httemplate/elements/freeside.css10
3 files changed, 37 insertions, 9 deletions
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 441a36334..a2381f368 100644
--- a/httemplate/edit/cust_main/top_misc.html
+++ b/httemplate/edit/cust_main/top_misc.html
@@ -8,14 +8,30 @@
%>
%# agent
-<% include('/elements/tr-select-agent.html',
- 'curr_value' => $cust_main->agentnum,
- 'label' => "<B>${r}Agent</B>",
- 'empty_label' => 'Select agent',
- 'disable_empty' => ( $cust_main->agentnum ? 1 : 0 ),
- 'viewall_right' => 'None', #override default 'View customers of all agents'
- )
-%>
+% if ( $cgi->param('lock_agentnum') =~ /^(\d+)$/ && $curuser->agentnum($1) ) {
+%
+% my $agentnum = $1;
+% $cust_main->agentnum($agentnum);
+
+ <INPUT TYPE="hidden" NAME="lock_agentnum" VALUE="<% $agentnum %>">
+ <INPUT TYPE="hidden" NAME="agentnum" VALUE="<% $agentnum %>">
+ <TR>
+ <TD ALIGN="right">Agent</TD>
+ <TD CLASS="fsdisabled"><% $cust_main->agent->agent |h %></TD>
+ </TR>
+
+% } else {
+
+ <% include('/elements/tr-select-agent.html',
+ 'curr_value' => $cust_main->agentnum,
+ 'label' => "<B>${r}Agent</B>",
+ 'empty_label' => 'Select agent',
+ 'disable_empty' => ( $cust_main->agentnum ? 1 : 0 ),
+ 'viewall_right' => 'None', #override default 'View customers of all agents'
+ )
+ %>
+
+% }
%# agent_custid
% if ( $conf->exists('cust_main-edit_agent_custid') ) {
diff --git a/httemplate/elements/freeside.css b/httemplate/elements/freeside.css
index 18b14e395..6cb15030b 100644
--- a/httemplate/elements/freeside.css
+++ b/httemplate/elements/freeside.css
@@ -40,6 +40,16 @@ textarea:focus, input[type="text"]:focus, input[type="password"]:focus {
border-radius: 2px;
}
+.fsdisabled {
+ background-color: #dddddd;
+ color: #666666;
+ border: 1px solid #999999;
+ padding: 1px;
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+ border-radius: 2px;
+}
+
input[type="reset"], input[type="submit"], input[type="button"] {
background-color: #dddddd;
border: 1px solid #666666;