mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 20:57:26 +02:00
Fixes #1002 - Filepicker mode was not being detected by media-manager.
This commit is contained in:
@@ -577,14 +577,26 @@ class media_form_ui extends e_admin_form_ui
|
||||
// $save = ($_GET['bbcode']!='file') ? "e-dialog-save" : "";
|
||||
// e-dialog-close
|
||||
|
||||
|
||||
// File Picker.
|
||||
if($_GET['action'] == 'dialog')
|
||||
$for = $this->getController()->getQuery('for');
|
||||
|
||||
if(strpos($for, '_file') !==false)
|
||||
{
|
||||
$type = 'file';
|
||||
}
|
||||
else
|
||||
{
|
||||
$type = 'image';
|
||||
}
|
||||
|
||||
// File Picker.
|
||||
if($_GET['action'] == 'dialog' && ($type == 'file'))
|
||||
{
|
||||
$text = "<input type='button' value='Select' data-placement='left' class='e-media-select e-dialog-save e-dialog-close btn btn-primary btn-large' data-id='{$id}' data-name=\"".$title."\" data-type='file' data-target='{$tagid}' data-bbcode='{$bbcode}' data-path='{$path}' data-preview='{$preview}' title=\"".$title."\" />";
|
||||
}
|
||||
|
||||
$text = $this->renderValue('options',$value,'',$id);
|
||||
else
|
||||
{
|
||||
$text = $this->renderValue('options',$value,'',$id);
|
||||
}
|
||||
|
||||
return "<div class='nowrap'>".$text."</div>";
|
||||
|
||||
|
Reference in New Issue
Block a user