Skip to content
Snippets Groups Projects
Commit 26a5ac53 authored by Regis Houssin's avatar Regis Houssin
Browse files

Fix: possibility to disable ajax

parent a2fe6e31
No related branches found
No related tags found
No related merge requests found
...@@ -59,13 +59,14 @@ class FormFile ...@@ -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);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment