mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-50484 lib_formslib: Persistant input should have different id
Persistant input is appended for frozen elements and should have different id then the actual element
This commit is contained in:
parent
2aacd415e1
commit
1ebda3eb8c
7 changed files with 83 additions and 5 deletions
|
@ -254,11 +254,18 @@ class HTML_QuickForm_element extends HTML_Common
|
|||
return '';
|
||||
} else {
|
||||
$id = $this->getAttribute('id');
|
||||
if (isset($id)) {
|
||||
// Id of persistant input is different then the actual input.
|
||||
$id = array('id' => $id . '_persistant');
|
||||
} else {
|
||||
$id = array();
|
||||
}
|
||||
|
||||
return '<input' . $this->_getAttrString(array(
|
||||
'type' => 'hidden',
|
||||
'name' => $this->getName(),
|
||||
'value' => $this->getValue()
|
||||
) + (isset($id)? array('id' => $id): array())) . ' />';
|
||||
) + $id) . ' />';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -486,4 +493,4 @@ class HTML_QuickForm_element extends HTML_Common
|
|||
|
||||
// }}}
|
||||
} // end class HTML_QuickForm_element
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -30,6 +30,7 @@ MDL-46467 - $mform->hardfreeze causes labels to loose their for HTML attribute
|
|||
MDL-52081 - made all constructors PHP7 compatible
|
||||
MDL-52826 - Remove onsubmit events pointing to the global validation functions and script
|
||||
tag moved after the HTML
|
||||
MDL-50484 - _getPersistantData() returns id with _persistant prefixed to element id.
|
||||
|
||||
|
||||
Pear
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue