diff options
author | ivan <ivan> | 2006-08-23 22:25:39 +0000 |
---|---|---|
committer | ivan <ivan> | 2006-08-23 22:25:39 +0000 |
commit | 3ce7691203a7737406bf2d4442f7fd84b81f847e (patch) | |
tree | 90658b097da96772224f04771888ac6ca1a940aa /httemplate/edit/process/payment_gateway.html | |
parent | 15e561850b61b10a92a46d8f3e316d53d4970087 (diff) |
Will things ever be the same again?
It's the final masonize
Diffstat (limited to 'httemplate/edit/process/payment_gateway.html')
-rw-r--r-- | httemplate/edit/process/payment_gateway.html | 65 |
1 files changed, 33 insertions, 32 deletions
diff --git a/httemplate/edit/process/payment_gateway.html b/httemplate/edit/process/payment_gateway.html index 42205a02d..0b7e31395 100644 --- a/httemplate/edit/process/payment_gateway.html +++ b/httemplate/edit/process/payment_gateway.html @@ -1,33 +1,34 @@ -<% +% +% +%my $gatewaynum = $cgi->param('gatewaynum'); +% +%my $old = qsearchs('payment_gateway',{'gatewaynum'=>$gatewaynum}) if $gatewaynum; +% +%my $new = new FS::payment_gateway ( { +% map { +% $_, scalar($cgi->param($_)); +% } fields('payment_gateway') +%} ); +% +%my @options = split(/\r?\n/, $cgi->param('gateway_options') ); +%pop @options +% if scalar(@options) % 2 && $options[-1] =~ /^\s*$/; +%my %options = @options; +% +%my $error; +%if ( $gatewaynum ) { +% $error=$new->replace($old, \%options); +%} else { +% $error=$new->insert(\%options); +% $gatewaynum=$new->getfield('gatewaynum'); +%} +% +%if ( $error ) { +% $cgi->param('error', $error); +% print $cgi->redirect(popurl(2). "payment_gateway.html?". $cgi->query_string ); +%} else { +% print $cgi->redirect(popurl(3). "browse/payment_gateway.html"); +%} +% +% -my $gatewaynum = $cgi->param('gatewaynum'); - -my $old = qsearchs('payment_gateway',{'gatewaynum'=>$gatewaynum}) if $gatewaynum; - -my $new = new FS::payment_gateway ( { - map { - $_, scalar($cgi->param($_)); - } fields('payment_gateway') -} ); - -my @options = split(/\r?\n/, $cgi->param('gateway_options') ); -pop @options - if scalar(@options) % 2 && $options[-1] =~ /^\s*$/; -my %options = @options; - -my $error; -if ( $gatewaynum ) { - $error=$new->replace($old, \%options); -} else { - $error=$new->insert(\%options); - $gatewaynum=$new->getfield('gatewaynum'); -} - -if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "payment_gateway.html?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "browse/payment_gateway.html"); -} - -%> |