X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fagent_type.cgi;h=8a6fbc25502bb194cb1132141eeadf7231733058;hb=40f436877b2334fc2d4fd34c50d54807ae8777af;hp=5addbbd4c938548792cf2141bae945cdddd3bc24;hpb=4b7604d67c78a6507fa52dbd2d476c037a0b723d;p=freeside.git diff --git a/httemplate/edit/agent_type.cgi b/httemplate/edit/agent_type.cgi index 5addbbd4c..8a6fbc255 100755 --- a/httemplate/edit/agent_type.cgi +++ b/httemplate/edit/agent_type.cgi @@ -1,75 +1,57 @@ -<% - -my($agent_type); -if ( $cgi->param('error') ) { - $agent_type = new FS::agent_type ( { - map { $_, scalar($cgi->param($_)) } fields('agent') - } ); -} elsif ( $cgi->keywords ) { #editing - my( $query ) = $cgi->keywords; - $query =~ /^(\d+)$/; - $agent_type=qsearchs('agent_type',{'typenum'=>$1}); -} else { #adding - $agent_type = new FS::agent_type {}; -} -my $action = $agent_type->typenum ? 'Edit' : 'Add'; - -%> - -<%= header("$action Agent Type", menubar( - 'Main Menu' => "$p", +<% include("/elements/header.html","$action Agent Type", menubar( 'View all agent types' => "${p}browse/agent_type.cgi", )) %> -<% if ( $cgi->param('error') ) { %> - Error: <%= $cgi->param('error') %> -<% } %> +<% include('/elements/error.html') %> -
-<% } %> +<% include('/elements/footer.html') %> -