From 2398d9160a0731b97363741a460f36b7db2d2e68 Mon Sep 17 00:00:00 2001 From: David Monllao Date: Wed, 8 Jun 2016 16:40:54 +0800 Subject: [PATCH] MDL-54859 mod_wiki: Client rules only when fields are visible --- mod/wiki/create_form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/wiki/create_form.php b/mod/wiki/create_form.php index 3553f45c443..422b6e678ea 100644 --- a/mod/wiki/create_form.php +++ b/mod/wiki/create_form.php @@ -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) {