Fix: possibility to disable ajax
This commit is contained in:
parent
a2fe6e311f
commit
26a5ac53d7
@ -59,13 +59,14 @@ class FormFile
|
|||||||
* @param int $size Length of input file area
|
* @param int $size Length of input file area
|
||||||
* @param Object $object Object to use (when attachment is done on an element)
|
* @param Object $object Object to use (when attachment is done on an element)
|
||||||
* @param string $options Options
|
* @param string $options Options
|
||||||
|
* @param boolean $useajax Use ajax if enabled
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function form_attach_new_file($url, $title='', $addcancel=0, $sectionid=0, $perm=1, $size=50, $object='', $options='')
|
function form_attach_new_file($url, $title='', $addcancel=0, $sectionid=0, $perm=1, $size=50, $object='', $options='', $useajax=true)
|
||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD))
|
if (! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD) && $useajax)
|
||||||
{
|
{
|
||||||
return $this->_formAjaxFileUpload($object);
|
return $this->_formAjaxFileUpload($object);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user