Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Better handling of forms and configs.

  • Loading branch information...
commit c8716d80e2e525ca64785e56d142d4f49d3adcaf 1 parent e3949d0
ethem authored
Showing with 6 additions and 5 deletions.
  1. +4 −3 enrol/authorize/config.html
  2. +2 −2 enrol/authorize/enrol.html
View
7 enrol/authorize/config.html
@@ -133,10 +133,10 @@
<tr valign="top">
<td align="right">an_acceptmethods:</td>
<td><?php print_string("adminacceptmethods", "enrol_authorize") ?><br /><?php
- $allpaymentmethods = get_list_of_payment_methods(true);
$paymentmethodsenabled = get_list_of_payment_methods();
+ $allpaymentmethods = get_list_of_payment_methods(true);
foreach ($allpaymentmethods as $key) {
- print_checkbox('acceptmethods[]', $key, in_array($key, $paymentmethodsenabled), get_string('method'.strtolower($key),'enrol_authorize')); echo "<br />\n";
+ print_checkbox('acceptmethods[]', $key, in_array($key, $paymentmethodsenabled), get_string('method'.$key,'enrol_authorize')); echo "<br />\n";
}
?><br /></td>
</tr>
@@ -144,9 +144,10 @@
<tr valign="top">
<td align="right">an_acceptccs:</td>
<td><?php print_string("adminacceptccs", "enrol_authorize") ?><br /><?php
+ $acceptedccs = array_keys(get_list_of_creditcards());
$allccs = get_list_of_creditcards(true);
foreach ($allccs as $key => $val) {
- print_checkbox('acceptccs[]', $key, stristr($CFG->an_acceptccs, $key) !== false, $val); echo "<br />\n";
+ print_checkbox('acceptccs[]', $key, in_array($key, $acceptedccs), $val); echo "<br />\n";
}
?><br /></td>
</tr>
View
4 enrol/authorize/enrol.html
@@ -32,7 +32,7 @@
global $CFG, $USER;
$formvars = array(
- 'password', 'ccaddress', 'cccity', 'ccstate', 'cccountry', 'cczip',
+ 'ccaddress', 'cccity', 'ccstate', 'cccountry', 'cczip',
'ccfirstname', 'cclastname', 'cc', 'ccexpiremm', 'ccexpireyyyy', 'cctype', 'cvv'
);
foreach ($formvars as $var) {
@@ -147,7 +147,7 @@
global $form, $course;
global $CFG, $USER;
- $formvars = array('password', 'abacode', 'accnum', 'acctype', 'bankname', 'firstname', 'lastname');
+ $formvars = array('abacode', 'accnum', 'acctype', 'bankname', 'firstname', 'lastname');
foreach ($formvars as $var) {
if (!isset($form->$var)) {
$form->$var = '';
Please sign in to comment.
Something went wrong with that request. Please try again.