MAIN_CONFIRM_AJAX is on by default
This commit is contained in:
parent
87ed0c1ea4
commit
62e680cbf2
@ -61,8 +61,8 @@ if (isset($_POST["action"]) && $_POST["action"] == 'update')
|
|||||||
dolibarr_set_const($db, "MAIN_MULTILANGS", $_POST["main_multilangs"],'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_MULTILANGS", $_POST["main_multilangs"],'chaine',0,'',$conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", $_POST["main_size_liste_limit"],'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", $_POST["main_size_liste_limit"],'chaine',0,'',$conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["main_disable_javascript"],'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["main_disable_javascript"],'chaine',0,'',$conf->entity);
|
||||||
//dolibarr_set_const($db, "MAIN_CONFIRM_AJAX", $_POST["main_confirm_ajax"],'chaine',0,'',$conf->entity);
|
//dolibarr_set_const($db, "MAIN_CONFIRM_AJAX", $_POST["MAIN_CONFIRM_AJAX"],'chaine',0,'',$conf->entity);
|
||||||
//dolibarr_set_const($db, "MAIN_POPUP_CALENDAR", $_POST["main_popup_calendar"],'chaine',0,'',$conf->entity);
|
//dolibarr_set_const($db, "MAIN_POPUP_CALENDAR", $_POST["MAIN_POPUP_CALENDAR"],'chaine',0,'',$conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_USE_PREVIEW_TABS", $_POST["main_use_preview_tabs"],'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_USE_PREVIEW_TABS", $_POST["main_use_preview_tabs"],'chaine',0,'',$conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_START_WEEK", $_POST["MAIN_START_WEEK"],'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_START_WEEK", $_POST["MAIN_START_WEEK"],'chaine',0,'',$conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_SHOW_LOGO", $_POST["MAIN_SHOW_LOGO"],'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_SHOW_LOGO", $_POST["MAIN_SHOW_LOGO"],'chaine',0,'',$conf->entity);
|
||||||
@ -193,7 +193,7 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') // Edit
|
|||||||
// Use Ajax popups for confirmation
|
// Use Ajax popups for confirmation
|
||||||
/*$var=!$var;
|
/*$var=!$var;
|
||||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("ConfirmAjax").'</td><td>';
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("ConfirmAjax").'</td><td>';
|
||||||
print $html->selectyesno('main_confirm_ajax',isset($conf->global->MAIN_CONFIRM_AJAX)?$conf->global->MAIN_CONFIRM_AJAX:0,1);
|
print $html->selectyesno('MAIN_CONFIRM_AJAX',isset($conf->global->MAIN_CONFIRM_AJAX)?$conf->global->MAIN_CONFIRM_AJAX:0,1);
|
||||||
print ' ('.$langs->trans("AvailableOnlyIfJavascriptAndAjaxNotDisabled").')';
|
print ' ('.$langs->trans("AvailableOnlyIfJavascriptAndAjaxNotDisabled").')';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="20">';
|
print '<td width="20">';
|
||||||
@ -211,7 +211,7 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') // Edit
|
|||||||
//'eldy'=>$langs->trans("Yes").' (style eldy)',
|
//'eldy'=>$langs->trans("Yes").' (style eldy)',
|
||||||
//'andre'=>$langs->trans("Yes").' (style andre)'
|
//'andre'=>$langs->trans("Yes").' (style andre)'
|
||||||
);
|
);
|
||||||
print $html->selectarray('main_popup_calendar',$liste_popup_calendar,$conf->global->MAIN_POPUP_CALENDAR);
|
print $html->selectarray('MAIN_POPUP_CALENDAR',$liste_popup_calendar,$conf->global->MAIN_POPUP_CALENDAR);
|
||||||
print ' ('.$langs->trans("AvailableOnlyIfJavascriptNotDisabled").')';
|
print ' ('.$langs->trans("AvailableOnlyIfJavascriptNotDisabled").')';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="20"> </td>';
|
print '<td width="20"> </td>';
|
||||||
|
|||||||
@ -314,7 +314,6 @@ class Conf
|
|||||||
if (! $this->use_javascript_ajax)
|
if (! $this->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
$this->global->PRODUIT_USE_SEARCH_TO_SELECT=0;
|
$this->global->PRODUIT_USE_SEARCH_TO_SELECT=0;
|
||||||
$this->global->MAIN_CONFIRM_AJAX=0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// conf->monnaie
|
// conf->monnaie
|
||||||
|
|||||||
@ -2037,7 +2037,7 @@ class Form
|
|||||||
|
|
||||||
$formconfirm.= "\n<!-- begin form_confirm -->\n";
|
$formconfirm.= "\n<!-- begin form_confirm -->\n";
|
||||||
|
|
||||||
if ($useajax && $conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
if ($useajax && $conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
$autoOpen=true;
|
$autoOpen=true;
|
||||||
$dialogconfirm='dialog-confirm';
|
$dialogconfirm='dialog-confirm';
|
||||||
|
|||||||
@ -45,8 +45,6 @@ insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_M
|
|||||||
|
|
||||||
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_UPLOAD_DOC','2048','chaine','Max size for file upload (0 means no upload allowed)',0,0);
|
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_UPLOAD_DOC','2048','chaine','Max size for file upload (0 means no upload allowed)',0,0);
|
||||||
|
|
||||||
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_CONFIRM_AJAX','1','chaine','Use Ajax popup to make confirmations',0,0);
|
|
||||||
|
|
||||||
-- Hidden but specific to one entity
|
-- Hidden but specific to one entity
|
||||||
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_MONNAIE','EUR','chaine','Monnaie',0,1);
|
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_MONNAIE','EUR','chaine','Monnaie',0,1);
|
||||||
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_MAIL_EMAIL_FROM','dolibarr-robot@domain.com','chaine','EMail emetteur pour les emails automatiques Dolibarr',0,1);
|
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_MAIL_EMAIL_FROM','dolibarr-robot@domain.com','chaine','EMail emetteur pour les emails automatiques Dolibarr',0,1);
|
||||||
|
|||||||
@ -42,6 +42,7 @@ DELETE FROM llx_const WHERE __DECRYPT('name')__ = 'MAIN_MENU_BARRELEFT';
|
|||||||
DELETE FROM llx_const WHERE __DECRYPT('name')__ = 'MAIN_MENUFRONT_BARRELEFT';
|
DELETE FROM llx_const WHERE __DECRYPT('name')__ = 'MAIN_MENUFRONT_BARRELEFT';
|
||||||
|
|
||||||
DELETE FROM llx_const WHERE __DECRYPT('name')__ = 'MAIN_POPUP_CALENDAR' and value in ('1','eldy');
|
DELETE FROM llx_const WHERE __DECRYPT('name')__ = 'MAIN_POPUP_CALENDAR' and value in ('1','eldy');
|
||||||
|
DELETE FROM llx_const WHERE __DECRYPT('name')__ = 'MAIN_CONFIRM_AJAX';
|
||||||
|
|
||||||
ALTER TABLE llx_facture_fourn ADD COLUMN ref_ext varchar(30) AFTER entity;
|
ALTER TABLE llx_facture_fourn ADD COLUMN ref_ext varchar(30) AFTER entity;
|
||||||
ALTER TABLE llx_commande_fournisseur ADD COLUMN ref_ext varchar(30) AFTER entity;
|
ALTER TABLE llx_commande_fournisseur ADD COLUMN ref_ext varchar(30) AFTER entity;
|
||||||
|
|||||||
@ -1033,7 +1033,7 @@ if ($id || $ref)
|
|||||||
dol_fiche_head($head, 'card', $titre, 0, $picto);
|
dol_fiche_head($head, 'card', $titre, 0, $picto);
|
||||||
|
|
||||||
// Confirm delete product
|
// Confirm delete product
|
||||||
if ($action == 'delete' || ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX))
|
if ($action == 'delete' || $conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
$ret=$html->form_confirm("fiche.php?id=".$product->id,$langs->trans("DeleteProduct"),$langs->trans("ConfirmDeleteProduct"),"confirm_delete",'',0,"action-delete");
|
$ret=$html->form_confirm("fiche.php?id=".$product->id,$langs->trans("DeleteProduct"),$langs->trans("ConfirmDeleteProduct"),"confirm_delete",'',0,"action-delete");
|
||||||
if ($ret == 'html') print '<br>';
|
if ($ret == 'html') print '<br>';
|
||||||
@ -1197,7 +1197,7 @@ else if ($action != 'create')
|
|||||||
|
|
||||||
|
|
||||||
// Clone confirmation
|
// Clone confirmation
|
||||||
if ($action == 'clone' || ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX) )
|
if ($action == 'clone' || $conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
// Create an array for form
|
// Create an array for form
|
||||||
$formquestion=array(
|
$formquestion=array(
|
||||||
@ -1227,7 +1227,7 @@ if ($action == '')
|
|||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&id='.$product->id.'">'.$langs->trans("Modify").'</a>';
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&id='.$product->id.'">'.$langs->trans("Modify").'</a>';
|
||||||
|
|
||||||
if ($product->no_button_copy <> 1) {
|
if ($product->no_button_copy <> 1) {
|
||||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX) {
|
if ($conf->use_javascript_ajax) {
|
||||||
print '<span id="action-clone" class="butAction">'.$langs->trans('ToClone').'</span>'."\n";
|
print '<span id="action-clone" class="butAction">'.$langs->trans('ToClone').'</span>'."\n";
|
||||||
} else {
|
} else {
|
||||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=clone&id='.$product->id.'">'.$langs->trans("ToClone").'</a>';
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=clone&id='.$product->id.'">'.$langs->trans("ToClone").'</a>';
|
||||||
@ -1241,7 +1241,7 @@ if ($action == '')
|
|||||||
{
|
{
|
||||||
if (! $product_is_used && $product->no_button_delete <> 1)
|
if (! $product_is_used && $product->no_button_delete <> 1)
|
||||||
{
|
{
|
||||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
if ($conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
print '<span id="action-delete" class="butActionDelete">'.$langs->trans('Delete').'</span>'."\n";
|
print '<span id="action-delete" class="butActionDelete">'.$langs->trans('Delete').'</span>'."\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -149,7 +149,7 @@ class ActionsCardDefault extends ActionsCardCommon
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Confirm delete third party
|
// Confirm delete third party
|
||||||
if ($_GET["action"] == 'delete' || ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX))
|
if ($_GET["action"] == 'delete' || $conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
$this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$this->object->id,$langs->trans("DeleteACompany"),$langs->trans("ConfirmDeleteCompany"),"confirm_delete",'',0,"1,action-delete");
|
$this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$this->object->id,$langs->trans("DeleteACompany"),$langs->trans("ConfirmDeleteCompany"),"confirm_delete",'',0,"1,action-delete");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -238,7 +238,7 @@ for ($i=1; $i<=4; $i++) {
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ($user->rights->societe->supprimer) { ?>
|
<?php if ($user->rights->societe->supprimer) { ?>
|
||||||
<?php if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX) { ?>
|
<?php if ($conf->use_javascript_ajax) { ?>
|
||||||
<span id="action-delete" class="butActionDelete"><?php echo $langs->trans('Delete'); ?></span>
|
<span id="action-delete" class="butActionDelete"><?php echo $langs->trans('Delete'); ?></span>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<a class="butActionDelete" href="<?php echo $_SERVER["PHP_SELF"].'?socid='.$this->control->tpl['id'].'&action=delete&canvas='.$canvas; ?>"><?php echo $langs->trans('Delete'); ?></a>
|
<a class="butActionDelete" href="<?php echo $_SERVER["PHP_SELF"].'?socid='.$this->control->tpl['id'].'&action=delete&canvas='.$canvas; ?>"><?php echo $langs->trans('Delete'); ?></a>
|
||||||
|
|||||||
@ -99,7 +99,7 @@ class ActionsCardIndividual extends ActionsCardCommon
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Confirm delete third party
|
// Confirm delete third party
|
||||||
if ($_GET["action"] == 'delete' || ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX))
|
if ($_GET["action"] == 'delete' || $conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
$this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$this->object->id,$langs->trans("DeleteAnIndividual"),$langs->trans("ConfirmDeleteIndividual"),"confirm_delete",'',0,"1,action-delete");
|
$this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$this->object->id,$langs->trans("DeleteAnIndividual"),$langs->trans("ConfirmDeleteIndividual"),"confirm_delete",'',0,"1,action-delete");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -179,7 +179,7 @@
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if ($user->rights->societe->supprimer) { ?>
|
<?php if ($user->rights->societe->supprimer) { ?>
|
||||||
<?php if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX) { ?>
|
<?php if ($conf->use_javascript_ajax) { ?>
|
||||||
<span id="action-delete" class="butActionDelete"><?php echo $langs->trans('Delete'); ?></span>
|
<span id="action-delete" class="butActionDelete"><?php echo $langs->trans('Delete'); ?></span>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<a class="butActionDelete" href="<?php echo $_SERVER["PHP_SELF"].'?socid='.$this->control->tpl['id'].'&action=delete&canvas='.$canvas; ?>"><?php echo $langs->trans('Delete'); ?></a>
|
<a class="butActionDelete" href="<?php echo $_SERVER["PHP_SELF"].'?socid='.$this->control->tpl['id'].'&action=delete&canvas='.$canvas; ?>"><?php echo $langs->trans('Delete'); ?></a>
|
||||||
|
|||||||
@ -1328,7 +1328,7 @@ else
|
|||||||
|
|
||||||
|
|
||||||
// Confirm delete third party
|
// Confirm delete third party
|
||||||
if ($action == 'delete' || ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX))
|
if ($action == 'delete' || $conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
$ret=$html->form_confirm($_SERVER["PHP_SELF"]."?socid=".$soc->id,$langs->trans("DeleteACompany"),$langs->trans("ConfirmDeleteCompany"),"confirm_delete",'',0,"action-delete");
|
$ret=$html->form_confirm($_SERVER["PHP_SELF"]."?socid=".$soc->id,$langs->trans("DeleteACompany"),$langs->trans("ConfirmDeleteCompany"),"confirm_delete",'',0,"action-delete");
|
||||||
@ -1701,7 +1701,7 @@ else
|
|||||||
|
|
||||||
if ($user->rights->societe->supprimer)
|
if ($user->rights->societe->supprimer)
|
||||||
{
|
{
|
||||||
if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
|
if ($conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
print '<span id="action-delete" class="butActionDelete">'.$langs->trans('Delete').'</span>'."\n";
|
print '<span id="action-delete" class="butActionDelete">'.$langs->trans('Delete').'</span>'."\n";
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user