mirror of
https://github.com/moodle/moodle.git
synced 2025-08-11 03:46:42 +02:00
"MDL-17316, fix upload form in non-js file picker"
This commit is contained in:
parent
b556308033
commit
ab9cdbb976
6 changed files with 41 additions and 17 deletions
|
@ -173,7 +173,12 @@ class MoodleQuickForm_filemanager extends HTML_QuickForm_element {
|
|||
$str .= $repo_info['js'];
|
||||
$str .= <<<EOD
|
||||
<input value="$draftitemid" name="{$this->_attributes['name']}" type="hidden" />
|
||||
<a href="#nonjsfp" class="btnaddfile" onclick="return callpicker('$id', '$client_id', '$draftitemid')">$straddfile</a>
|
||||
<a href="###" id="btnadd-{$client_id}" style="display:none" class="btnaddfile" onclick="return callpicker('$id', '$client_id', '$draftitemid')">$straddfile</a>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
document.getElementById('btnadd-{$client_id}').style.display="inline";
|
||||
//]]>
|
||||
</script>
|
||||
EOD;
|
||||
if (empty($CFG->filemanagerjsloaded)) {
|
||||
$str .= <<<EOD
|
||||
|
@ -224,7 +229,6 @@ function callpicker(el_id, client_id, itemid) {
|
|||
//]]>
|
||||
</script>
|
||||
<noscript>
|
||||
<a name="nonjsfp"></a>
|
||||
<object type="text/html" data="{$CFG->httpswwwroot}/repository/filepicker.php?action=embedded&itemid={$draftitemid}&ctx_id=$context->id" height="300" width="800" style="border:1px solid #000">Error</object>
|
||||
</noscript>
|
||||
EOD;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue