Skip to content
Browse files

Renamed some form fields.

  • Loading branch information...
1 parent f6f7523 commit d810bd41cbbdf276dc5f1f77ee701b6457e56173 ethem committed Nov 17, 2006
Showing with 9 additions and 9 deletions.
  1. +5 −5 enrol/authorize/enrol.html
  2. +4 −4 enrol/authorize/enrol.php
View
10 enrol/authorize/enrol.html
@@ -2,7 +2,7 @@
enrolment_plugin_authorize::prevent_double_paid($course);
$formvars = array('password', 'ccaddress', 'cccity', 'ccstate', 'cccountry', 'cczip',
- 'ccfirstname', 'cclastname', 'cc', 'ccexpiremm', 'ccexpireyyyy', 'cctype', 'cvv');
+ 'firstname', 'lastname', 'cc', 'ccexpiremm', 'ccexpireyyyy', 'cctype', 'cvv');
foreach ($formvars as $var) {
if (!isset($form->$var)) {
@@ -11,8 +11,8 @@
}
$curcost = enrolment_plugin_authorize::get_course_cost($course);
-$userfirstname = empty($form->ccfirstname) ? $USER->firstname : $form->ccfirstname;
-$userlastname = empty($form->cclastname) ? $USER->lastname : $form->cclastname;
+$userfirstname = empty($form->firstname) ? $USER->firstname : $form->firstname;
+$userlastname = empty($form->lastname) ? $USER->lastname : $form->lastname;
$useraddress = empty($form->ccaddress) ? $USER->address : $form->ccaddress;
$usercity = empty($form->cccity) ? $USER->city : $form->cccity;
$usercountry = empty($form->cccountry) ? $USER->country : $form->cccountry;
@@ -37,8 +37,8 @@
</tr>
<tr>
<td align="right"><?php print_string("nameoncard", "enrol_authorize") ?>: </td>
- <td align="left"><input type="text" name="ccfirstname" size="8" value="<?php p($userfirstname) ?>" />
- <input type="text" name="cclastname" size="8" value="<?php p($userlastname) ?>" />
+ <td align="left"><input type="text" name="firstname" size="8" value="<?php p($userfirstname) ?>" />
+ <input type="text" name="lastname" size="8" value="<?php p($userlastname) ?>" />
<?php if (!empty($this->ccerrors['ccfirstlast'])) { formerr($this->ccerrors['ccfirstlast']); } ?></td>
</tr>
<tr>
View
8 enrol/authorize/enrol.php
@@ -163,7 +163,7 @@ function cc_submit($form, $course)
$timenow = time();
$order = new stdClass();
$order->cclastfour = substr($form->cc, -4);
- $order->ccname = $form->ccfirstname . " " . $form->cclastname;
+ $order->ccname = $form->firstname . " " . $form->lastname;
$order->courseid = $course->id;
$order->userid = $USER->id;
$order->status = AN_STATUS_NONE; // it will be changed...
@@ -185,8 +185,8 @@ function cc_submit($form, $course)
$extra->x_exp_date = $exp_date;
$extra->x_currency_code = $curcost['currency'];
$extra->x_amount = $curcost['cost'];
- $extra->x_first_name = $form->ccfirstname;
- $extra->x_last_name = $form->cclastname;
+ $extra->x_first_name = $form->firstname;
+ $extra->x_last_name = $form->lastname;
$extra->x_country = $form->cccountry;
$extra->x_address = $form->ccaddress;
$extra->x_state = $form->ccstate;
@@ -334,7 +334,7 @@ function validate_enrol_form($form)
}
}
- if (empty($form->ccfirstname) || empty($form->cclastname)) {
+ if (empty($form->firstname) || empty($form->lastname)) {
$this->ccerrors['ccfirstlast'] = get_string('missingfullname');
}

0 comments on commit d810bd4

Please sign in to comment.
Something went wrong with that request. Please try again.