X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fagent.cgi;h=2eddd30a471169b1909721c4b811f1a65aca3ce7;hb=3be3194b8429383cf47fde8ea662327a0a60d8b0;hp=a4dcda5e3a781eca83fd8f429fbe9e2ca9be2889;hpb=c14a267229fc0d6f2d2afdebab3bd34d825df2ef;p=freeside.git diff --git a/httemplate/edit/agent.cgi b/httemplate/edit/agent.cgi index a4dcda5e3..2eddd30a4 100755 --- a/httemplate/edit/agent.cgi +++ b/httemplate/edit/agent.cgi @@ -1,20 +1,211 @@ -<% -# +<% 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 +217,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 '