753bc763cd5301d4921ff634a839dc9560b7f2a2
[freeside.git] / httemplate / edit / agent_payment_gateway.html
1 <% include("/elements/header.html","$action payment gateway override for ". $agent->agent,  menubar(
2   #'View all payment gateways' => $p. 'browse/payment_gateway.html',
3   'View all agents' => $p. 'browse/agent.cgi',
4 )) %>
5
6 <% include('/elements/error.html') %>
7
8 <FORM ACTION="<%popurl(1)%>process/agent_payment_gateway.html" METHOD=POST>
9 <INPUT TYPE="hidden" NAME="agentnum" VALUE="<% $agent->agentnum %>">
10
11 Use gateway <SELECT NAME="gatewaynum">
12 % foreach my $payment_gateway (
13 %      qsearch('payment_gateway', { 'disabled' => '' } )
14 %    ) {
15 %
16
17   <OPTION VALUE="<% $payment_gateway->gatewaynum %>"><% $payment_gateway->gateway_module %> (<% $payment_gateway->gateway_username %>)
18 % } 
19
20 </SELECT>
21 <BR><BR>
22
23 <INPUT TYPE="submit" VALUE="Add gateway override">
24 </FORM>
25
26 <% include('/elements/footer.html') %>
27
28 <%init>
29
30 die "access denied"
31   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
32
33 $cgi->param('agentnum') =~ /(\d+)$/ or die "illegal agentnum";
34 my $agent = qsearchs('agent', { 'agentnum' => $1 } );
35 die "agentnum $1 not found" unless $agent;
36
37 #my @agent_payment_gateway;
38 if ( $cgi->param('error') ) {
39 }
40
41 my $action = 'Add';
42
43 </%init>