diff options
author | ivan <ivan> | 2006-11-14 04:04:33 +0000 |
---|---|---|
committer | ivan <ivan> | 2006-11-14 04:04:33 +0000 |
commit | 2f015c66aeb24d3c7a9ea2e10bb5a22e94d5a8f4 (patch) | |
tree | 258649380b78933f2474d1e379035f090e73bcea /httemplate | |
parent | 6d891eee72cf63362601e0823c52c6e9a4aed826 (diff) |
working agent gateway override delete link
Diffstat (limited to 'httemplate')
-rwxr-xr-x | httemplate/browse/agent.cgi | 2 | ||||
-rw-r--r-- | httemplate/misc/delete-agent_payment_gateway.cgi | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/httemplate/browse/agent.cgi b/httemplate/browse/agent.cgi index 001e6ba50..4d2252821 100755 --- a/httemplate/browse/agent.cgi +++ b/httemplate/browse/agent.cgi @@ -347,7 +347,7 @@ Unused ? ' for '. $override->taxclass. ' only' : '' %> - <FONT SIZE=-1><A HREF="<%$p%>misc/delete-agent_payment_gateway.cgi?<% 'XXXoverridenum' %>">(delete)</A></FONT> + <FONT SIZE=-1><A HREF="<%$p%>misc/delete-agent_payment_gateway.cgi?<% $override->agentgatewaynum %>">(delete)</A></FONT> </TD> </TR> % } diff --git a/httemplate/misc/delete-agent_payment_gateway.cgi b/httemplate/misc/delete-agent_payment_gateway.cgi new file mode 100644 index 000000000..fb0f1e4b8 --- /dev/null +++ b/httemplate/misc/delete-agent_payment_gateway.cgi @@ -0,0 +1,15 @@ +% die "you don't have the 'Configuration' access right" +% unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); +% +% my($query) = $cgi->keywords; +% $query =~ /^(\d+)$/ || die "Illegal agentgatewaynum"; +% my $agentgatewaynum = $1; +% +% my $agent_payment_gateway = qsearchs('agent_payment_gateway', { +% 'agentgatewaynum' => $agentgatewaynum, +% }); +% +% my $error = $agent_payment_gateway->delete; +% eidiot($error) if $error; +% +% print $cgi->redirect($p. "browse/agent.cgi"); |