MDL-54859 mod_wiki: Client rules only when fields are visible

This commit is contained in:
David Monllao
2016-06-08 16:44:45 +08:00
parent 4ee8ef5d41
commit dc4c357435
+1 -1
View File
@@ -60,9 +60,9 @@ class mod_wiki_create_form extends moodleform {
}
$mform->addElement('radio', 'pageformat', '', get_string('format'.$format, 'wiki'), $format, $attr);
}
$mform->addRule('pageformat', get_string('required'), 'required', null, 'client');
}
$mform->setType('pageformat', PARAM_ALPHANUMEXT);
$mform->addRule('pageformat', get_string('required'), 'required', null, 'client');
if (!empty($this->_customdata['groups']->availablegroups)) {
foreach ($this->_customdata['groups']->availablegroups as $groupdata) {