Add button Save and stay when editing property of web site
This commit is contained in:
parent
05352a62e5
commit
b21bca17de
@ -476,7 +476,7 @@ if (! empty($conf->barcode->enabled)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Logo
|
// Logo
|
||||||
print '<tr class="oddeven"><td><label for="logo">'.$langs->trans("Logo").' (png,jpg)</label></td><td>';
|
print '<tr class="oddeven"><td><label for="logo">'.$form->textwithpicto($langs->trans("Logo"), 'png, jpg').'</label></td><td>';
|
||||||
print '<table width="100%" class="nobordernopadding"><tr class="nocellnopadd"><td valign="middle" class="nocellnopadd">';
|
print '<table width="100%" class="nobordernopadding"><tr class="nocellnopadd"><td valign="middle" class="nocellnopadd">';
|
||||||
print '<input type="file" class="flat minwidth200" name="logo" id="logo" accept="image/*">';
|
print '<input type="file" class="flat minwidth200" name="logo" id="logo" accept="image/*">';
|
||||||
print '</td><td class="nocellnopadd right" valign="middle">';
|
print '</td><td class="nocellnopadd right" valign="middle">';
|
||||||
@ -493,7 +493,7 @@ print '</td></tr></table>';
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Logo (squarred)
|
// Logo (squarred)
|
||||||
print '<tr class="oddeven"><td><label for="logo_squarred">'.$langs->trans("LogoSquarred").' (png,jpg)</label></td><td>';
|
print '<tr class="oddeven"><td><label for="logo_squarred">'.$form->textwithpicto($langs->trans("LogoSquarred"), 'png, jpg').'</label></td><td>';
|
||||||
print '<table width="100%" class="nobordernopadding"><tr class="nocellnopadd"><td valign="middle" class="nocellnopadd">';
|
print '<table width="100%" class="nobordernopadding"><tr class="nocellnopadd"><td valign="middle" class="nocellnopadd">';
|
||||||
print '<input type="file" class="flat minwidth200" name="logo_squarred" id="logo_squarred" accept="image/*">';
|
print '<input type="file" class="flat minwidth200" name="logo_squarred" id="logo_squarred" accept="image/*">';
|
||||||
print '</td><td class="nocellnopadd right" valign="middle">';
|
print '</td><td class="nocellnopadd right" valign="middle">';
|
||||||
|
|||||||
@ -169,6 +169,7 @@ ToValidate=To validate
|
|||||||
NotValidated=Not validated
|
NotValidated=Not validated
|
||||||
Save=Save
|
Save=Save
|
||||||
SaveAs=Save As
|
SaveAs=Save As
|
||||||
|
SaveAndStay=Save and stay
|
||||||
TestConnection=Test connection
|
TestConnection=Test connection
|
||||||
ToClone=Clone
|
ToClone=Clone
|
||||||
ConfirmClone=Choose data you want to clone:
|
ConfirmClone=Choose data you want to clone:
|
||||||
|
|||||||
@ -1236,14 +1236,20 @@ if ($action == 'updatecss')
|
|||||||
setEventMessages($langs->trans("Saved"), null, 'mesgs');
|
setEventMessages($langs->trans("Saved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! GETPOSTISSET('updateandstay')) // If we click on "Save And Stay", we don not make the redirect
|
||||||
|
{
|
||||||
$action='preview';
|
$action='preview';
|
||||||
|
|
||||||
if ($backtopage)
|
if ($backtopage)
|
||||||
{
|
{
|
||||||
header("Location: ".$backtopage);
|
header("Location: ".$backtopage);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$action = 'editcss';
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2105,6 +2111,7 @@ if (! GETPOST('hide_websitemenu'))
|
|||||||
|
|
||||||
if (in_array($action, array('editcss','editmenu','file_manager','replacesite','replacesiteconfirm')))
|
if (in_array($action, array('editcss','editmenu','file_manager','replacesite','replacesiteconfirm')))
|
||||||
{
|
{
|
||||||
|
if ($action == 'editcss' && $action != 'file_manager' && $action != 'replacesite' && $action != 'replacesiteconfirm') print '<input type="submit" id="savefilean stay" class="button buttonforacesave" value="'.dol_escape_htmltag($langs->trans("SaveAndStay")).'" name="updateandstay">';
|
||||||
if (preg_match('/^create/', $action) && $action != 'file_manager' && $action != 'replacesite' && $action != 'replacesiteconfirm') print '<input type="submit" id="savefile" class="button buttonforacesave" value="'.dol_escape_htmltag($langs->trans("Save")).'" name="update">';
|
if (preg_match('/^create/', $action) && $action != 'file_manager' && $action != 'replacesite' && $action != 'replacesiteconfirm') print '<input type="submit" id="savefile" class="button buttonforacesave" value="'.dol_escape_htmltag($langs->trans("Save")).'" name="update">';
|
||||||
if (preg_match('/^edit/', $action) && $action != 'file_manager' && $action != 'replacesite' && $action != 'replacesiteconfirm') print '<input type="submit" id="savefile" class="button buttonforacesave" value="'.dol_escape_htmltag($langs->trans("Save")).'" name="update">';
|
if (preg_match('/^edit/', $action) && $action != 'file_manager' && $action != 'replacesite' && $action != 'replacesiteconfirm') print '<input type="submit" id="savefile" class="button buttonforacesave" value="'.dol_escape_htmltag($langs->trans("Save")).'" name="update">';
|
||||||
if ($action != 'preview') print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("Cancel")).'" name="cancel">';
|
if ($action != 'preview') print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("Cancel")).'" name="cancel">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user