CKeditor API change, #24622
[freeside.git] / httemplate / misc / disable-payment_gateway.cgi
1 %if ( $error ) {
2 %  errorpage($error);
3 %} else {
4 %#<% $cgi->redirect(popurl(2). "browse/payment_gateway.html?showdiabled=$showdisabled") %>
5 <% $cgi->redirect(popurl(2). "browse/payment_gateway.html") %>
6 %}
7 <%init>
8
9 die "access deined"
10   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
11
12 #my $showdisabled = 0;
13 #$cgi->param('showdisabled') =~ /^(\d+)$/ and $showdisabled = $1;
14
15 #$cgi->param('gatewaynum') =~ /^(\d+)$/ or die 'illegal gatewaynum';
16 my($query) = $cgi->keywords;
17 $query =~ /^(\d+)$/ or die 'illegal gatewaynum';
18 my $gatewaynum = $1;
19
20 my $payment_gateway =
21   qsearchs('payment_gateway', { 'gatewaynum' => $gatewaynum } );
22
23 my $error = $payment_gateway->disable;
24
25 </%init>