diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php
index 842c8d01470..8215bdbe0b1 100644
--- a/htdocs/admin/agenda_other.php
+++ b/htdocs/admin/agenda_other.php
@@ -356,7 +356,7 @@ print '
-
+
+
-
-
+ ';
}
+// Staff
+if (! empty($arrayfields['staff.code']['checked']))
+{
+ print '';
+ print $form->selectarray("search_staff", $formcompany->effectif_array(0), $search_staff, 0, 0, 0, '', 0, 0, 0, $sort, 'maxwidth100');
+ print ' ';
+}
if (! empty($arrayfields['s.email']['checked']))
{
// Email
@@ -888,37 +840,16 @@ if (! empty($arrayfields['customerorsupplier']['checked']))
print ''.$langs->trans('Others').' ';
print '';
}
+// Prospect level
if (! empty($arrayfields['s.fk_prospectlevel']['checked']))
{
- // Prospect level
print '';
- $options_from = ' '; // Generate in $options_from the list of each option sorted
- foreach ($tab_level as $tab_level_sortorder => $tab_level_label)
- {
- $options_from .= '';
- $options_from .= $langs->trans($tab_level_label);
- $options_from .= ' ';
- }
- array_reverse($tab_level, true); // Reverse the list
- $options_to = ' '; // Generate in $options_to the list of each option sorted in the reversed order
- foreach ($tab_level as $tab_level_sortorder => $tab_level_label)
- {
- $options_to .= '';
- $options_to .= $langs->trans($tab_level_label);
- $options_to .= ' ';
- }
-
- // Print these two select
- print $langs->trans("From").' '.$options_from.' ';
- print ' ';
- print $langs->trans("to").' '.$options_to.' ';
-
+ print $form->multiselectarray('search_level', $tab_level, $search_level, 0, 0, 'width75', 0, 0, '', '', '', 2);
print ' ';
}
-
+// Prospect status
if (! empty($arrayfields['s.fk_stcomm']['checked']))
{
- // Prospect status
print '';
$arraystcomm=array();
foreach($prospectstatic->cacheprospectstatus as $key => $val)
@@ -950,7 +881,7 @@ if (! empty($arrayfields['s.tms']['checked']))
// Status
if (! empty($arrayfields['s.status']['checked']))
{
- print ' ';
+ print ' ';
print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')), $search_status, 1);
print ' ';
}
@@ -983,6 +914,7 @@ if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titr
if (! empty($arrayfields['region.nom']['checked'])) print_liste_field_titre($arrayfields['region.nom']['label'],$_SERVER["PHP_SELF"],"region.nom","",$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'],$_SERVER["PHP_SELF"],"country.code_iso","",$param,'align="center"',$sortfield,$sortorder);
if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'],$_SERVER["PHP_SELF"],"typent.code","",$param,'align="center"',$sortfield,$sortorder);
+if (! empty($arrayfields['staff.code']['checked'])) print_liste_field_titre($arrayfields['staff.code']['label'],$_SERVER["PHP_SELF"],"staff.code","",$param,'align="center"',$sortfield,$sortorder);
if (! empty($arrayfields['s.email']['checked'])) print_liste_field_titre($arrayfields['s.email']['label'],$_SERVER["PHP_SELF"],"s.email","",$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['s.phone']['checked'])) print_liste_field_titre($arrayfields['s.phone']['label'],$_SERVER["PHP_SELF"],"s.phone","",$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['s.fax']['checked'])) print_liste_field_titre($arrayfields['s.fax']['label'],$_SERVER["PHP_SELF"],"s.fax","",$param,'',$sortfield,$sortorder);
@@ -1131,6 +1063,15 @@ while ($i < min($num, $limit))
print '';
if (! $i) $totalarray['nbfield']++;
}
+ // Staff
+ if (! empty($arrayfields['staff.code']['checked']))
+ {
+ print '';
+ if (! is_array($staffArray) || count($staffArray)==0) $staffArray = $formcompany->effectif_array(1);
+ print $staffArray[$obj->staff_code];
+ print ' ';
+ if (! $i) $totalarray['nbfield']++;
+ }
if (! empty($arrayfields['s.email']['checked']))
{
print "".$obj->email." \n";
diff --git a/htdocs/stripe/charge.php b/htdocs/stripe/charge.php
index b5f0238e9a2..b9b654e6553 100644
--- a/htdocs/stripe/charge.php
+++ b/htdocs/stripe/charge.php
@@ -62,14 +62,16 @@ llxHeader('', $langs->trans("StripeChargeList"));
if (! empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox','alpha')))
{
$service = 'StripeTest';
+ $servicestatus = '0';
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning');
}
else
{
- $service = 'StripeLive';
+ $service = 'StripeLive';
+ $servicestatus = '1';
}
-$stripeaccount = $stripe->getStripeAccount($service);
+$stripeacc = $stripe->getStripeAccount($service);
/*if (empty($stripeaccount))
{
print $langs->trans('ErrorStripeAccountNotDefined');
@@ -87,7 +89,7 @@ if (!$rowid)
print ' ';
$title=$langs->trans("StripeChargeList");
- $title.=($stripeaccount?' (Stripe connection with Stripe OAuth Connect account '.$stripeaccount.')':' (Stripe connection with keys from Stripe module setup)');
+ $title.=($stripeacc?' (Stripe connection with Stripe OAuth Connect account '.$stripeacc.')':' (Stripe connection with keys from Stripe module setup)');
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num, $totalnboflines, 'title_accountancy.png', 0, '', '', $limit);
@@ -107,9 +109,9 @@ if (!$rowid)
print " \n";
- if ($stripeaccount)
+ if ($stripeacc)
{
- $list=\Stripe\Charge::all(array("limit" => $limit), array("stripe_account" => $stripeaccount));
+ $list=\Stripe\Charge::all(array("limit" => $limit), array("stripe_account" => $stripeacc));
}
else
{
@@ -147,15 +149,28 @@ if (!$rowid)
}
print '';
+
+ if (! empty($conf->stripe->enabled) && !empty($stripeacc)) $connect=$stripeacc.'/';
+
// Ref
- $url='https://dashboard.stripe.com/test/payments/'.$charge->id;
+ $url='https://dashboard.stripe.com/'.$connect.'test/payments/'.$charge->id;
if ($servicestatus)
{
- $url='https://dashboard.stripe.com/payments/'.$charge->id;
+ $url='https://dashboard.stripe.com/'.$connect.'payments/'.$charge->id;
}
print "".img_picto($langs->trans('ShowInStripe'), 'object_globe')." ".$charge->id." \n";
// Stripe customer
- print "".$charge->customer." \n";
+ print "";
+
+ if (! empty($conf->stripe->enabled) && !empty($stripeacc)) $connect=$stripeacc.'/';
+ $url='https://dashboard.stripe.com/'.$connect.'test/customers/'.$charge->customer;
+ if ($servicestatus)
+ {
+ $url='https://dashboard.stripe.com/'.$connect.'customers/'.$charge->customer;
+ }
+ print ' '.img_picto($langs->trans('ShowInStripe'), 'object_globe').' '.$charge->customer.' ';
+
+ print " \n";
// Link
print "";
if ($societestatic->id > 0)
@@ -198,7 +213,7 @@ if (!$rowid)
}
print ' ';
// Amount
- print "".price(($charge->amount-$charge->amount_refunded)/100)." ";
+ print "".price(($charge->amount-$charge->amount_refunded)/100, 0, '', 1, - 1, - 1, strtoupper($charge->currency))." ";
// Status
print '';
if ($charge->refunded=='1'){
diff --git a/htdocs/stripe/transaction.php b/htdocs/stripe/transaction.php
index af40eaa42c9..d548e10e257 100644
--- a/htdocs/stripe/transaction.php
+++ b/htdocs/stripe/transaction.php
@@ -103,7 +103,7 @@ if (! $rowid) {
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
//print_liste_field_titre("StripeCustomerId",$_SERVER["PHP_SELF"],"","","","",$sortfield,$sortorder);
//print_liste_field_titre("CustomerId", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
- print_liste_field_titre("Origin", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
+ //print_liste_field_titre("Origin", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "", "", "", 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "", "", "", 'align="left"', $sortfield, $sortorder);
print_liste_field_titre("Paid", $_SERVER["PHP_SELF"], "", "", "", 'align="right"', $sortfield, $sortorder);
@@ -177,28 +177,35 @@ if (! $rowid) {
}
print " \n";*/
// Origine
- print "";
- print $FULLTAG;
- if ($charge->metadata->source=="order"){
- $object = new Commande($db);
- $object->fetch($charge->metadata->idsource);
- print "".img_picto('', 'object_order')." ".$object->ref." ";
- } elseif ($charge->metadata->source=="invoice") {
- $object = new Facture($db);
- $object->fetch($charge->metadata->idsource);
- print "".img_picto('', 'object_invoice')." ".$object->ref." ";
- }
- print " \n";
+
+ //print "";
+ ////if ($charge->metadata->dol_type=="order"){
+ // $object = new Commande($db);
+ // $object->fetch($charge->metadata->dol_id);
+ // print "".img_picto('', 'object_order')." ".$object->ref." ";
+ //} elseif ($charge->metadata->dol_type=="invoice"){
+ // $object = new Facture($db);
+ // $object->fetch($charge->metadata->dol_id);
+ // print "".img_picto('', 'object_invoice')." ".$object->ref." ";
+ //}
+ //print " \n";
// Date payment
print '' . dol_print_date($txn->created, '%d/%m/%Y %H:%M') . " \n";
// Type
print '' . $txn->type . ' ';
// Amount
- print "" . price(($txn->amount) / 100) . " ";
- print "" . price(($txn->fee) / 100) . " ";
+ print "" . price(($txn->amount) / 100, 0, '', 1, - 1, - 1, strtoupper($txn->currency)) . " ";
+ print "" . price(($txn->fee) / 100, 0, '', 1, - 1, - 1, strtoupper($txn->currency)) . " ";
// Status
print "";
- print $txn->status;
+ if ($txn->status=='available')
+ {
+ print img_picto($langs->trans("".$txn->status.""),'statut4');}
+elseif ($txn->status=='pending')
+ {print img_picto($langs->trans("".$txn->status.""),'statut7');}
+elseif ($txn->status=='failed')
+ {
+ print img_picto($langs->trans("".$txn->status.""),'statut8');}
print ' ';
print " \n";
}
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index b4bed51a5e5..e3664554e14 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -1884,16 +1884,27 @@ if (! empty($conf->global->MAIN_LOGIN_BACKGROUND)) {
}
.login_table input#username, .login_table input#password, .login_table input#securitycode {
border: none;
- border-bottom: solid 1px rgba(180,180,180,.4);
+ /* border-bottom: solid 1px rgba(180,180,180,.4); */
padding: 5px;
margin-left: 5px;
margin-top: 5px;
+ margin-bottom: 5px;
}
.login_table input#username:focus, .login_table input#password:focus, .login_table input#securitycode:focus {
outline: none !important;
- /* box-shadow: none;
- -webkit-box-shadow: 0 0 0 50px #FFF inset;
- box-shadow: 0 0 0 50px #FFF inset;*/
+}
+.login_table .trinputlogin {
+ margin: 8px;
+}
+.login_table .tdinputlogin {
+ background-color: #fff;
+ border: 2px solid #ccc;
+ min-width: 200px;
+ border-radius: 2px;
+}
+.login_table .tdinputlogin .fa {
+ padding-left: 10px;
+ width: 14px;
}
.login_main_message {
text-align: center;
@@ -2707,7 +2718,9 @@ table.paddingtopbottomonly tr td {
background: rgb() !important;
}
tr.liste_titre_filter td.liste_titre {
-/* border-bottom: 1px solid #ddd; */
+ /* border-bottom: 1px solid #ddd; */
+ padding-top: 2px;
+ padding-bottom: 2px;
}
.liste_titre_create td, .liste_titre_create th, .liste_titre_create .tagtd
{
@@ -4902,7 +4915,81 @@ span.noborderoncategories {
/* ============================================================================== */
-/* Multiselect with checkbox */
+/* External lib multiselect with checkbox */
+/* ============================================================================== */
+
+.multi-select-container {
+ display: inline-block;
+ position: relative;
+}
+
+.multi-select-menu {
+ position: absolute;
+ left: 0;
+ top: 0.8em;
+ float: left;
+ min-width: 100%;
+ background: #fff;
+ margin: 1em 0;
+ padding: 0.4em 0;
+ border: 1px solid #aaa;
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
+ display: none;
+}
+
+.multi-select-menu input {
+ margin-right: 0.3em;
+ vertical-align: 0.1em;
+}
+
+.multi-select-button {
+ display: inline-block;
+ max-width: 20em;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ vertical-align: middle;
+ background-color: #fff;
+ cursor: default;
+
+ border: none;
+ border-bottom: solid 1px rgba(0,0,0,.2);
+ padding: 5px;
+ padding-left: 2px;
+ height: 17px;
+}
+.multi-select-button:focus {
+ outline: none;
+ border-bottom: 1px solid #666;
+}
+
+.multi-select-button:after {
+ content: "";
+ display: inline-block;
+ width: 0;
+ height: 0;
+ border-style: solid;
+ border-width: 0.5em 0.23em 0em 0.23em;
+ border-color: #444 transparent transparent transparent;
+ margin-left: 0.4em;
+}
+
+.multi-select-container--open .multi-select-menu { display: block; }
+
+.multi-select-container--open .multi-select-button:after {
+ border-width: 0 0.4em 0.4em 0.4em;
+ border-color: transparent transparent #999 transparent;
+}
+
+.multi-select-menuitem {
+ clear: both;
+ float: left;
+ padding-left: 5px
+}
+
+
+/* ============================================================================== */
+/* Native multiselect with checkbox */
/* ============================================================================== */
ul.ulselectedfields {
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index bb75cde5332..049288664a6 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -1875,17 +1875,29 @@ form#login {
}
.login_table input#username, .login_table input#password, .login_table input#securitycode{
border: none;
- border-bottom: solid 1px rgba(180,180,180,.4);
+ /* border-bottom: solid 1px rgba(180,180,180,.4); */
padding: 5px;
margin-left: 18px;
margin-top: 5px;
+ margin-bottom: 5px;
}
.login_table input#username:focus, .login_table input#password:focus, .login_table input#securitycode:focus {
outline: none !important;
- /* box-shadow: none;
- -webkit-box-shadow: 0 0 0 50px #FFF inset;
- box-shadow: 0 0 0 50px #FFF inset;*/
}
+.login_table .trinputlogin {
+ margin: 8px;
+}
+.login_table .tdinputlogin {
+ background-color: #fff;
+ border: 2px solid #ccc;
+ min-width: 200px;
+ border-radius: 2px;
+}
+.login_table .tdinputlogin .fa {
+ padding-left: 10px;
+ width: 14px;
+}
+
.login_main_message {
text-align: center;
max-width: 570px;
@@ -2673,6 +2685,8 @@ table.paddingtopbottomonly tr td {
}
tr.liste_titre_filter td.liste_titre {
border-bottom: 1px solid #FDFFFF;
+ padding-top: 2px;
+ padding-bottom: 2px;
}
.liste_titre_create td, .liste_titre_create th, .liste_titre_create .tagtd
{
@@ -4760,7 +4774,81 @@ span.noborderoncategories {
/* ============================================================================== */
-/* Multiselect with checkbox */
+/* External lib multiselect with checkbox */
+/* ============================================================================== */
+
+.multi-select-container {
+ display: inline-block;
+ position: relative;
+}
+
+.multi-select-menu {
+ position: absolute;
+ left: 0;
+ top: 0.8em;
+ float: left;
+ min-width: 100%;
+ background: #fff;
+ margin: 1em 0;
+ padding: 0.4em 0;
+ border: 1px solid #aaa;
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
+ display: none;
+}
+
+.multi-select-menu input {
+ margin-right: 0.3em;
+ vertical-align: 0.1em;
+}
+
+.multi-select-button {
+ display: inline-block;
+ max-width: 20em;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ vertical-align: middle;
+ background-color: #fff;
+ cursor: default;
+
+ border: none;
+ border-bottom: solid 1px rgba(0,0,0,.2);
+ padding: 5px;
+ padding-left: 2px;
+ height: 17px;
+}
+.multi-select-button:focus {
+ outline: none;
+ border-bottom: 1px solid #666;
+}
+
+.multi-select-button:after {
+ content: "";
+ display: inline-block;
+ width: 0;
+ height: 0;
+ border-style: solid;
+ border-width: 0.5em 0.23em 0em 0.23em;
+ border-color: #444 transparent transparent transparent;
+ margin-left: 0.4em;
+}
+
+.multi-select-container--open .multi-select-menu { display: block; }
+
+.multi-select-container--open .multi-select-button:after {
+ border-width: 0 0.4em 0.4em 0.4em;
+ border-color: transparent transparent #999 transparent;
+}
+
+.multi-select-menuitem {
+ clear: both;
+ float: left;
+ padding-left: 5px
+}
+
+
+/* ============================================================================== */
+/* Native multiselect with checkbox */
/* ============================================================================== */
ul.ulselectedfields {
diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php
index 6cb418ff641..563ff54c490 100644
--- a/htdocs/user/param_ihm.php
+++ b/htdocs/user/param_ihm.php
@@ -110,6 +110,12 @@ if (empty($reshook)) {
$tabparam["MAIN_SIZE_LISTE_LIMIT"] = '';
}
+ if (GETPOST("check_AGENDA_DEFAULT_VIEW") == "on") {
+ $tabparam["AGENDA_DEFAULT_VIEW"] = $_POST["AGENDA_DEFAULT_VIEW"];
+ } else {
+ $tabparam["AGENDA_DEFAULT_VIEW"] = '';
+ }
+
if (GETPOST("check_MAIN_THEME") == "on") {
$tabparam["MAIN_THEME"] = $_POST["main_theme"];
} else {
@@ -223,6 +229,9 @@ if ($action == 'edit')
if (jQuery("#check_SIZE_LISTE_LIMIT").prop("checked")) { jQuery("#main_size_liste_limit").removeAttr(\'disabled\'); }
else { jQuery("#main_size_liste_limit").attr(\'disabled\',\'disabled\'); }
+ if (jQuery("#check_AGENDA_DEFAULT_VIEW").prop("checked")) { jQuery("#AGENDA_DEFAULT_VIEW").removeAttr(\'disabled\'); }
+ else { jQuery("#AGENDA_DEFAULT_VIEW").attr(\'disabled\',\'disabled\'); }
+
if (jQuery("#check_MAIN_THEME").prop("checked")) { jQuery(".themethumbs").removeAttr(\'disabled\'); }
else { jQuery(".themethumbs").attr(\'disabled\',\'disabled\'); }
@@ -231,8 +240,9 @@ if ($action == 'edit')
}
init_myfunc();
jQuery("#check_MAIN_LANDING_PAGE").click(function() { init_myfunc(); });
- jQuery("#check_SIZE_LISTE_LIMIT").click(function() { init_myfunc(); });
jQuery("#check_MAIN_LANG_DEFAULT").click(function() { init_myfunc(); });
+ jQuery("#check_SIZE_LISTE_LIMIT").click(function() { init_myfunc(); });
+ jQuery("#check_AGENDA_DEFAULT_VIEW").click(function() { init_myfunc(); });
jQuery("#check_MAIN_THEME").click(function() { init_myfunc(); });
jQuery("#check_THEME_ELDY_TOPMENU_BACK1").click(function() { init_myfunc(); });
jQuery("#check_THEME_ELDY_BACKTITLE1").click(function() { init_myfunc(); });
@@ -251,7 +261,7 @@ if ($action == 'edit')
print '';
print (empty($conf->global->MAIN_LANDING_PAGE)?'':$conf->global->MAIN_LANDING_PAGE);
print ' ';
- print ' conf->MAIN_LANDING_PAGE)?" checked":"");
+ print ' conf->MAIN_LANDING_PAGE)?" checked":"");
print empty($dolibarr_main_demo)?'':' disabled="disabled"'; // Disabled for demo
print '> '.$langs->trans("UsePersonalValue").' ';
print '';
@@ -259,28 +269,40 @@ if ($action == 'edit')
//print info_admin($langs->trans("WarningYouMayLooseAccess"), 0, 0, 0);
print ' ';
- // Langue par defaut
+ // Language by default
print ''.$langs->trans("Language").' ';
print '';
$s=picto_from_langcode($conf->global->MAIN_LANG_DEFAULT);
print $s?$s.' ':'';
print ($conf->global->MAIN_LANG_DEFAULT=='auto'?$langs->trans("AutoDetectLang"):$langs->trans("Language_".$conf->global->MAIN_LANG_DEFAULT));
print ' ';
- print ' conf->MAIN_LANG_DEFAULT)?" checked":"");
+ print ' conf->MAIN_LANG_DEFAULT)?" checked":"");
print empty($dolibarr_main_demo)?'':' disabled="disabled"'; // Disabled for demo
print '> '.$langs->trans("UsePersonalValue").' ';
print '';
print $formadmin->select_language((! empty($object->conf->MAIN_LANG_DEFAULT)?$object->conf->MAIN_LANG_DEFAULT:''),'main_lang_default',1,null,0,0,(! empty($dolibarr_main_demo)));
print ' ';
- // Taille max des listes
+ // Max size of lists
print ''.$langs->trans("MaxSizeList").' ';
print ''.$conf->global->MAIN_SIZE_LISTE_LIMIT.' ';
- print ' conf->MAIN_SIZE_LISTE_LIMIT)?" checked":"");
+ print ' conf->MAIN_SIZE_LISTE_LIMIT)?" checked":"");
print empty($dolibarr_main_demo)?'':' disabled="disabled"'; // Disabled for demo
print '> '.$langs->trans("UsePersonalValue").' ';
print ' ';
+ // AGENDA_DEFAULT_VIEW
+ print ''."\n";
+ print ''.$langs->trans("AGENDA_DEFAULT_VIEW").' '."\n";
+ print ' '."\n";
+ print ' conf->AGENDA_DEFAULT_VIEW)?" checked":"");
+ print empty($dolibarr_main_demo)?'':' disabled="disabled"'; // Disabled for demo
+ print '> '.$langs->trans("UsePersonalValue").' ';
+ print ''."\n";
+ $tmplist=array(''=>' ', 'show_list'=>$langs->trans("ViewList"), 'show_month'=>$langs->trans("ViewCal"), 'show_week'=>$langs->trans("ViewWeek"), 'show_day'=>$langs->trans("ViewDay"), 'show_peruser'=>$langs->trans("ViewPerUser"));
+ print $form->selectarray('AGENDA_DEFAULT_VIEW', $tmplist, $object->conf->AGENDA_DEFAULT_VIEW, 0, 0, 0, '');
+ print ' '."\n";
+
print '
';
// Theme
@@ -308,12 +330,11 @@ else
print '
'.$langs->trans("Parameter").' '.$langs->trans("DefaultValue").' '.$langs->trans("PersonalValue").' ';
// Landing page
-
print '
'.$langs->trans("LandingPage").' ';
print '';
print (empty($conf->global->MAIN_LANDING_PAGE)?'':$conf->global->MAIN_LANDING_PAGE);
print ' ';
- print ' conf->MAIN_LANDING_PAGE)?" checked":"");
+ print ' conf->MAIN_LANDING_PAGE)?" checked":"");
print empty($dolibarr_main_demo)?'':' disabled="disabled"'; // Disabled for demo
print '> '.$langs->trans("UsePersonalValue").' ';
print '';
@@ -326,26 +347,35 @@ else
print ' ';
// Language
-
print '
'.$langs->trans("Language").' ';
print '';
$s=picto_from_langcode($conf->global->MAIN_LANG_DEFAULT);
print ($s?$s.' ':'');
print (isset($conf->global->MAIN_LANG_DEFAULT) && $conf->global->MAIN_LANG_DEFAULT=='auto'?$langs->trans("AutoDetectLang"):$langs->trans("Language_".$conf->global->MAIN_LANG_DEFAULT));
print ' ';
- print ' conf->MAIN_LANG_DEFAULT)?" checked":"").'> '.$langs->trans("UsePersonalValue").' ';
+ print ' conf->MAIN_LANG_DEFAULT)?" checked":"").'> '.$langs->trans("UsePersonalValue").' ';
print '';
$s=(isset($object->conf->MAIN_LANG_DEFAULT) ? picto_from_langcode($object->conf->MAIN_LANG_DEFAULT) : '');
print ($s?$s.' ':'');
print (isset($object->conf->MAIN_LANG_DEFAULT) && $object->conf->MAIN_LANG_DEFAULT=='auto'?$langs->trans("AutoDetectLang"):(! empty($object->conf->MAIN_LANG_DEFAULT)?$langs->trans("Language_".$object->conf->MAIN_LANG_DEFAULT):''));
print ' ';
-
+ // Max size for lists
print '
'.$langs->trans("MaxSizeList").' ';
print ''.(! empty($conf->global->MAIN_SIZE_LISTE_LIMIT)?$conf->global->MAIN_SIZE_LISTE_LIMIT:' ').' ';
- print ' conf->MAIN_SIZE_LISTE_LIMIT)?" checked":"").'> '.$langs->trans("UsePersonalValue").' ';
+ print ' conf->MAIN_SIZE_LISTE_LIMIT)?" checked":"").'> '.$langs->trans("UsePersonalValue").' ';
print '' . (! empty($object->conf->MAIN_SIZE_LISTE_LIMIT)?$object->conf->MAIN_SIZE_LISTE_LIMIT:' ') . ' ';
+ // AGENDA_DEFAULT_VIEW
+ print '
'."\n";
+ print ''.$langs->trans("AGENDA_DEFAULT_VIEW").' '."\n";
+ print ' '."\n";
+ print ' conf->AGENDA_DEFAULT_VIEW)?" checked":"").'> '.$langs->trans("UsePersonalValue").' ';
+ print ''."\n";
+ $tmplist=array(''=>' ', 'show_list'=>$langs->trans("ViewList"), 'show_month'=>$langs->trans("ViewCal"), 'show_week'=>$langs->trans("ViewWeek"), 'show_day'=>$langs->trans("ViewDay"), 'show_peruser'=>$langs->trans("ViewPerUser"));
+ if (! empty($object->conf->AGENDA_DEFAULT_VIEW)) print $form->selectarray('AGENDA_DEFAULT_VIEW', $tmplist, $object->conf->AGENDA_DEFAULT_VIEW, 0, 0, 0, '', 0, 0, 1);
+ print ' '."\n";
+
print '
';
diff --git a/test/phpunit/CoreTest.php b/test/phpunit/CoreTest.php
index de4ca050832..63601cb33d3 100644
--- a/test/phpunit/CoreTest.php
+++ b/test/phpunit/CoreTest.php
@@ -260,7 +260,7 @@ class CoreTest extends PHPUnit_Framework_TestCase
* @param string $type 1=GET, 0=POST, 2=PHP_SELF
* @return int >0 if there is an injection
*/
- function test_sql_and_script_inject($val, $type)
+ function testSqlAndScriptInject($val, $type)
{
// phpcs:enable
$inj = 0;
@@ -310,55 +310,55 @@ class CoreTest extends PHPUnit_Framework_TestCase
$expectedresult=0;
$_SERVER["PHP_SELF"]='/DIR WITH SPACE/htdocs/admin/index.php?mainmenu=home&leftmenu=setup&username=weservices';
- $result=test_sql_and_script_inject($_SERVER["PHP_SELF"], 2);
- $this->assertEquals($expectedresult, $result, 'Error on test_sql_and_script_inject 1a');
+ $result=testSqlAndScriptInject($_SERVER["PHP_SELF"], 2);
+ $this->assertEquals($expectedresult, $result, 'Error on testSqlAndScriptInject 1a');
// Should detect XSS
$expectedresult=1;
$_SERVER["PHP_SELF"]='/DIR WITH SPACE/htdocs/admin/index.php?mainmenu=home&leftmenu=setup&username=weservices;badaction';
- $result=test_sql_and_script_inject($_SERVER["PHP_SELF"], 2);
- $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on test_sql_and_script_inject 1b');
+ $result=testSqlAndScriptInject($_SERVER["PHP_SELF"], 2);
+ $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject 1b');
$test="
";
- $result=test_sql_and_script_inject($test, 0);
- $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on test_sql_and_script_inject aaa');
+ $result=testSqlAndScriptInject($test, 0);
+ $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject aaa');
$test="
";
- $result=test_sql_and_script_inject($test, 2);
- $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on test_sql_and_script_inject aaa2');
+ $result=testSqlAndScriptInject($test, 2);
+ $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject aaa2');
$test='
';
- $result=test_sql_and_script_inject($test, 0);
- $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on test_sql_and_script_inject aaa3');
+ $result=testSqlAndScriptInject($test, 0);
+ $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject aaa3');
$test='
';
- $result=test_sql_and_script_inject($test, 0);
- $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on test_sql_and_script_inject aaa4');
+ $result=testSqlAndScriptInject($test, 0);
+ $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject aaa4');
$test='
';
- $result=test_sql_and_script_inject($test, 0);
- $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on test_sql_and_script_inject aaa5');
+ $result=testSqlAndScriptInject($test, 0);
+ $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject aaa5');
$test='
';
- $result=test_sql_and_script_inject($test, 0);
- $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on test_sql_and_script_inject aaa6');
+ $result=testSqlAndScriptInject($test, 0);
+ $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject aaa6');
$test='
';
- $result=test_sql_and_script_inject($test, 0);
- $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on test_sql_and_script_inject aaa7');
+ $result=testSqlAndScriptInject($test, 0);
+ $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject aaa7');
$test='
';
- $result=test_sql_and_script_inject($test, 0);
- $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on test_sql_and_script_inject bbb');
+ $result=testSqlAndScriptInject($test, 0);
+ $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject bbb');
$test='';
- $result=test_sql_and_script_inject($test, 0);
- $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on test_sql_and_script_inject ccc');
+ $result=testSqlAndScriptInject($test, 0);
+ $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject ccc');
$test='
';
- $result=test_sql_and_script_inject($test, 1);
- $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on test_sql_and_script_inject ddd');
+ $result=testSqlAndScriptInject($test, 1);
+ $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject ddd');
$test='
">';
- $result=test_sql_and_script_inject($test, 0);
- $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on test_sql_and_script_inject eee');
+ $result=testSqlAndScriptInject($test, 0);
+ $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject eee');
$test='
';
- $result=test_sql_and_script_inject($test, 0);
- $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on test_sql_and_script_inject eee');
+ $result=testSqlAndScriptInject($test, 0);
+ $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject eee');
$test="
"; // Is locked by some brwoser like chrome because the default directive no-referrer-when-downgrade is sent when requesting the SRC and then refused because of browser protection on img src load without referrer.
$test="
"; // Same
$test='';
- $result=test_sql_and_script_inject($test, 0);
- $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on test_sql_and_script_inject fff1');
+ $result=testSqlAndScriptInject($test, 0);
+ $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject fff1');
$test='';
- $result=test_sql_and_script_inject($test, 0);
- $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on test_sql_and_script_inject fff2');
+ $result=testSqlAndScriptInject($test, 0);
+ $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject fff2');
// This case seems to be filtered by browsers now.
$test='';
- //$result=test_sql_and_script_inject($test, 0);
- //$this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on test_sql_and_script_inject ggg');
+ //$result=testSqlAndScriptInject($test, 0);
+ //$this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject ggg');
$test='