27 function showOnlineSignatureUrl($type, $ref)
32 $langs->loadLangs(array(
"payment",
"paybox"));
34 $servicename =
'Online';
36 $out =
img_picto(
'',
'globe').
' '.$langs->trans(
"ToOfferALinkForOnlineSignature", $servicename).
'<br>';
37 $url = getOnlineSignatureUrl(0, $type, $ref);
38 $out .=
'<input type="text" id="onlinesignatureurl" class="quatrevingtpercent" value="'.$url.
'">';
52 function getOnlineSignatureUrl($mode, $type, $ref =
'')
54 global $conf, $db, $langs;
56 $ref = str_replace(
' ',
'', $ref);
59 if ($type ==
'proposal')
61 $out = DOL_MAIN_URL_ROOT.
'/public/onlinesign/newonlinesign.php?source=proposal&ref='.($mode ?
'<font color="#666666">' :
'');
62 if ($mode == 1) $out .=
'proposal_ref';
63 if ($mode == 0) $out .= urlencode($ref);
64 $out .= ($mode ?
'</font>' :
'');
65 if ($mode == 1) $out .=
'&hashp=<font color="#666666">hash_of_file</font>';
67 include_once DOL_DOCUMENT_ROOT.
'/comm/propal/class/propal.class.php';
68 $propaltmp =
new Propal($db);
69 $res = $propaltmp->fetch(0, $ref);
70 if ($res <= 0)
return 'FailedToGetProposal';
72 include_once DOL_DOCUMENT_ROOT.
'/ecm/class/ecmfiles.class.php';
75 $ecmfile->fetch(0,
'', $propaltmp->last_main_doc);
77 $hashp = $ecmfile->share;
80 $out = $langs->trans(
"FeatureOnlineSignDisabled");
83 $out .=
'&hashp='.$hashp;
89 if (!empty($out)) $out .=
"&entity=".$conf->entity;
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
ajax_autoselect($htmlname, $addlink= '')
Make content of an input box selected when we click into input field.
Class to manage ECM files.
Class to manage proposals.