move header() to include(/elements/header.html) so it can be changed in one place...
[freeside.git] / httemplate / edit / agent_payment_gateway.html
1 <%
2
3 $cgi->param('agentnum') =~ /(\d+)$/ or die "illegal agentnum";
4 my $agent = qsearchs('agent', { 'agentnum' => $1 } );
5 die "agentnum $1 not found" unless $agent;
6
7 #my @agent_payment_gateway;
8 if ( $cgi->param('error') ) {
9 }
10
11 my $action = 'Add';
12
13 %>
14
15 <%= include("/elements/header.html","$action payment gateway override for ". $agent->agent,  menubar(
16   'Main Menu' => $p,
17   #'View all payment gateways' => $p. 'browse/payment_gateway.html',
18   'View all agents' => $p. 'browse/agent.html',
19 )) %>
20
21 <% if ( $cgi->param('error') ) { %>
22 <FONT SIZE="+1" COLOR="#ff0000">Error: <%= $cgi->param('error') %></FONT>
23 <% } %>
24
25 <FORM ACTION="<%=popurl(1)%>process/agent_payment_gateway.html" METHOD=POST>
26 <INPUT TYPE="hidden" NAME="agentnum" VALUE="<%= $agent->agentnum %>">
27
28 Use gateway <SELECT NAME="gatewaynum">
29 <% foreach my $payment_gateway (
30       qsearch('payment_gateway', { 'disabled' => '' } )
31     ) {
32 %>
33   <OPTION VALUE="<%= $payment_gateway->gatewaynum %>"><%= $payment_gateway->gateway_module %> (<%= $payment_gateway->gateway_username %>)
34 <% } %>
35 </SELECT>
36 <BR><BR>
37
38 for <SELECT NAME="cardtype" MULTIPLE>
39 <% foreach my $cardtype (
40   "",
41   "VISA card",
42   "MasterCard",
43   "Discover card",
44   "American Express card",
45   "Diner's Club/Carte Blanche",
46   "enRoute",
47   "JCB",
48   "BankCard",
49   "Switch",
50   "Solo",
51   'ACH',
52 ) { %>
53   <OPTION VALUE="<%= $cardtype %>"><%= $cardtype || '(Default fallback)' %>
54 <% } %>
55 </SELECT>
56 <BR><BR>
57
58 (optional) when invoice contains only items of taxclass <INPUT TYPE="text" NAME="taxclass">
59 <BR><BR>
60
61 <INPUT TYPE="submit" VALUE="Add gateway override">
62 </FORM>
63 </BODY>
64 </HTML>