From 131a7ca81bee09e037c1325d42e4051fbf1a40bc Mon Sep 17 00:00:00 2001 From: ethem Date: Mon, 4 Sep 2006 12:09:30 +0000 Subject: [PATCH] New config: Echeck bank account types enabled. --- enrol/authorize/config.html | 41 ++++++++++++++++++++++++------------- enrol/authorize/enrol.php | 3 ++- 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/enrol/authorize/config.html b/enrol/authorize/config.html index f7befc65d8..2a774a8dec 100755 --- a/enrol/authorize/config.html +++ b/enrol/authorize/config.html @@ -40,6 +40,11 @@ if (!isset($frm->acceptccs)) { $CFG->an_acceptccs = implode(',', $frm->acceptccs); } +if (!isset($frm->acceptechecktypes)) { + $frm->acceptechecktypes = get_list_of_bank_account_types(); + $CFG->an_acceptechecktypes = implode(',', $frm->acceptechecktypes); +} + ?> @@ -131,23 +136,31 @@ if (!isset($frm->acceptccs)) { - - + - - - - - diff --git a/enrol/authorize/enrol.php b/enrol/authorize/enrol.php index cb17f24c46..6d771380fd 100755 --- a/enrol/authorize/enrol.php +++ b/enrol/authorize/enrol.php @@ -554,9 +554,10 @@ class enrolment_plugin_authorize $acceptmethods = optional_param('acceptmethods', get_list_of_payment_methods(), PARAM_ALPHA); set_config('an_acceptmethods', implode(',', $acceptmethods)); - $acceptccs = optional_param('acceptccs', array_keys(get_list_of_creditcards()), PARAM_ALPHA); set_config('an_acceptccs', implode(',', $acceptccs)); + $acceptechecktypes = optional_param('acceptechecktypes', get_list_of_bank_account_types(), PARAM_ALPHA); + set_config('an_acceptechecktypes', implode(',', $acceptechecktypes)); $cutoff_hour = optional_param('an_cutoff_hour', 0, PARAM_INT); $cutoff_min = optional_param('an_cutoff_min', 5, PARAM_INT); -- 2.39.5
an_acceptmethods:
accepts:


\n"; - } - ?>
an_acceptccs:
$val) { - print_checkbox('acceptccs[]', $key, in_array($key, $acceptedccs), $val); echo "
\n"; + if ($key == AN_METHOD_CC) { + print_checkbox('acceptmethods[]', AN_METHOD_CC, in_array(AN_METHOD_CC, $paymentmethodsenabled), get_string('method'.AN_METHOD_CC,'enrol_authorize')); + echo("
"); + $acceptedccs = array_keys(get_list_of_creditcards()); + $allccs = get_list_of_creditcards(true); + foreach ($allccs as $key => $val) { + print_checkbox('acceptccs[]', $key, in_array($key, $acceptedccs), $val); echo "
\n"; + } + echo("
"); + } + elseif ($key == AN_METHOD_ECHECK) { + print_checkbox('acceptmethods[]', AN_METHOD_ECHECK, in_array(AN_METHOD_ECHECK, $paymentmethodsenabled), get_string('method'.AN_METHOD_ECHECK,'enrol_authorize')); + echo("
"); + $echecktypesenabled = get_list_of_bank_account_types(); + $allechecktypes = get_list_of_bank_account_types(true); + foreach ($allechecktypes as $key) { + print_checkbox('acceptechecktypes[]', $key, in_array($key, $echecktypesenabled), get_string('echeck'.strtolower($key),'enrol_authorize')); echo "
\n"; + } + echo("
"); + } } ?>