Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Which form is submitted? Internal or authorize?

This eliminates undefined form->property notices when user submitted internal form.
  • Loading branch information...
commit 00a354a2da2638f884ea7d8f328f5fa818c863a0 1 parent d90534d
ethem authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  enrol/authorize/enrol.html
  2. +1 −1  enrol/authorize/enrol.php
View
2  enrol/authorize/enrol.html
@@ -108,7 +108,7 @@
<?php if (!empty($this->ccerrors['cczip'])) { formerr($this->ccerrors['cczip']); } ?></td>
</tr>
</table>
-<input type="submit" value="<?php print_string("sendpaymentbutton", "enrol_authorize") ?>">
+<input type="submit" name="ccsubmit" value="<?php print_string("sendpaymentbutton", "enrol_authorize") ?>">
</form>
</div>
View
2  enrol/authorize/enrol.php
@@ -84,7 +84,7 @@ function print_entry($course)
function check_entry($form, $course) {
if ((!empty($form->password)) || isguest() || $this->zero_cost($course)) {
parent::check_entry($form, $course);
- } elseif ($this->validate_enrol_form($form)) {
+ } elseif ((!empty($form->ccsubmit)) && $this->validate_enrol_form($form)) {
$this->cc_submit($form, $course);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.