Merge branch 'MDL-49034_master' of git://github.com/mattporritt/moodle
This commit is contained in:
@@ -39,8 +39,10 @@ class enrol_self_edit_form extends moodleform {
|
||||
|
||||
$mform->addElement('header', 'header', get_string('pluginname', 'enrol_self'));
|
||||
|
||||
$mform->addElement('text', 'name', get_string('custominstancename', 'enrol'));
|
||||
$nameattribs = array('size' => '20', 'maxlength' => '255');
|
||||
$mform->addElement('text', 'name', get_string('custominstancename', 'enrol'), $nameattribs);
|
||||
$mform->setType('name', PARAM_TEXT);
|
||||
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'server');
|
||||
|
||||
$options = array(ENROL_INSTANCE_ENABLED => get_string('yes'),
|
||||
ENROL_INSTANCE_DISABLED => get_string('no'));
|
||||
@@ -52,11 +54,13 @@ class enrol_self_edit_form extends moodleform {
|
||||
$mform->addHelpButton('customint6', 'newenrols', 'enrol_self');
|
||||
$mform->disabledIf('customint6', 'status', 'eq', ENROL_INSTANCE_DISABLED);
|
||||
|
||||
$mform->addElement('passwordunmask', 'password', get_string('password', 'enrol_self'));
|
||||
$passattribs = array('size' => '20', 'maxlength' => '50');
|
||||
$mform->addElement('passwordunmask', 'password', get_string('password', 'enrol_self'), $passattribs);
|
||||
$mform->addHelpButton('password', 'password', 'enrol_self');
|
||||
if (empty($instance->id) and $plugin->get_config('requirepassword')) {
|
||||
$mform->addRule('password', get_string('required'), 'required', null, 'client');
|
||||
}
|
||||
$mform->addRule('password', get_string('maximumchars', '', 50), 'maxlength', 50, 'server');
|
||||
|
||||
$options = array(1 => get_string('yes'),
|
||||
0 => get_string('no'));
|
||||
|
||||
Reference in New Issue
Block a user