fixed focus method which was tring to focus on hidden fields.
This commit is contained in:
+3
-1
@@ -146,7 +146,7 @@ class moodleform {
|
||||
$names=null;
|
||||
while (!$names){
|
||||
$el = array_shift($elkeys);
|
||||
$names=$form->_getElNamesRecursive($el);
|
||||
$names = $form->_getElNamesRecursive($el);
|
||||
}
|
||||
$name=array_shift($names);
|
||||
$focus='forms[\''.$this->_form->getAttribute('id').'\'].elements[\''.$name.'\']';
|
||||
@@ -1219,6 +1219,8 @@ function validate_' . $this->_formName . '(frm) {
|
||||
$elNames = array($group->getElementName($el->getName()));
|
||||
} elseif (is_a($el, 'HTML_QuickForm_header')) {
|
||||
return null;
|
||||
} elseif (is_a($el, 'HTML_QuickForm_hidden')) {
|
||||
return null;
|
||||
} elseif (method_exists($el, 'getPrivateName')) {
|
||||
return array($el->getPrivateName());
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user