oops another missing file
authorivan <ivan>
Thu, 18 Aug 2005 05:12:02 +0000 (05:12 +0000)
committerivan <ivan>
Thu, 18 Aug 2005 05:12:02 +0000 (05:12 +0000)
httemplate/edit/process/payment_gateway.html [new file with mode: 0644]

diff --git a/httemplate/edit/process/payment_gateway.html b/httemplate/edit/process/payment_gateway.html
new file mode 100644 (file)
index 0000000..0fc5b66
--- /dev/null
@@ -0,0 +1,28 @@
+<%
+
+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 $error;
+if ( $gatewaynum ) {
+  $error=$new->replace($old);
+} else {
+  $error=$new->insert;
+  $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");
+}
+
+%>