X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fedit%2Fagent_type.cgi;h=8a6fbc25502bb194cb1132141eeadf7231733058;hb=e39f81dae87d882c0ea4f6f1918fa9cae6d2fc61;hp=944ddd0d02997bd9bbcd3adb936e305f5ee40a45;hpb=c1bb4ddb71147d0571bd301a6d8c452fdf0e1bc9;p=freeside.git diff --git a/httemplate/edit/agent_type.cgi b/httemplate/edit/agent_type.cgi index 944ddd0d0..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'; - -%> - -<%= include("/elements/header.html","$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') %> -