mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
Locked fields do not need to be required.
This commit is contained in:
parent
b07b6c8134
commit
901d26dbf4
1 changed files with 1 additions and 1 deletions
|
@ -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');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue