Locked fields do not need to be required.

This commit is contained in:
ikawhero 2007-01-05 06:54:26 +00:00
parent b07b6c8134
commit 901d26dbf4

View File

@ -156,7 +156,7 @@ class profile_field_base {
* @param object instance of the moodleform class * @param object instance of the moodleform class
*/ */
function display_field_required(&$form) { function display_field_required(&$form) {
if ($this->_is_required()) { if ( $this->_is_required() and !$this->_is_locked() ) {
$form->addRule($this->fieldname, get_string('required'), 'required', null, 'client'); $form->addRule($this->fieldname, get_string('required'), 'required', null, 'client');
} }
} }