mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
add new method getFileChooser() which is called by printFileChooser()
This commit is contained in:
parent
bd0064e5ab
commit
2533ef845b
|
@ -864,7 +864,26 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
}
|
||||
} /* }}} */
|
||||
|
||||
function getFileChooser($varname='userfile', $multiple=false, $accept='') { /* {{{ */
|
||||
$id = preg_replace('/[^A-Za-z]/', '', $varname);
|
||||
$html = '
|
||||
<div id="'.$id.'-upload-files">
|
||||
<div id="'.$id.'-upload-file" class="upload-file">
|
||||
<div class="input-append">
|
||||
<input type="text" class="form-control" readonly>
|
||||
<span class="btn btn-default btn-file">
|
||||
'.getMLText("browse").'… <input id="'.$id.'" type="file" name="'.$varname.'"'.($multiple ? " multiple" : "").($accept ? ' accept="'.$accept.'"' : "").'">
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
return $html;
|
||||
} /* }}} */
|
||||
|
||||
function printFileChooser($varname='userfile', $multiple=false, $accept='') { /* {{{ */
|
||||
echo $this->getFileChooser($varname, $multiple, $accept);
|
||||
return;
|
||||
$id = preg_replace('/[^A-Za-z]/', '', $varname);
|
||||
?>
|
||||
<div id="<?php echo $id; ?>-upload-files">
|
||||
|
|
Loading…
Reference in New Issue
Block a user