mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-29 21:01:25 +01:00
WIP
This commit is contained in:
@@ -1628,7 +1628,7 @@ function dolButtonToOpenUrlInDialogPopup($name, $label, $buttonstring, $url, $di
|
||||
close: function (event, ui) {
|
||||
returnedid = jQuery("#varforreturndialogid'.$name.'").text();
|
||||
returnedlabel = jQuery("#varforreturndialoglabel'.$name.'").text();
|
||||
console.log("popup has been closed. returnedid="+returnedid+" returnedlabel="+returnedlabel);
|
||||
console.log("popup has been closed. returnedid (js var defined into parent page)="+returnedid+" returnedlabel="+returnedlabel);
|
||||
if (returnedid != "" && returnedid != "div for returned id") {
|
||||
jQuery("#'.(empty($backtopagejsfieldsid)?"none":$backtopagejsfieldsid).'").val(returnedid);
|
||||
}
|
||||
|
||||
@@ -619,7 +619,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
||||
if (!GETPOSTISSET('backtopage')) {
|
||||
$url = '/societe/card.php?action=create&client=3&fournisseur=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create');
|
||||
$newbutton = '<span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddThirdParty").'"></span>';
|
||||
// TODO @LDR Impletment this
|
||||
// TODO @LDR Implement this
|
||||
//$tmpbacktopagejsfields = 'socid:search_socid';
|
||||
//print dolButtonToOpenUrlInDialogPopup('addthirdparty', $langs->transnoentitiesnoconv('AddThirdParty'), $newbutton, $url, '', '', $tmpbacktopagejsfields);
|
||||
print ' <a href="'.DOL_URL_ROOT.$url.'">'.$newbutton.'</a>';
|
||||
|
||||
@@ -704,8 +704,14 @@ if (empty($reshook)) {
|
||||
$url = DOL_URL_ROOT."/fourn/card.php?socid=".$object->id;
|
||||
}
|
||||
|
||||
header("Location: ".$url);
|
||||
exit;
|
||||
// TODO @LDR
|
||||
if ($dol_openinpopup && $backtopagejsfields) {
|
||||
print 'TODO Set js var of parent with id, then close popup.';
|
||||
exit;
|
||||
} else {
|
||||
header("Location: ".$url);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$db->rollback();
|
||||
|
||||
Reference in New Issue
Block a user