Fix print into form to attach file must be into return.
This commit is contained in:
parent
309e1604e1
commit
0bfccc7255
@ -75,6 +75,7 @@ class FormFile
|
|||||||
global $conf,$langs, $hookmanager;
|
global $conf,$langs, $hookmanager;
|
||||||
$hookmanager->initHooks(array('formfile'));
|
$hookmanager->initHooks(array('formfile'));
|
||||||
|
|
||||||
|
|
||||||
if (! empty($conf->browser->layout) && $conf->browser->layout != 'classic') $useajax=0;
|
if (! empty($conf->browser->layout) && $conf->browser->layout != 'classic') $useajax=0;
|
||||||
|
|
||||||
if ((! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD) && $useajax) || ($useajax==2))
|
if ((! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD) && $useajax) || ($useajax==2))
|
||||||
@ -86,13 +87,13 @@ class FormFile
|
|||||||
return $this->_formAjaxFileUpload($object);
|
return $this->_formAjaxFileUpload($object);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$maxlength=$size;
|
$maxlength=$size;
|
||||||
|
|
||||||
$out = "\n\n<!-- Start form attach new file -->\n";
|
$out = "\n\n<!-- Start form attach new file -->\n";
|
||||||
|
|
||||||
if (empty($title)) $title=$langs->trans("AttachANewFile");
|
if (empty($title)) $title=$langs->trans("AttachANewFile");
|
||||||
if ($title != 'none') print_titre($title);
|
if ($title != 'none') $out.=load_fiche_titre($title, null, null);
|
||||||
|
|
||||||
$out .= '<form name="'.$htmlname.'" id="'.$htmlname.'" action="'.$url.'" enctype="multipart/form-data" method="POST">';
|
$out .= '<form name="'.$htmlname.'" id="'.$htmlname.'" action="'.$url.'" enctype="multipart/form-data" method="POST">';
|
||||||
$out .= '<input type="hidden" id="'.$htmlname.'_section_dir" name="section_dir" value="">';
|
$out .= '<input type="hidden" id="'.$htmlname.'_section_dir" name="section_dir" value="">';
|
||||||
@ -178,7 +179,7 @@ class FormFile
|
|||||||
$out .= '<table width="100%" class="nobordernopadding">';
|
$out .= '<table width="100%" class="nobordernopadding">';
|
||||||
$out .= '<tr>';
|
$out .= '<tr>';
|
||||||
$out .= '<td valign="middle" class="nowrap">';
|
$out .= '<td valign="middle" class="nowrap">';
|
||||||
$out .= $langs->trans("Link") . ': ';
|
$out .= $langs->trans("URLToLink") . ': ';
|
||||||
$out .= '<input type="text" name="link" size="'.$maxlength.'" id="link">';
|
$out .= '<input type="text" name="link" size="'.$maxlength.'" id="link">';
|
||||||
$out .= ' ' . $langs->trans("Label") . ': ';
|
$out .= ' ' . $langs->trans("Label") . ': ';
|
||||||
$out .= '<input type="text" name="label" id="label">';
|
$out .= '<input type="text" name="label" id="label">';
|
||||||
@ -200,7 +201,9 @@ class FormFile
|
|||||||
|
|
||||||
if (empty($res))
|
if (empty($res))
|
||||||
{
|
{
|
||||||
|
print '<div class="attacharea">';
|
||||||
print $out;
|
print $out;
|
||||||
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
|
|||||||
@ -6,3 +6,4 @@ ErrorFileNotLinked=The file could not be linked
|
|||||||
LinkRemoved=The link %s has been removed
|
LinkRemoved=The link %s has been removed
|
||||||
ErrorFailedToDeleteLink= Failed to remove link '<b>%s</b>'
|
ErrorFailedToDeleteLink= Failed to remove link '<b>%s</b>'
|
||||||
ErrorFailedToUpdateLink= Failed to update link '<b>%s</b>'
|
ErrorFailedToUpdateLink= Failed to update link '<b>%s</b>'
|
||||||
|
URLToLink=URL to link
|
||||||
@ -603,7 +603,10 @@ div.ficheaddleft {
|
|||||||
padding-top: 1px;
|
padding-top: 1px;
|
||||||
padding-bottom: 1px;
|
padding-bottom: 1px;
|
||||||
}
|
}
|
||||||
|
div.attacharea {
|
||||||
|
padding-top: 10px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
/* Menu top et 1ere ligne tableau */
|
/* Menu top et 1ere ligne tableau */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user