$renderer =& $mform->defaultRenderer();
$mform->addElement('header', '', ' ' . get_string('paymentrequired'), '');
+ $mform->addElement('static', '', '<div align="right">' . other_method($paymentmethod) . ' </div>', '');
$mform->addElement('hidden', 'id', $course->id);
$mform->setType('id', PARAM_INT);
$firstlastnamestr = (AN_METHOD_CC == $paymentmethod) ?
get_string('nameoncard', 'enrol_authorize') : get_string('echeckfirslasttname', 'enrol_authorize');
$firstlastnamegrp = array();
- $firstlastnamegrp[] = &MoodleQuickForm::createElement('text', 'firstname', '', 'size="10"');
- $firstlastnamegrp[] = &MoodleQuickForm::createElement('text', 'lastname', '', 'size="10"');
+ $firstlastnamegrp[] = &MoodleQuickForm::createElement('text', 'firstname', '', 'size="8"');
+ $firstlastnamegrp[] = &MoodleQuickForm::createElement('text', 'lastname', '', 'size="8"');
$mform->addGroup($firstlastnamegrp, 'firstlastgrp', $firstlastnamestr, ' ', false);
$firstlastnamegrprules = array();
$firstlastnamegrprules['firstname'][] = array(get_string('missingfirstname'), 'required', null, 'client');
if (AN_METHOD_CC == $paymentmethod)
{
- $mform->addElement('text', 'cc', get_string('ccno', 'enrol_authorize'), 'size="16"');
+ $mform->addElement('text', 'cc', get_string('ccno', 'enrol_authorize'), 'size="20"');
$mform->setType('cc', PARAM_ALPHANUM);
$mform->setDefault('cc', '');
$mform->addRule('cc', get_string('missingcc', 'enrol_authorize'), 'required', null, 'client');
if (!empty($CFG->an_avs)) {
$mform->addElement('header', '', ' ' . get_string('address'), '');
- $mform->addElement('text', 'ccaddress', get_string('address'), 'size="20"');
+ $mform->addElement('text', 'ccaddress', get_string('address'), 'size="30"');
$mform->setType('ccaddress', PARAM_ALPHANUM);
$mform->setDefault('ccaddress', $USER->address);
$mform->addRule('ccaddress', get_string('missingaddress', 'enrol_authorize'), 'required', null, 'client');
$citystategrp = array();
- $citystategrp[] = &MoodleQuickForm::createElement('text', 'cccity', '', 'size="10"');
- $citystategrp[] = &MoodleQuickForm::createElement('text', 'ccstate', '', 'size="10"');
- $mform->addGroup($citystategrp, 'citystategrp', get_string('city') . ' / ' . get_string('state'), ' ', false);
+ $citystategrp[] = &MoodleQuickForm::createElement('text', 'cccity', '', 'size="14"');
+ $citystategrp[] = &MoodleQuickForm::createElement('static', 'sep', null, ' - ');
+ $citystategrp[] = &MoodleQuickForm::createElement('text', 'ccstate', '', 'size="8"');
+ $mform->addGroup($citystategrp, 'citystategrp', get_string('city') . ' - ' . get_string('state'), ' ', false);
$citystategrprules = array();
$citystategrprules['cccity'][] = array(get_string('missingcity'), 'required', null, 'client');
$mform->addGroupRule('citystategrp', $citystategrprules);
}
-function print_other_method($currentmethod)
+function other_method($currentmethod)
{
global $course;
if ($otheravailable) {
$a = new stdClass;
$a->url = $url;
- print_string($stringtofetch, "enrol_authorize", $a);
+ return get_string($stringtofetch, "enrol_authorize", $a);
+ }
+ else {
+ return '';
}
}
?>