add a field for label input
This commit is contained in:
parent
f19e5e86f4
commit
b625b1843e
@ -165,7 +165,10 @@ class FormFile
|
||||
$out .= '<table width="100%" class="nobordernopadding">';
|
||||
$out .= '<tr>';
|
||||
$out .= '<td valign="middle" class="nowrap">';
|
||||
$out .= $langs->trans("Link") . ': ';
|
||||
$out .= '<input type="text" name="link" id="link">';
|
||||
$out .= ' ' . $langs->trans("Label") . ': ';
|
||||
$out .= '<input type="text" name="label" id="label">';
|
||||
$out .= '<input type="hidden" name="objecttype" value="' . $object->element . '">';
|
||||
$out .= '<input type="hidden" name="objectid" value="' . $object->id . '">';
|
||||
$out .= '<input type="submit" class="button" name="linkit" value="'.$langs->trans("Upload").'"';
|
||||
|
||||
@ -1062,6 +1062,7 @@ function dol_add_file_process($upload_dir, $allowoverwrite=0, $donotupdatesessio
|
||||
$linkObject->url = $link;
|
||||
$linkObject->objecttype = GETPOST('objecttype', 'alpha');
|
||||
$linkObject->objectid = GETPOST('objectid', 'int');
|
||||
$linkObject->label = GETPOST('label', 'alpha');
|
||||
$res = $linkObject->create($user);
|
||||
if ($res > 0) {
|
||||
setEventMessage($langs->trans("LinkComplete"));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user