mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
MDL-23486 ugly ugly ugly hack - hardcoded required text checking in editor element; we should realy create new forms engine in 2.1 :-(
This commit is contained in:
parent
eea0c8eaa7
commit
a5e94d4bb3
@ -1502,6 +1502,11 @@ class HTML_QuickForm extends HTML_Common {
|
||||
$values[] = $this->getSubmitValue($elName);
|
||||
}
|
||||
$result = $registry->validate($rule['type'], $values, $rule['format'], true);
|
||||
} else if ($rule['type'] === 'required' and $this->getElement($target)->_type === 'editor') {
|
||||
//horrible horrible hack
|
||||
if (!isset($submitValue['text']) or $submitValue['text'] === '') {
|
||||
$result = false;
|
||||
}
|
||||
} elseif (is_array($submitValue) && !isset($rule['howmany'])) {
|
||||
$result = $registry->validate($rule['type'], $submitValue, $rule['format'], true);
|
||||
} else {
|
||||
|
@ -22,6 +22,8 @@ and documented for Moodle at:
|
||||
|
||||
4/ MDL-20876 - replaced deprecated split() with explode() or str_split() where appropriate
|
||||
|
||||
5/ hardcoded editor element required rule validation
|
||||
|
||||
Such modifications should be carefully each time the Excel PEAR package is updated
|
||||
to a new release within Moodle.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user