Merge pull request #10704 from iouston/patch-1
NEW add hidden option MAIN_DOC_UPLOAD_NOT_RENAME_BY_DEFAULT
This commit is contained in:
commit
7606c73fd5
@ -175,10 +175,19 @@ class FormFile
|
|||||||
|
|
||||||
if ($savingdocmask)
|
if ($savingdocmask)
|
||||||
{
|
{
|
||||||
|
//add a global variable for disable the auto renaming on upload
|
||||||
|
if (! empty($conf->global->MAIN_DOC_UPLOAD_NOT_RENAME_BY_DEFAULT))
|
||||||
|
{
|
||||||
|
$rename='';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$rename='checked';
|
||||||
|
}
|
||||||
|
|
||||||
$out .= '<tr>';
|
$out .= '<tr>';
|
||||||
if (! empty($options)) $out .= '<td>'.$options.'</td>';
|
if (! empty($options)) $out .= '<td>'.$options.'</td>';
|
||||||
$out .= '<td class="nowrap valignmiddle">';
|
$out .= '<td valign="middle" class="nowrap">';
|
||||||
$out .= '<input type="checkbox" checked class="savingdocmask" name="savingdocmask" value="'.dol_escape_js($savingdocmask).'"> '.$langs->trans("SaveUploadedFileWithMask", preg_replace('/__file__/', $langs->transnoentitiesnoconv("OriginFileName"), $savingdocmask), $langs->transnoentitiesnoconv("OriginFileName"));
|
$out .= '<input type="checkbox" '.$rename.' class="savingdocmask" name="savingdocmask" value="'.dol_escape_js($savingdocmask).'"> '.$langs->trans("SaveUploadedFileWithMask", preg_replace('/__file__/',$langs->transnoentitiesnoconv("OriginFileName"),$savingdocmask), $langs->transnoentitiesnoconv("OriginFileName"));
|
||||||
$out .= '</td>';
|
$out .= '</td>';
|
||||||
$out .= '</tr>';
|
$out .= '</tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user