Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-12958 In the Authorize enrol plug-in when a credit card expiry da…

…te (year) is entered, a validate error is generated blocking credit card usage
  • Loading branch information...
commit 039afd9b8723a75e6badef1242ad4eb6c5b5a5fb 1 parent 2bd89cd
ethem authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 enrol/authorize/enrol_form.php
View
7 enrol/authorize/enrol_form.php
@@ -56,7 +56,12 @@ function definition()
$monthsmenu[$i] = userdate(gmmktime(12, 0, 0, $i, 15, 2000), "%B");
}
$nowdate = getdate();
- $yearsmenu = array('' => get_string('choose')) + range($nowdate["year"] - 1, $nowdate["year"] + 15);
+ $startyear = $nowdate["year"] - 1;
+ $endyear = $startyear + 20;
+ $yearsmenu = array('' => get_string('choose'));
+ for ($i = $startyear; $i < $endyear; $i++) {
+ $yearsmenu[$i] = $i;
+ }
$ccexpiregrp = array();
$ccexpiregrp[] = &$mform->createElement('select', 'ccexpiremm', '', $monthsmenu);
$ccexpiregrp[] = &$mform->createElement('select', 'ccexpireyyyy', '', $yearsmenu);
Please sign in to comment.
Something went wrong with that request. Please try again.