X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fagent.cgi;h=c4963e4701a1cc36384759b89026450f954f0d49;hb=bd115bbb7ee8b1f8568d026caceb95ae18c80e87;hp=a4dcda5e3a781eca83fd8f429fbe9e2ca9be2889;hpb=c14a267229fc0d6f2d2afdebab3bd34d825df2ef;p=freeside.git diff --git a/httemplate/edit/agent.cgi b/httemplate/edit/agent.cgi index a4dcda5e3..c4963e470 100755 --- a/httemplate/edit/agent.cgi +++ b/httemplate/edit/agent.cgi @@ -1,20 +1,187 @@ -<% -# +<% include("/elements/header.html","$action Agent", menubar( + 'View all agents' => $p. 'browse/agent.cgi', +)) %> + +<% include('/elements/error.html') %> + +
+ +<% include('/elements/footer.html') %> + +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +my $agent; if ( $cgi->param('error') ) { $agent = new FS::agent ( { map { $_, scalar($cgi->param($_)) } fields('agent') @@ -26,64 +193,8 @@ if ( $cgi->param('error') ) { } else { #adding $agent = new FS::agent {}; } -$action = $agent->agentnum ? 'Edit' : 'Add'; -$hashref = $agent->hashref; - -$p = popurl(2); - -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 '