From 860e628d3d0d2ba432d401de5c9d4784c918be54 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 5 Feb 2006 12:27:20 +0000 Subject: [PATCH] payment gateway editing --- FS/FS/option_Common.pm | 2 +- httemplate/browse/payment_gateway.html | 11 +-- httemplate/edit/payment_gateway.html | 103 ++++++++++++++++----------- httemplate/edit/process/payment_gateway.html | 2 +- 4 files changed, 70 insertions(+), 48 deletions(-) diff --git a/FS/FS/option_Common.pm b/FS/FS/option_Common.pm index f258fa1d6..ad3c26958 100644 --- a/FS/FS/option_Common.pm +++ b/FS/FS/option_Common.pm @@ -140,7 +140,7 @@ sub delete { } -=item replace [ HASHREF | OPTION => VALUE ... ] +=item replace OLD_RECORD [ HASHREF | OPTION => VALUE ... ] Replaces the OLD_RECORD with this one in the database. If there is an error, returns the error, otherwise returns false. diff --git a/httemplate/browse/payment_gateway.html b/httemplate/browse/payment_gateway.html index 002932ccd..791906b78 100644 --- a/httemplate/browse/payment_gateway.html +++ b/httemplate/browse/payment_gateway.html @@ -40,10 +40,13 @@ <%= $payment_gateway->disabled ? 'DISABLED' : '' %> <% } %> <%= $payment_gateway->gateway_module %> - <%= !$payment_gateway->disabled - ? ' (disable)' - : '' - %> + + (edit) + <%= !$payment_gateway->disabled + ? '(disable)' + : '' + %> + <%= $payment_gateway->gateway_username %> - diff --git a/httemplate/edit/payment_gateway.html b/httemplate/edit/payment_gateway.html index cf825df00..1eda11249 100644 --- a/httemplate/edit/payment_gateway.html +++ b/httemplate/edit/payment_gateway.html @@ -34,70 +34,89 @@ Gateway #<%= $payment_gateway->gatewaynum || "(NEW)" %> Gateway: - + + <% } else { %> + + + <% } %> - + Username: - + Password: - + Action: Options: - + + + diff --git a/httemplate/edit/process/payment_gateway.html b/httemplate/edit/process/payment_gateway.html index b9e4d47da..42205a02d 100644 --- a/httemplate/edit/process/payment_gateway.html +++ b/httemplate/edit/process/payment_gateway.html @@ -17,7 +17,7 @@ my %options = @options; my $error; if ( $gatewaynum ) { - $error=$new->replace($old); + $error=$new->replace($old, \%options); } else { $error=$new->insert(\%options); $gatewaynum=$new->getfield('gatewaynum'); -- 2.11.0