X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fagent.cgi;h=b043d1efe750518036d3fe03c94e5ea96c5a32d8;hb=d04c981b5f72ffadabde71af68022059af0d52a5;hp=46ab5c705f572c37b6903fea846e3cb113d2469d;hpb=2a6aa24137ddd389c1e644f5ece325c5b5dbaf3a;p=freeside.git diff --git a/httemplate/edit/agent.cgi b/httemplate/edit/agent.cgi index 46ab5c705..b043d1efe 100755 --- a/httemplate/edit/agent.cgi +++ b/httemplate/edit/agent.cgi @@ -1,15 +1,30 @@ <% include("/elements/header.html","$action Agent", menubar( - 'Main Menu' => $p, 'View all agents' => $p. 'browse/agent.cgi', )) %> <% include('/elements/error.html') %> -
+ + + + -Agent #<% $agent->agentnum ? $agent->agentnum : "(NEW)" %> -<% &ntable("#cccccc", 2, '') %> + + Agent #<% $agent->agentnum ? $agent->agentnum : "(NEW)" %> + + + @@ -31,17 +46,56 @@ Agent #<% $agent->agentnum ? $agent->agentnum : "(NEW)" %> + + + + +% if ( $conf->exists('selfservice-agent_login') ) { + + + + + + + + + + + +% } else { + + + + +% } + + +% if ( $conf->exists('agent-invoice_template') ) { + <% include('/elements/tr-select-invoice_template.html', 'label' => 'Invoice template', 'field' => 'invoice_template', 'curr_value' => $agent->invoice_template, ) %> - + +% } else { + + + +% } + % if ( $conf->config('ticket_system') ) { % my $default_queueid = $conf->config('ticket_system-default_queueid'); % my $default_queue = FS::TicketSystem->queue($default_queueid); @@ -67,6 +121,56 @@ Agent #<% $agent->agentnum ? $agent->agentnum : "(NEW)" %> % }
Agent
Master customer + <% include('/elements/search-cust_main.html', + 'field_name' => 'agent_custnum', + 'curr_value' => $agent->agent_custnum, + 'find_button' => 1, + ) + %> +
Username
Password
Disable disabled eq 'Y' ? ' CHECKED' : '' %>>
+
+ +<% mt('Access Groups') |h %> + + + + + + +
<% include('/elements/checkboxes-table.html', + 'source_obj' => $agent, + 'link_table' => 'access_groupagent', + 'target_table' => 'access_group', + 'name_col' => 'groupname', + 'target_link' => $p. 'edit/access_group.html?', + ) + %> +
+
+ +<% mt('Commissions') |h %> + + +% #surprising amount of false laziness w/ edit/process/agent.cgi +% my @pkg_class = qsearch('pkg_class', { 'disabled'=>'' }); +% foreach my $pkg_class ( '', @pkg_class ) { +% my %agent_pkg_class = ( 'agentnum' => $agent->agentnum, +% 'classnum' => $pkg_class ? $pkg_class->classnum : '' +% ); +% my $agent_pkg_class = +% qsearchs( 'agent_pkg_class', \%agent_pkg_class ) +% || new FS::agent_pkg_class \%agent_pkg_class; +% my $param = 'classnum'. $agent_pkg_class{classnum}; + + + + + + +% } + +
% + <% $pkg_class ? $pkg_class->classname : mt('(no package class)') |h %> +
+
"> @@ -77,6 +181,9 @@ Agent #<% $agent->agentnum ? $agent->agentnum : "(NEW)" %> <%init> +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + my $agent; if ( $cgi->param('error') ) { $agent = new FS::agent ( { @@ -94,5 +201,3 @@ my $action = $agent->agentnum ? 'Edit' : 'Add'; my $conf = new FS::Conf; - -