X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fagent.cgi;h=6707d66a4ba91d01a9199c0458937bccb3da2102;hp=449456cdd7efc1e7d5fc6a79d5b7815b79c0e4e0;hb=9324c64e784a866c4d615773c8ce5970cc0d6ed8;hpb=a63b2729682586d8860290576e9307629424dbe0 diff --git a/httemplate/edit/agent.cgi b/httemplate/edit/agent.cgi index 449456cdd..6707d66a4 100755 --- a/httemplate/edit/agent.cgi +++ b/httemplate/edit/agent.cgi @@ -1,5 +1,148 @@ - -<% +<% include("/elements/header.html","$action Agent", menubar( + 'View all agents' => $p. 'browse/agent.cgi', +)) %> + +<% include('/elements/error.html') %> + +
+ + + + +Agent #<% $agent->agentnum ? $agent->agentnum : "(NEW)" %> + +<% &ntable("#cccccc", 2, '') %> + + + Agent + + + + + Agent type + + + + + + + Master customer + + <% include('/elements/search-cust_main.html', + 'field_name' => 'agent_custnum', + 'curr_value' => $agent->agent_custnum, + 'find_button' => 1, + ) + %> + + + +% if ( $conf->exists('selfservice-agent_login') ) { + + + Username + + + + + Password + + + +% } else { + + + + +% } + + + Disable + disabled eq 'Y' ? ' CHECKED' : '' %>> + + +% 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); +% $default_queue = "(default) $default_queueid: $default_queue" +% if $default_queueid; +% my %queues = FS::TicketSystem->queues(); +% my @queueids = sort { $a <=> $b } keys %queues; +% + + + Ticketing queue + + + + +% } + + + Access Groups + <% 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?', + ) + %> + + + + + +
+"> + +
+ +<% include('/elements/footer.html') %> + +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); my $agent; if ( $cgi->param('error') ) { @@ -14,61 +157,7 @@ if ( $cgi->param('error') ) { $agent = new FS::agent {}; } my $action = $agent->agentnum ? 'Edit' : 'Add'; -my $hashref = $agent->hashref; - -print header("$action Agent", menubar( - 'Main Menu' => $p, - 'View all agents' => $p. 'browse/agent.cgi', -)); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print '
', - qq!!, - "Agent #", $hashref->{agentnum} ? $hashref->{agentnum} : "(NEW)"; - -print &ntable("#cccccc", 2, ''), < - Agent - - - - Agent type - - - - - - - -END - -print qq!
!; -print < - - -END +my $conf = new FS::Conf; -%> +