From 4b246bfb6849f396e7ecfceea6139f513e75972f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 14 Jul 2010 22:23:14 +0000 Subject: [PATCH] New: Default choice for interactive confirm box is yes by default, and no only for delete actions. This reduce number of clicks required to validate actions and is still safe to dangerous actions. --- ChangeLog | 3 +++ htdocs/compta/facture.php | 18 +++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 85eeaeb56e3..7454e634a83 100644 --- a/ChangeLog +++ b/ChangeLog @@ -58,6 +58,9 @@ For users: - New: Postgresql experimental support seems to work completely. - New: Changes in Dolibarr core to allow to use cache servers (see Memcached module on dolistore.com). +- New: Default choice for interactive confirm box is yes by default, and no only for + delete actions. This reduce number of clicks required to validate actions and + is still safe to dangerous actions. - Fix: Durations are correctly shown for languages using PM/AM dates. - Fix: A lot of fixes in Point of Sale module. - Fix: Debug experimental module widthrawal. diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 130e2f1c5cc..749bdcfe3d8 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -881,7 +881,7 @@ if (($_POST['action'] == 'addline' || $_POST['action'] == 'addline_predef') && $ $desc=$_POST['dp_desc']; $type=$_POST["type"]; } - + $localtax1_tx=get_localtax($tva_tx,1,$fac->client); $localtax2_tx=get_localtax($tva_tx,2,$fac->client); @@ -1683,14 +1683,14 @@ if ($_GET['action'] == 'create') if ($mysoc->pays_code=='ES' && $conf->global->MAIN_FEATURES_LEVEL >= 1) { if ($mysoc->localtax1_assuj=="1") //Localtax1 RE - { + { print ''.$langs->transcountry("AmountLT1",$mysoc->pays_code).''.price($object->total_localtax1).""; } - + if ($mysoc->localtax2_assuj=="1") //Localtax2 IRPF { print ''.$langs->transcountry("AmountLT2",$mysoc->pays_code).''.price($object->total_localtax2).""; - } + } } print ''.$langs->trans('TotalTTC').''.price($object->total_ttc).""; } @@ -1968,7 +1968,7 @@ else if ($_GET['action'] == 'converttoreduc') { $text=$langs->trans('ConfirmConvertToReduc'); - $ret=$html->form_confirm($_SERVER['PHP_SELF'].'?facid='.$fac->id,$langs->trans('ConvertToReduc'),$text,'confirm_converttoreduc','',0,2); + $ret=$html->form_confirm($_SERVER['PHP_SELF'].'?facid='.$fac->id,$langs->trans('ConvertToReduc'),$text,'confirm_converttoreduc','',"yes",2); if ($ret == 'html') print '
'; } @@ -2010,14 +2010,14 @@ else $text.=$notify->confirmMessage('NOTIFY_VAL_FAC',$fac->socid); } - $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?facid='.$fac->id,$langs->trans('ValidateBill'),$text,'confirm_valid','',0,($conf->notification->enabled?0:2)); + $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?facid='.$fac->id,$langs->trans('ValidateBill'),$text,'confirm_valid','',"yes",($conf->notification->enabled?0:2)); if ($ret == 'html') print '
'; } // Confirmation du classement paye if ($_GET['action'] == 'paid' && $resteapayer <= 0) { - $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?facid='.$fac->id,$langs->trans('ClassifyPaid'),$langs->trans('ConfirmClassifyPaidBill',$fac->ref),'confirm_paid','',0,1); + $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?facid='.$fac->id,$langs->trans('ClassifyPaid'),$langs->trans('ConfirmClassifyPaidBill',$fac->ref),'confirm_paid','',"yes",1); if ($ret == 'html') print '
'; } if ($_GET['action'] == 'paid' && $resteapayer > 0) @@ -2047,7 +2047,7 @@ else array('type' => 'text', 'name' => 'close_note', 'label' => $langs->trans("Comment"), 'value' => '', 'size' => '100') ); // Paiement incomplet. On demande si motif = escompte ou autre - $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?facid='.$fac->id,$langs->trans('ClassifyPaid'),$langs->trans('ConfirmClassifyPaidPartially',$fac->ref),'confirm_paid_partially',$formquestion); + $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?facid='.$fac->id,$langs->trans('ClassifyPaid'),$langs->trans('ConfirmClassifyPaidPartially',$fac->ref),'confirm_paid_partially',$formquestion,"yes"); if ($ret == 'html') print '
'; } @@ -2088,7 +2088,7 @@ else array('type' => 'text', 'name' => 'close_note', 'label' => $langs->trans("Comment"), 'value' => '', 'size' => '100') ); - $ret=$html->form_confirm($_SERVER['PHP_SELF'].'?facid='.$fac->id,$langs->trans('CancelBill'),$langs->trans('ConfirmCancelBill',$fac->ref),'confirm_canceled',$formquestion); + $ret=$html->form_confirm($_SERVER['PHP_SELF'].'?facid='.$fac->id,$langs->trans('CancelBill'),$langs->trans('ConfirmCancelBill',$fac->ref),'confirm_canceled',$formquestion,"yes"); if ($ret == 'html') print '
'; } }