diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 23572468b79..7414ab93fb7 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -54,13 +54,14 @@ class FormFile * @param addcancel 1=Add 'Cancel' button * @param sectionid If upload must be done inside a particular ECM section * @param perm Value of permission to allow upload + * @param size Length of input file area * @return int <0 ij KO, >0 if OK */ - function form_attach_new_file($url, $title='', $addcancel=0, $sectionid=0, $perm=1) + function form_attach_new_file($url, $title='', $addcancel=0, $sectionid=0, $perm=1, $size=60) { global $conf,$langs; - $maxlength=62; + $maxlength=$size; print "\n\n\n"; diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php index 8aa7608e4f5..e8d8101558a 100644 --- a/htdocs/ecm/index.php +++ b/htdocs/ecm/index.php @@ -799,7 +799,7 @@ if ($conf->use_javascript_ajax) ?> -
+
use_javascript_ajax) { ?>
-
+
form_attach_new_file(DOL_URL_ROOT.'/ecm/index.php','none',0,$section,$user->rights->ecm->upload); + $formfile->form_attach_new_file(DOL_URL_ROOT.'/ecm/index.php', 'none', 0, $section,$user->rights->ecm->upload, 48); } else print ' ';