mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 03:16:42 +02:00
MDL-25937 Forms Library: Added Javascript validation for filepicker and filemanager. Also fixed disbledif rule check for both
This commit is contained in:
parent
f03a17bb09
commit
7dfe3c517b
5 changed files with 28 additions and 9 deletions
|
@ -147,14 +147,12 @@ class MoodleQuickForm_filemanager extends HTML_QuickForm_element {
|
|||
$options->accepted_types = $accepted_types;
|
||||
$options->return_types = FILE_INTERNAL;
|
||||
$options->context = $PAGE->context;
|
||||
$options->elementname = $elname;
|
||||
|
||||
$html = $this->_getTabs();
|
||||
$html .= form_filemanager_render($options);
|
||||
|
||||
$html .= '<input value="'.$draftitemid.'" name="'.$elname.'" type="hidden" />';
|
||||
// label element needs 'for' attribute work
|
||||
$html .= '<input value="" id="id_'.$elname.'" type="hidden" />';
|
||||
|
||||
$html .= '<input id="id_'.$elname.'" value="'.$draftitemid.'" name="'.$elname.'" type="hidden" class="filemanagerhidden"/>';
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
|
@ -304,7 +302,7 @@ FMHTML;
|
|||
$module = array(
|
||||
'name'=>'form_filemanager',
|
||||
'fullpath'=>'/lib/form/filemanager.js',
|
||||
'requires' => array('core_filepicker', 'base', 'io-base', 'node', 'json', 'yui2-button', 'yui2-container', 'yui2-layout', 'yui2-menu', 'yui2-treeview'),
|
||||
'requires' => array('core_filepicker', 'base', 'io-base', 'node', 'node-event-simulate', 'json', 'yui2-button', 'yui2-container', 'yui2-layout', 'yui2-menu', 'yui2-treeview'),
|
||||
'strings' => array(array('loading', 'repository'), array('nomorefiles', 'repository'), array('confirmdeletefile', 'repository'),
|
||||
array('add', 'repository'), array('accessiblefilepicker', 'repository'), array('move', 'moodle'),
|
||||
array('cancel', 'moodle'), array('download', 'moodle'), array('ok', 'moodle'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue