Skip to content

Commit

Permalink
MDL-38821 enrol_paypal: Fixing setType missing calls
Browse files Browse the repository at this point in the history
  • Loading branch information
David Monllao committed Apr 2, 2013
1 parent 361c4da commit eeb6c4a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion enrol/paypal/edit_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@ function definition() {
$mform->addElement('header', 'header', get_string('pluginname', 'enrol_paypal'));

$mform->addElement('text', 'name', get_string('custominstancename', 'enrol'));
$mform->setType('name', PARAM_TEXT);

$options = array(ENROL_INSTANCE_ENABLED => get_string('yes'),
ENROL_INSTANCE_DISABLED => get_string('no'));
$mform->addElement('select', 'status', get_string('status', 'enrol_paypal'), $options);
$mform->setDefault('status', $plugin->get_config('status'));

$mform->addElement('text', 'cost', get_string('cost', 'enrol_paypal'), array('size'=>4));
$mform->setType('cost', PARAM_TEXT);
$mform->setDefault('cost', $plugin->get_config('cost'));

$paypalcurrencies = $plugin->get_currencies();
Expand Down Expand Up @@ -74,7 +76,10 @@ function definition() {
$mform->addHelpButton('enrolenddate', 'enrolenddate', 'enrol_paypal');

$mform->addElement('hidden', 'id');
$mform->setType('id', PARAM_INT);

$mform->addElement('hidden', 'courseid');
$mform->setType('courseid', PARAM_INT);

$this->add_action_buttons(true, ($instance->id ? null : get_string('addinstance', 'enrol')));

Expand All @@ -100,4 +105,4 @@ function validation($data, $files) {

return $errors;
}
}
}

0 comments on commit eeb6c4a

Please sign in to comment.