WIP Work on dol_openinpopup
This commit is contained in:
parent
1e706fd090
commit
9b22d1a8a1
@ -3081,7 +3081,7 @@ function main_area($title = '')
|
|||||||
{
|
{
|
||||||
global $conf, $langs, $hookmanager;
|
global $conf, $langs, $hookmanager;
|
||||||
|
|
||||||
if (empty($conf->dol_hide_leftmenu)) {
|
if (empty($conf->dol_hide_leftmenu) && !GETPOST('dol_openinpopup')) {
|
||||||
print '<div id="id-right">';
|
print '<div id="id-right">';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3317,7 +3317,7 @@ if (!function_exists("llxFooter")) {
|
|||||||
|
|
||||||
print '</div> <!-- End div class="fiche" -->'."\n"; // End div fiche
|
print '</div> <!-- End div class="fiche" -->'."\n"; // End div fiche
|
||||||
|
|
||||||
if (empty($conf->dol_hide_leftmenu)) {
|
if (empty($conf->dol_hide_leftmenu) && !GETPOST('dol_openinpopup')) {
|
||||||
print '</div> <!-- End div id-right -->'."\n"; // End div id-right
|
print '</div> <!-- End div id-right -->'."\n"; // End div id-right
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -91,10 +91,16 @@ $action = GETPOST('action', 'aZ09');
|
|||||||
$confirm = GETPOST('confirm', 'alpha');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
$cancel = GETPOST('cancel', 'aZ09');
|
$cancel = GETPOST('cancel', 'aZ09');
|
||||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search
|
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used
|
||||||
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
|
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used
|
||||||
|
$backtopagejsfields = GETPOST('backtopagejsfields', 'alpha');
|
||||||
$dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09');
|
$dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09');
|
||||||
|
|
||||||
|
if (!empty($backtopagejsfields)) {
|
||||||
|
$tmpbacktopagejsfields = explode(':', $backtopagejsfields);
|
||||||
|
$dol_openinpopup = $tmpbacktopagejsfields[0];
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize technical objects
|
// Initialize technical objects
|
||||||
$object = new MyObject($db);
|
$object = new MyObject($db);
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
@ -215,8 +221,6 @@ if (empty($reshook)) {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*
|
|
||||||
* Put here all code to build page
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
@ -260,6 +264,12 @@ if ($action == 'create') {
|
|||||||
if ($backtopageforcancel) {
|
if ($backtopageforcancel) {
|
||||||
print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
|
print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
|
||||||
}
|
}
|
||||||
|
if ($backtopagejsfields) {
|
||||||
|
print '<input type="hidden" name="backtopagejsfields" value="'.$backtopagejsfields.'">';
|
||||||
|
}
|
||||||
|
if ($dol_openinpopup) {
|
||||||
|
print '<input type="hidden" name="dol_openinpopup" value="'.$dol_openinpopup.'">';
|
||||||
|
}
|
||||||
|
|
||||||
print dol_get_fiche_head(array(), '');
|
print dol_get_fiche_head(array(), '');
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,11 @@ $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
|
|||||||
$backtopagejsfields = GETPOST('backtopagejsfields', 'alpha');
|
$backtopagejsfields = GETPOST('backtopagejsfields', 'alpha');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
$confirm = GETPOST('confirm', 'aZ09');
|
$confirm = GETPOST('confirm', 'aZ09');
|
||||||
$dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09');
|
|
||||||
|
if (!empty($backtopagejsfields)) {
|
||||||
|
$tmpbacktopagejsfields = explode(':', $backtopagejsfields);
|
||||||
|
$dol_openinpopup = $tmpbacktopagejsfields[0];
|
||||||
|
}
|
||||||
|
|
||||||
$status = GETPOST('status', 'int');
|
$status = GETPOST('status', 'int');
|
||||||
$opp_status = GETPOST('opp_status', 'int');
|
$opp_status = GETPOST('opp_status', 'int');
|
||||||
@ -527,6 +531,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
|||||||
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
||||||
print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
|
print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
|
||||||
print '<input type="hidden" name="backtopagejsfields" value="'.$backtopagejsfields.'">';
|
print '<input type="hidden" name="backtopagejsfields" value="'.$backtopagejsfields.'">';
|
||||||
|
print '<input type="hidden" name="dol_openinpopup" value="'.$dol_openinpopup.'">';
|
||||||
|
|
||||||
print dol_get_fiche_head();
|
print dol_get_fiche_head();
|
||||||
|
|
||||||
|
|||||||
@ -93,9 +93,13 @@ $cancel = GETPOST('cancel', 'alpha');
|
|||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
|
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
|
||||||
$backtopagejsfields = GETPOST('backtopagejsfields', 'alpha');
|
$backtopagejsfields = GETPOST('backtopagejsfields', 'alpha');
|
||||||
$dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09');
|
|
||||||
$confirm = GETPOST('confirm', 'alpha');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
|
|
||||||
|
if (!empty($backtopagejsfields)) {
|
||||||
|
$tmpbacktopagejsfields = explode(':', $backtopagejsfields);
|
||||||
|
$dol_openinpopup = $tmpbacktopagejsfields[0];
|
||||||
|
}
|
||||||
|
|
||||||
$socid = GETPOST('socid', 'int') ?GETPOST('socid', 'int') : GETPOST('id', 'int');
|
$socid = GETPOST('socid', 'int') ?GETPOST('socid', 'int') : GETPOST('id', 'int');
|
||||||
if ($user->socid) {
|
if ($user->socid) {
|
||||||
$socid = $user->socid;
|
$socid = $user->socid;
|
||||||
@ -713,9 +717,6 @@ if (empty($reshook)) {
|
|||||||
if ($backtopagejsfields) {
|
if ($backtopagejsfields) {
|
||||||
llxHeader('', '', '');
|
llxHeader('', '', '');
|
||||||
|
|
||||||
$tmpbacktopagejsfields = explode(':', $backtopagejsfields);
|
|
||||||
$dol_openinpopup = $tmpbacktopagejsfields[0];
|
|
||||||
|
|
||||||
$retstring = '<script>';
|
$retstring = '<script>';
|
||||||
$retstring .= 'jQuery(document).ready(function() {
|
$retstring .= 'jQuery(document).ready(function() {
|
||||||
console.log(\'We execute action to create. We save id and go back - '.$dol_openinpopup.'\');
|
console.log(\'We execute action to create. We save id and go back - '.$dol_openinpopup.'\');
|
||||||
@ -1341,6 +1342,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
||||||
print '<input type="hidden" name="backtopagejsfields" value="'.$backtopagejsfields.'">';
|
print '<input type="hidden" name="backtopagejsfields" value="'.$backtopagejsfields.'">';
|
||||||
|
print '<input type="hidden" name="dol_openinpopup" value="'.$dol_openinpopup.'">';
|
||||||
print '<input type="hidden" name="private" value='.$object->particulier.'>';
|
print '<input type="hidden" name="private" value='.$object->particulier.'>';
|
||||||
print '<input type="hidden" name="type" value='.GETPOST("type", 'alpha').'>';
|
print '<input type="hidden" name="type" value='.GETPOST("type", 'alpha').'>';
|
||||||
print '<input type="hidden" name="LastName" value="'.$langs->trans('ThirdPartyName').' / '.$langs->trans('LastName').'">';
|
print '<input type="hidden" name="LastName" value="'.$langs->trans('ThirdPartyName').' / '.$langs->trans('LastName').'">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user