From 2fb806bfc2e4007a40e9b26fe084e4fd0885c0a4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 8 Sep 2014 23:08:59 +0200 Subject: [PATCH 1/7] Fix: duplicate entity encoding into select_array. --- htdocs/core/class/html.form.class.php | 9 +++++---- htdocs/core/lib/ajax.lib.php | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d70e9c32c0b..9b52fd0e497 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3932,11 +3932,12 @@ class Form /** * Return a HTML select string, built from an array of key+value. + * Note: Do not use returned string into a langs->trans function, content may be entity encoded twice. * * @param string $htmlname Name of html select area * @param array $array Array with key+value * @param string $id Preselected key - * @param int $show_empty 1 si il faut ajouter une valeur vide dans la liste, 0 sinon + * @param int $show_empty 0 no empty value allowed, 1 to add an empty value into list (value is '' or ' '). * @param int $key_in_label 1 pour afficher la key dans la valeur "[key] value" * @param int $value_as_key 1 to use value as key * @param string $moreparam Add more parameters onto the select tag @@ -3945,7 +3946,7 @@ class Form * @param int $disabled Html select box is disabled * @param int $sort 'ASC' or 'DESC' =Sort on label, '' or 'NONE'=Do not sort * @param string $morecss Add more class to css styles - * @return string HTML select string + * @return string HTML select string. */ static function selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $moreparam='', $translate=0, $maxlen=0, $disabled=0, $sort='', $morecss='') { @@ -3982,11 +3983,11 @@ class Form if ($key_in_label) { - $selectOptionValue = dol_htmlentitiesbr($key.' - '.($maxlen?dol_trunc($value,$maxlen):$value)); + $selectOptionValue = dol_escape_htmltag($key.' - '.($maxlen?dol_trunc($value,$maxlen):$value)); } else { - $selectOptionValue = dol_htmlentitiesbr($maxlen?dol_trunc($value,$maxlen):$value); + $selectOptionValue = dol_escape_htmltag($maxlen?dol_trunc($value,$maxlen):$value); if ($value == '' || $value == '-') $selectOptionValue=' '; } $out.=$selectOptionValue; diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index f91ec3d188d..673f64e6261 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -337,7 +337,7 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0) width: "500px" */ $msg = ''; - + /* * Show result array */ print '

'; - + $i = 0; print ""; print ""; @@ -404,23 +404,23 @@ if ($action == 'export_csv') { print ""; print ""; print "\n"; - + $var = true; $r = ''; - + $invoicestatic = new Facture($db); $companystatic = new Client($db); - + foreach ( $tabfac as $key => $val ) { $invoicestatic->id = $key; $invoicestatic->ref = $val["ref"]; $invoicestatic->type = $val["type"]; $invoicestatic->description = html_entity_decode(dol_trunc($val["description"], 32)); - + $date = dol_print_date($db->jdate($val["date"]), 'day'); - + print ""; - + // Third party // print ""; print ""; @@ -436,7 +436,7 @@ if ($action == 'export_csv') { print ""; } print ""; - + // Product / Service foreach ( $tabht[$key] as $k => $mt ) { if ($mt) { @@ -451,7 +451,7 @@ if ($action == 'export_csv') { print ""; } } - + // VAT // var_dump($tabtva); foreach ( $tabtva[$key] as $k => $mt ) { @@ -467,12 +467,12 @@ if ($action == 'export_csv') { print ""; } } - + $var = ! $var; } - + print "
" . $langs->trans("Debit") . "" . $langs->trans("Credit") . "
".$conf->global->COMPTA_JOURNAL_SELL."" . $date . "" . ($mt < 0 ? price(- $mt) : '') . "
"; - + // End of page llxFooter(); } diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index 39e72ff7416..1abde51c263 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -54,7 +54,7 @@ class Fiscalyear function __construct($db) { $this->db = $db; - + $this->statuts_short = array(0 => 'Opened', 1 => 'Closed'); $this->statuts = array(0 => 'Opened', 1 => 'Closed'); @@ -70,9 +70,9 @@ class Fiscalyear function create($user) { global $conf; - + $error = 0; - + $now=dol_now(); $this->db->begin(); @@ -88,7 +88,7 @@ class Fiscalyear $sql.= ") VALUES ("; $sql.= " '".$this->label."'"; $sql.= ", '".$this->db->idate($this->date_start)."'"; - $sql.= ", '".$this->db->idate($this->date_end)."'"; + $sql.= ", ".($this->date_end ? "'".$this->db->idate($this->date_end)."'":"null"); $sql.= ", ".$this->statut; $sql.= ", ".$conf->entity; $sql.= ", '".$this->db->idate($now)."'"; @@ -109,19 +109,19 @@ class Fiscalyear } else { - $this->error=$this->db->error(); + $this->error=$this->db->lasterror(); $this->db->rollback(); return $result; } } else { - $this->error=$this->db->error()." sql=".$sql; + $this->error=$this->db->lasterror()." sql=".$sql; $this->db->rollback(); return -1; } } - + /** * Update record * @@ -138,15 +138,15 @@ class Fiscalyear $this->error='ErrorBadParameter'; return -1; } - + $this->db->begin(); - $sql = "UPDATE ".MAIN_DB_PREFIX."accounting_fiscalyear "; + $sql = "UPDATE ".MAIN_DB_PREFIX."accounting_fiscalyear"; $sql .= " SET label = '".$this->label."'"; $sql .= ", date_start = '".$this->db->idate($this->date_start)."'"; - $sql .= ", date_end = '".$this->db->idate($this->date_end)."'"; + $sql .= ", date_end = ".($this->date_end ? "'".$this->db->idate($this->date_end)."'" : "null"); $sql .= ", statut = '".$this->statut."'"; - $sql .= ", datec = " . ($this->datec != '' ? $this->db->idate($this->datec) : 'null'); + $sql .= ", datec = " . ($this->datec != '' ? "'".$this->db->idate($this->datec)."'" : 'null'); $sql .= ", fk_user_modif = " . $user->id; $sql .= " WHERE rowid = ".$this->id; @@ -160,11 +160,12 @@ class Fiscalyear else { $this->error=$this->db->lasterror(); + dol_syslog($this->error, LOG_ERR); $this->db->rollback(); return -1; } } - + /** * Load an object from database * @@ -194,11 +195,11 @@ class Fiscalyear } else { - $this->error=$this->db->error(); + $this->error=$this->db->lasterror(); return -1; } } - + /** * Delete record * @@ -220,12 +221,12 @@ class Fiscalyear } else { - $this->error=$this->db->error(); + $this->error=$this->db->lasterror(); $this->db->rollback(); return -1; } } - + /** * Give a label from a status * @@ -238,7 +239,7 @@ class Fiscalyear } /** - * Give a label from a status + * Give a label from a status * * @param int $statut Id status * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto @@ -277,7 +278,7 @@ class Fiscalyear if ($statut==1 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut8'); } } - + /** * Information on record * diff --git a/htdocs/core/lib/fiscalyear.lib.php b/htdocs/core/lib/fiscalyear.lib.php index 1db099b24bf..5d27760b41f 100644 --- a/htdocs/core/lib/fiscalyear.lib.php +++ b/htdocs/core/lib/fiscalyear.lib.php @@ -34,7 +34,7 @@ function fiscalyear_prepare_head($object) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT . '/admin/fiscalyear_card.php?id=' . $object->id; + $head[$h][0] = DOL_URL_ROOT . '/accountancy/admin/fiscalyear_card.php?id=' . $object->id; $head[$h][1] = $langs->trans("Card"); $head[$h][2] = 'card'; $h++; @@ -44,8 +44,8 @@ function fiscalyear_prepare_head($object) // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab complete_head_from_modules($conf,$langs,$object,$head,$h,'fiscalyear'); - - $head[$h][0] = DOL_URL_ROOT . '/admin/fiscalyear_info.php?id=' . $object->id; + + $head[$h][0] = DOL_URL_ROOT . '/accountancy/admin/fiscalyear_info.php?id=' . $object->id; $head[$h][1] = $langs->trans("Info"); $head[$h][2] = 'info'; $h++; diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 2ca71223ff2..d8de29fd227 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -501,7 +501,6 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add("/admin/modules.php?mainmenu=home", $langs->trans("Modules").$warnpicto,1); $newmenu->add("/admin/menus.php?mainmenu=home", $langs->trans("Menus"),1); $newmenu->add("/admin/ihm.php?mainmenu=home", $langs->trans("GUISetup"),1); - $newmenu->add("/admin/fiscalyear.php?mainmenu=home", $langs->trans("Fiscalyear"),1); if (! in_array($langs->defaultlang,array('en_US','en_GB','en_NZ','en_AU','fr_FR','fr_BE','es_ES','ca_ES'))) { if (empty($leftmenu) || $leftmenu=="setup") $newmenu->add("/admin/translation.php", $langs->trans("Translation"),1); @@ -863,18 +862,20 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if (! empty($conf->accounting->enabled)) { $langs->load("accountancy"); - + $newmenu->add("/accountancy/customer/index.php?leftmenu=ventil_customer",$langs->trans("CustomersVentilation"),0,$user->rights->accounting->ventilation->read, '', $mainmenu, 'ventil_customer'); if (empty($leftmenu) || $leftmenu=="ventil_customer") $newmenu->add("/accountancy/customer/list.php",$langs->trans("ToDispatch"),1,$user->rights->accounting->ventilation->read); if (empty($leftmenu) || $leftmenu=="ventil_customer") $newmenu->add("/accountancy/customer/lines.php",$langs->trans("Dispatched"),1,$user->rights->accounting->ventilation->read); - + $newmenu->add("/accountancy/supplier/index.php?leftmenu=ventil_supplier",$langs->trans("SuppliersVentilation"),0,$user->rights->accounting->ventilation->read, '', $mainmenu, 'ventil_supplier'); if (empty($leftmenu) || $leftmenu=="ventil_customer") $newmenu->add("/accountancy/supplier/list.php",$langs->trans("ToDispatch"),1,$user->rights->accounting->ventilation->read); if (empty($leftmenu) || $leftmenu=="ventil_customer") $newmenu->add("/accountancy/supplier/lines.php",$langs->trans("Dispatched"),1,$user->rights->accounting->ventilation->read); - + $newmenu->add("/accountancy/bookkeeping/list.php?leftmenu=bookkeeping",$langs->trans("Bookkeeping"),0,$user->rights->accounting->mouvements->lire, '', $mainmenu, 'bookeeping'); if (empty($leftmenu) || $leftmenu=="bookeeping") $newmenu->add("/accountancy/bookkeeping/listbyyear.php",$langs->trans("ByYear"),1,$user->rights->accounting->mouvements->lire); if (empty($leftmenu) || $leftmenu=="bookeeping") $newmenu->add("/accountancy/bookkeeping/balancebymonth.php.php",$langs->trans("AccountBalanceByMonth"),1,$user->rights->accounting->mouvements->lire); + + $newmenu->add("/accountancy/admin/fiscalyear.php?mainmenu=accountancy", $langs->trans("Fiscalyear"),0,$user->rights->accounting->close, '', $mainmenu, 'fiscalyear'); } // Rapports @@ -911,7 +912,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu //journaux if (empty($leftmenu) || $leftmenu=="ca") $newmenu->add("/compta/journal/sellsjournal.php?leftmenu=ca",$langs->trans("SellsJournal"),1,$user->rights->compta->resultat->lire); if (empty($leftmenu) || $leftmenu=="ca") $newmenu->add("/compta/journal/purchasesjournal.php?leftmenu=ca",$langs->trans("PurchasesJournal"),1,$user->rights->compta->resultat->lire); - } + } } } @@ -1254,12 +1255,12 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu else dol_print_error($db); $db->free($resql); } - + // Accountancy journals if (! empty($conf->accounting->enabled) && !empty($user->rights->accounting->mouvements->lire) && $mainmenu == 'accountancy') { $newmenu->add('/accountancy/journal/index.php',$langs->trans("Journaux"),0,$user->rights->banque->lire); - + $sql = "SELECT rowid, label, accountancy_journal"; $sql.= " FROM ".MAIN_DB_PREFIX."bank_account"; $sql.= " WHERE entity = ".$conf->entity; @@ -1273,7 +1274,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $i = 0; if ($numr > 0) - + while ($i < $numr) { $objp = $db->fetch_object($resql); @@ -1283,7 +1284,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu } else dol_print_error($db); $db->free($resql); - + // Add other journal $newmenu->add("/accountancy/journal/sellsjournal.php",$langs->trans("SellsJournal"),1,$user->rights->accounting->comptarapport->lire); $newmenu->add("/accountancy/journal/purchasesjournal.php",$langs->trans("PurchasesJournal"),1,$user->rights->accounting->comptarapport->lire); diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php index 308c765f5da..8035a60284d 100644 --- a/htdocs/core/modules/modAccounting.class.php +++ b/htdocs/core/modules/modAccounting.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2014 Alexandre Spangaro - * Copyright (C) 2014 Ari Elbaz (elarifr) + * Copyright (C) 2014 Ari Elbaz (elarifr) * Copyright (C) 2014 Florian Henry * * This program is free software; you can redistribute it and/or modify @@ -19,7 +19,7 @@ */ /** - * \file accountingex/core/modules/modAccountingExpert.class.php + * \file accountingex/core/modules/modAccounting.class.php * \ingroup Accounting Expert * \brief Module to activate Accounting Expert module */ @@ -42,164 +42,154 @@ class modAccounting extends DolibarrModules $this->db = $db; $this->numero = 50400; - + $this->family = "financial"; // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) $this->name = preg_replace('/^mod/i', '', get_class($this)); - $this->description = "Advanced manage of accounting"; - + $this->description = "Advanced accounting management"; + // Possible values for version are: 'development', 'experimental', 'dolibarr' or version $this->version = 'development'; - + $this->const_name = 'MAIN_MODULE_' . strtoupper($this->name); $this->special = 0; $this->picto = 'accounting'; - + // Defined if the directory /mymodule/inc/triggers/ contains triggers or not // $this->triggers = 1; - + // Data directories to create when module is enabled - $this->dirs = array ( - '/accountingex/temp' - ); - + $this->dirs = array('/accounting/temp'); + // Config pages $this->config_page_url = array('index.php@accountancy'); - + // Dependencies - $this->depends = array ("modFacture","modBanque","modTax"); // List of modules id that must be enabled if this module is enabled - $this->requiredby = array (); // List of modules id to disable if this one is disabled - $this->conflictwith = array ("modComptabilite"); // List of modules are in conflict with this module - $this->phpmin = array ( - 5, - 2 - ); // Minimum version of PHP required by module - $this->need_dolibarr_version = array ( - 3, - 6 - ); // Minimum version of Dolibarr required by module - $this->langfiles = array ( - "accountancy" - ); - + $this->depends = array("modFacture","modBanque","modTax"); // List of modules id that must be enabled if this module is enabled + $this->requiredby = array(); // List of modules id to disable if this one is disabled + $this->conflictwith = array("modComptabilite"); // List of modules are in conflict with this module + $this->phpmin = array(5, 2); // Minimum version of PHP required by module + $this->need_dolibarr_version = array(3, 6); // Minimum version of Dolibarr required by module + $this->langfiles = array("accountancy"); + // Constants - $this->const = array (); - $this->const[1] = array ( + $this->const = array(); + $this->const[1] = array( "MAIN_COMPANY_CODE_ALWAYS_REQUIRED", "chaine", "1", "With this constants on, third party code is always required whatever is numbering module behaviour" ); - $this->const[2] = array ( + $this->const[2] = array( "MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED", "chaine", "1", "With this constants on, bank account number is always required" ); - $this->const[1] = array ( + $this->const[1] = array( "ACCOUNTING_SEPARATORCSV", "string", - "," + "," ); - $this->const[2] = array ( + $this->const[2] = array( "ACCOUNTING_ACCOUNT_SUSPENSE", "chaine", - "471" + "471" ); - $this->const[3] = array ( + $this->const[3] = array( "ACCOUNTING_SELL_JOURNAL", "chaine", - "VTE" + "VTE" ); - $this->const[4] = array ( + $this->const[4] = array( "ACCOUNTING_PURCHASE_JOURNAL", "chaine", - "ACH" + "ACH" ); - $this->const[5] = array ( + $this->const[5] = array( "ACCOUNTING_SOCIAL_JOURNAL", "chaine", - "SOC" + "SOC" ); - $this->const[6] = array ( + $this->const[6] = array( "ACCOUNTING_CASH_JOURNAL", "chaine", - "CAI" + "CAI" ); - $this->const[7] = array ( + $this->const[7] = array( "ACCOUNTING_MISCELLANEOUS_JOURNAL", "chaine", - "OD" + "OD" ); - $this->const[8] = array ( + $this->const[8] = array( "ACCOUNTING_BANK_JOURNAL", "chaine", - "BQ" + "BQ" ); // Deprecated Move into llx_bank_account - $this->const[9] = array ( + $this->const[9] = array( "ACCOUNTING_ACCOUNT_TRANSFER_CASH", "chaine", - "58" + "58" ); - $this->const[10] = array ( + $this->const[10] = array( "CHARTOFACCOUNTS", "chaine", - "2" + "2" ); - $this->const[11] = array ( + $this->const[11] = array( "ACCOUNTING_MODELCSV", "chaine", - "0" + "0" ); - $this->const[12] = array ( + $this->const[12] = array( "ACCOUNTING_LENGTH_GACCOUNT", "chaine", - "" + "" ); - $this->const[13] = array ( + $this->const[13] = array( "ACCOUNTING_LENGTH_AACCOUNT", "chaine", - "" + "" ); - $this->const[14] = array ( + $this->const[14] = array( "ACCOUNTING_LIMIT_LIST_VENTILATION", "chaine", - "50" + "50" ); - $this->const[15] = array ( + $this->const[15] = array( "ACCOUNTING_LIST_SORT_VENTILATION_TODO", "yesno", - "1" + "1" ); - $this->const[16] = array ( + $this->const[16] = array( "ACCOUNTING_LIST_SORT_VENTILATION_DONE", "yesno", - "1" + "1" ); - + // Tabs $this->tabs = array(); - + // Css - $this->module_parts = array (); - + $this->module_parts = array(); + // Boxes - $this->boxes = array (); - + $this->boxes = array(); + // Permissions $this->rights_class = 'accounting'; - - $this->rights = array (); // Permission array used by this module + + $this->rights = array(); // Permission array used by this module $r = 0; - - $this->rights[$r][0] = 50401; + + $this->rights[$r][0] = 50401; // TODO Goal of this permission compared to others ??? $this->rights[$r][1] = 'Access_accountancy'; $this->rights[$r][2] = 'r'; $this->rights[$r][3] = 0; $this->rights[$r][4] = 'access'; $this->rights[$r][5] = ''; $r++; - + $this->rights[$r][0] = 50402; $this->rights[$r][1] = 'Read ventilation'; $this->rights[$r][2] = 'r'; @@ -207,7 +197,7 @@ class modAccounting extends DolibarrModules $this->rights[$r][4] = 'ventilation'; $this->rights[$r][5] = 'read'; $r++; - + $this->rights[$r][0] = 50403; $this->rights[$r][1] = 'Dispatched ventilation'; $this->rights[$r][2] = 'r'; @@ -239,12 +229,20 @@ class modAccounting extends DolibarrModules $this->rights[$r][4] = 'comptarapport'; $this->rights[$r][5] = 'lire'; $r++; - + + $this->rights[$r][0] = 50430; + $this->rights[$r][1] = 'Define and close a fiscal year'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'fiscalyear'; + $this->rights[$r][5] = ''; + $r++; + // Main menu entries - $this->menus = array (); + $this->menus = array(); $r = 0; } - + /** * Function called when module is enabled. * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. From 9f2b0b4f298340c80c4a3af9f1c4297470737b85 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 9 Sep 2014 12:28:35 +0200 Subject: [PATCH 3/7] Minor enhancement on agenda module. Can filter on date of event. Local calendar renamed into Internal calendar. --- htdocs/comm/action/index.php | 34 +++++++++++++------ htdocs/comm/action/listactions.php | 28 ++++++++++++++- htdocs/core/lib/agenda.lib.php | 10 +++--- .../mysql/tables/llx_element_resources.sql | 9 +++-- htdocs/langs/en_US/agenda.lang | 12 +++---- htdocs/langs/fr_FR/agenda.lang | 2 +- htdocs/theme/eldy/style.css.php | 1 + 7 files changed, 70 insertions(+), 26 deletions(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 29ad7182e5b..2318c45f132 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -998,7 +998,7 @@ elseif ($action == 'show_week') // View by week if ($todayarray['mday']==$tmpday && $todayarray['mon']==$tmpmonth && $todayarray['year']==$tmpyear) $today=1; if ($today) $style='cal_today'; - echo ' '; + echo ' '; show_day_events($db, $tmpday, $tmpmonth, $tmpyear, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300); echo " \n"; } @@ -1032,7 +1032,7 @@ else // View by day echo ' '.$langs->trans("Day".$arraytimestamp['wday'])."\n"; echo " \n"; echo " \n"; - echo ' '; + echo ' '; $maxnbofchar=80; show_day_events($db, $day, $month, $year, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300); echo "\n"; @@ -1073,18 +1073,20 @@ $db->close(); * @param int $maxprint Nb of actions to show each day on month view (0 means no limit) * @param int $maxnbofchar Nb of characters to show for event line * @param string $newparam Parameters on current URL - * @param int $showinfo Add extended information (used by day view) + * @param int $showinfo Add extended information (used by day and week view) * @param int $minheight Minimum height for each event. 60px by default. * @return void */ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60) { global $user, $conf, $langs; - global $filter, $filtera, $filtert, $filterd, $status, $actioncode; // Filters used into search form + global $action, $filter, $filtera, $filtert, $filterd, $status, $actioncode; // Filters used into search form global $theme_datacolor; global $cachethirdparties, $cachecontacts, $colorindexused; print '
'."\n"; + + // Line with title of day $curtime = dol_mktime(0, 0, 0, $month, $day, $year); print ''; print ''; - print ''; // Date start - $datep=$object->datep; + $datep=($datep?$datep:$object->datep); if (GETPOST('datep','int',1)) $datep=dol_stringtotime(GETPOST('datep','int',1),0); print ''; + // Date end - $datef=$object->datef; + $datef=($datef?$datef:$object->datef); if (GETPOST('datef','int',1)) $datef=dol_stringtotime(GETPOST('datef','int',1),0); print ''; print ''; // Location - print ''; + print ''; // Assigned to $var=false; print ''; print '
'; @@ -1092,7 +1094,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa print 'action=show_day&day='.str_pad($day, 2, "0", STR_PAD_LEFT).'&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year; print $newparam; print '">'; - if ($showinfo) print dol_print_date($curtime,'daytext'); + if ($showinfo) print dol_print_date($curtime,'daytextshort'); else print dol_print_date($curtime,'%d'); print ''; print ''; @@ -1107,7 +1109,10 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa print ''; } print '
'; + + // Line with td contains all div of each events + print '
'; + print '
'; //$curtime = dol_mktime (0, 0, 0, $month, $day, $year); $i=0; $nummytasks=0; $numother=0; $numbirthday=0; $numical=0; $numicals=array(); @@ -1192,15 +1197,23 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa $cssclass.= " unsortable"; } + $h=''; $nowrapontd=1; + if ($action == 'show_day') { $h='height: 100%; '; $nowrapontd=0; } + if ($action == 'show_week') { $h='height: 100%; '; $nowrapontd=0; } + // Show rect of event - print '
'; - print '
  • '; - print ''; + print '
    • '; + print '
    '; - print ''; print '
    '; + print ''; if ($event->type_code == 'BIRTHDAY') // It's a birthday { print $event->getNomUrl(1,$maxnbofchar,'cal_event','birthday','contact'); @@ -1367,6 +1380,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa print ''."\n"; } + print ''; print '
    '; print '
'."\n"; diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index a9f5438f1b8..a2c75386e56 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -43,6 +43,7 @@ $pid=GETPOST("projectid",'int',3); $status=GETPOST("status",'alpha'); $type=GETPOST('type'); $actioncode=GETPOST("actioncode","alpha",3)?GETPOST("actioncode","alpha",3):(GETPOST("actioncode")=='0'?'0':(empty($conf->global->AGENDA_USE_EVENT_TYPE)?'AC_OTH':'')); +$dateselect=dol_mktime(0, 0, 0, GETPOST('dateselectmonth'), GETPOST('dateselectday'), GETPOST('dateselectyear')); if ($actioncode == '') $actioncode=(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE); if ($status == '' && ! isset($_GET['status']) && ! isset($_POST['status'])) $status=(empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS)?'':$conf->global->AGENDA_DEFAULT_FILTER_STATUS); @@ -178,6 +179,8 @@ if ($filtera > 0 || $filtert > 0 || $filterd > 0 || $usergroup > 0) if ($usergroup > 0) $sql.= ($filtera>0||$filtert>0||$filterd>0?" OR ":"")." ugu.fk_usergroup = ".$usergroup; $sql.= ")"; } +//if ($dateselect > 0) $sql.= " AND a.datep BETWEEN '".$db->idate($dateselect)."' AND '".$db->idate($dateselect+3600*24-1).'"'; +if ($dateselect > 0) $sql.= " AND a.datep BETWEEN '".$db->idate($dateselect)."' AND '".$db->idate($dateselect+3600*24-1)."'"; $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($limit + 1, $offset); //print $sql; @@ -191,9 +194,11 @@ if ($resql) $num = $db->num_rows($resql); - $title=$langs->trans("DoneAndToDoActions"); + /*$title=$langs->trans("DoneAndToDoActions"); if ($status == 'done') $title=$langs->trans("DoneActions"); if ($status == 'todo') $title=$langs->trans("ToDoActions"); + */ + $title=$langs->trans("ListOfEvents"); $newtitle=$langs->trans($title); @@ -225,6 +230,8 @@ if ($resql) print_barre_liste($newtitle, $page, $_SERVER["PHP_SELF"], $param,$sortfield,$sortorder,$link,$num,0,''); //print '
'; + print '
'."\n"; + $i = 0; print ''; print ''; @@ -240,6 +247,22 @@ if ($resql) print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"a.percent",$param,"",'align="right"',$sortfield,$sortorder); print "\n"; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + $contactstatic = new Contact($db); $now=dol_now(); $delay_warning=$conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60; @@ -349,6 +372,9 @@ if ($resql) $i++; } print "
'; + print $form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); + print ''; + //print '  '; + //print ''; + print '
"; + + print '
'; + $db->free($resql); } diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index 5f4f743a45d..27b02e060e8 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -501,14 +501,14 @@ function calendars_prepare_head($param) $head[$h][2] = 'cardday'; $h++; - $head[$h][0] = DOL_URL_ROOT.'/comm/action/listactions.php'.($param?'?'.$param:''); - $head[$h][1] = $langs->trans("ViewList"); - $head[$h][2] = 'cardlist'; - $h++; - $head[$h][0] = DOL_URL_ROOT.'/comm/action/peruser.php'.($param?'?'.$param:''); $head[$h][1] = $langs->trans("ViewPerUser"); $head[$h][2] = 'cardperuser'; + $h++; + + $head[$h][0] = DOL_URL_ROOT.'/comm/action/listactions.php'.($param?'?'.$param:''); + $head[$h][1] = $langs->trans("ViewList"); + $head[$h][2] = 'cardlist'; $h++; $object=new stdClass(); diff --git a/htdocs/install/mysql/tables/llx_element_resources.sql b/htdocs/install/mysql/tables/llx_element_resources.sql index 3cc636ceab4..9c67a0d52af 100644 --- a/htdocs/install/mysql/tables/llx_element_resources.sql +++ b/htdocs/install/mysql/tables/llx_element_resources.sql @@ -13,16 +13,19 @@ -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see . +-- ============================================================================ +-- Table used to link an element actioncomm with a resource or user (llx_resource or llx_user) +-- ============================================================================ CREATE TABLE llx_element_resources ( rowid integer AUTO_INCREMENT PRIMARY KEY, - resource_id integer, - resource_type varchar(64), element_id integer, element_type varchar(64), + resource_id integer, -- id of resource or id of user + resource_type varchar(64), -- resource or user busy integer, mandatory integer, - fk_user_create integer, + fk_user_create integer, tms timestamp )ENGINE=innodb; diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang index 4fcc6708a73..48a5b720f46 100644 --- a/htdocs/langs/en_US/agenda.lang +++ b/htdocs/langs/en_US/agenda.lang @@ -2,11 +2,11 @@ IdAgenda=ID event Actions=Events ActionsArea=Events area (Actions and tasks) -Agenda= Agenda -Agendas= Agendas -Calendar= Calendar -Calendars= Calendars -LocalAgenda=Local calendar +Agenda=Agenda +Agendas=Agendas +Calendar=Calendar +Calendars=Calendars +LocalAgenda=Internal calendar AffectedTo=Assigned to DoneBy=Done by Event=Event @@ -22,7 +22,7 @@ MenuToDoActions=All incomplete events MenuDoneActions=All terminated events MenuToDoMyActions=My incomplete events MenuDoneMyActions=My terminated events -ListOfEvents=List of Dolibarr events +ListOfEvents=List of events (internal calendar) ActionsAskedBy=Events reported by ActionsToDoBy=Events assigned to ActionsDoneBy=Events done by diff --git a/htdocs/langs/fr_FR/agenda.lang b/htdocs/langs/fr_FR/agenda.lang index c0fefbfbb0c..f33ada9956c 100644 --- a/htdocs/langs/fr_FR/agenda.lang +++ b/htdocs/langs/fr_FR/agenda.lang @@ -22,7 +22,7 @@ MenuToDoActions=Événements incomplets MenuDoneActions=Événements terminés MenuToDoMyActions=Mes événem. incomplets MenuDoneMyActions=Mes événem. terminés -ListOfEvents=Liste des événements Dolibarr +ListOfEvents=Liste des événements (calendrier interne) ActionsAskedBy=Événements enregistrés par ActionsToDoBy=Événements affectés à ActionsDoneBy=Événements réalisés par diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 45c9499a45b..3eef3bd840e 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -2336,6 +2336,7 @@ table.cal_event { border: none; border-collapse: collapse; margin-bottom: 1px moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.25); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.25); background: -webkit-gradient(linear, left top, left bottom, from(#006aac), to(#00438d)); + min-height: 20px; } table.cal_event td { border: none; padding-: 2px; padding-: 2px; padding-top: 0px; padding-bottom: 0px; } ul.cal_event { padding-right: 2px; padding-top: 1px; border: none; list-style-type: none; margin: 0 auto; padding-left: 0px; padding-start: 0px; -khtml-padding-start: 0px; -o-padding-start: 0px; -moz-padding-start: 0px; -webkit-padding-start: 0px; } From f19e469b5f7c6dafc58f23a25d004cbf49b4ee1d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 9 Sep 2014 14:38:10 +0200 Subject: [PATCH 4/7] Work on feature to assign several users to an event. --- htdocs/comm/action/fiche.php | 56 ++++++++++++++++++--------- htdocs/core/class/html.form.class.php | 43 ++++++++++++++++++++ 2 files changed, 80 insertions(+), 19 deletions(-) diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 4015b202d62..a12867c0800 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -55,6 +55,10 @@ $contactid=GETPOST('contactid','int'); $origin=GETPOST('origin','alpha'); $originid=GETPOST('originid','int'); +$fulldayevent=GETPOST('fullday'); +$datep=dol_mktime($fulldayevent?'00':GETPOST("aphour"), $fulldayevent?'00':GETPOST("apmin"), 0, GETPOST("apmonth"), GETPOST("apday"), GETPOST("apyear")); +$datef=dol_mktime($fulldayevent?'23':GETPOST("p2hour"), $fulldayevent?'59':GETPOST("p2min"), $fulldayevent?'59':'0', GETPOST("p2month"), GETPOST("p2day"), GETPOST("p2year")); + // Security check $socid = GETPOST('socid','int'); $id = GETPOST('id','int'); @@ -63,6 +67,7 @@ $result = restrictedArea($user, 'agenda', $id, 'actioncomm&societe', 'myactions| if ($user->societe_id && $socid) $result = restrictedArea($user,'societe',$socid); $error=GETPOST("error"); +$donotclearsession=0; $cactioncomm = new CActionComm($db); $object = new ActionComm($db); @@ -82,6 +87,19 @@ $hookmanager->initHooks(array('actioncard')); * Actions */ +if (GETPOST('addassignedtouser')) +{ + // Add a new user + if (GETPOST('affectedto') > 0) + { + $assignedtouser=array(); + if (!empty($_SESSION['assignedtouser'])) $assignedtouser=dol_json_decode($_SESSION['assignedtouser'], true); + $assignedtouser[GETPOST('affectedto')]=array('transparency'=>GETPOST('transparency'),'mandatory'=>1); + $_SESSION['assignedtouser']=dol_json_encode($assignedtouser); + } + $donotclearsession=1; + $action='create'; +} // Add action if ($action == 'add_action') { @@ -104,12 +122,11 @@ if ($action == 'add_action') exit; } - $fulldayevent=GETPOST('fullday'); $percentage=in_array(GETPOST('status'),array(-1,100))?GETPOST('status'):GETPOST("percentage"); // If status is -1 or 100, percentage is not defined and we must use status // Clean parameters - $datep=dol_mktime($fulldayevent?'00':$_POST["aphour"], $fulldayevent?'00':$_POST["apmin"], 0, $_POST["apmonth"], $_POST["apday"], $_POST["apyear"]); - $datef=dol_mktime($fulldayevent?'23':$_POST["p2hour"], $fulldayevent?'59':$_POST["p2min"], $fulldayevent?'59':'0', $_POST["p2month"], $_POST["p2day"], $_POST["p2year"]); + $datep=dol_mktime($fulldayevent?'00':GETPOST("aphour"), $fulldayevent?'00':GETPOST("apmin"), 0, GETPOST("apmonth"), GETPOST("apday"), GETPOST("apyear")); + $datef=dol_mktime($fulldayevent?'23':GETPOST("p2hour"), $fulldayevent?'59':GETPOST("p2min"), $fulldayevent?'59':'0', GETPOST("p2month"), GETPOST("p2day"), GETPOST("p2year")); // Check parameters if (! $datef && $percentage == 100) @@ -519,15 +536,16 @@ if ($action == 'create') print '
'.$langs->trans("EventOnFullDay").'
'.$langs->trans("DateActionStart").''; if (GETPOST("afaire") == 1) $form->select_date($datep,'ap',1,1,0,"action",1,1,0,0,'fulldayend'); else if (GETPOST("afaire") == 2) $form->select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldayend'); else $form->select_date($datep,'ap',1,1,1,"action",1,1,0,0,'fulldaystart'); print '
'.$langs->trans("DateActionEnd").''; if (GETPOST("afaire") == 1) $form->select_date($datef,'p2',1,1,1,"action",1,1,0,0,'fulldayend'); @@ -539,29 +557,29 @@ if ($action == 'create') print '
'.$langs->trans("Status").' / '.$langs->trans("Percentage").''; $percent=-1; - if (isset($_GET['status']) || isset($_POST['status'])) - { - $percent=GETPOST('status'); - } - else if (isset($_GET['percentage']) || isset($_POST['percentage'])) - { - $percent=GETPOST('percentage'); - } + if (isset($_GET['status']) || isset($_POST['status'])) $percent=GETPOST('status'); + else if (isset($_GET['percentage']) || isset($_POST['percentage'])) $percent=GETPOST('percentage'); else { - if (GETPOST("afaire") == 1) $percent=0; - else if (GETPOST("afaire") == 2) $percent=100; + if (GETPOST('complete') == '0' || GETPOST("afaire") == 1) $percent='0'; + else if (GETPOST('complete') == 100 || GETPOST("afaire") == 2) $percent=100; } $formactions->form_select_status_action('formaction',$percent,1,'complete'); print '
'.$langs->trans("Location").'
'.$langs->trans("Location").'
'.$langs->trans("ActionAffectedTo").''; - $form->select_users(GETPOST("affectedto")?GETPOST("affectedto"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : $user->id),'affectedto',1); + if (empty($donotclearsession)) + { + $assignedtouser=GETPOST("affectedtouser")?GETPOST("affectedtouser"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : $user->id); + $_SESSION['assignedtouser']=dol_json_encode(array($assignedtouser=>array('transparency'=>1,'mandatory'=>1))); + } + //print $form->select_dolusers_forevent('affectedto',1); + print $form->select_dolusers(GETPOST("affectedto")?GETPOST("affectedto"):(! empty($object->usertodo->id) && $object->usertodo->id > 0 ? $object->usertodo->id : $user->id),'affectedto',1); print '
'; @@ -579,7 +597,7 @@ if ($action == 'create') if ($conf->global->AGENDA_ENABLE_DONEBY) { print ''.$langs->trans("ActionDoneBy").''; - $form->select_users(GETPOST("doneby")?GETPOST("doneby"):(! empty($object->userdone->id) && $percent==100?$object->userdone->id:0),'doneby',1); + print $form->select_dolusers(GETPOST("doneby")?GETPOST("doneby"):(! empty($object->userdone->id) && $percent==100?$object->userdone->id:0),'doneby',1); print ''; } @@ -652,7 +670,7 @@ if ($action == 'create') // Description print ''.$langs->trans("Description").''; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor=new DolEditor('note',(GETPOST('note')?GETPOST('note'):$object->note),'',240,'dolibarr_notes','In',true,true,$conf->fckeditor->enabled,ROWS_7,90); + $doleditor=new DolEditor('note',(GETPOST('note')?GETPOST('note'):$object->note),'',180,'dolibarr_notes','In',true,true,$conf->fckeditor->enabled,ROWS_6,90); $doleditor->Create(); print ''; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 9b52fd0e497..7dfe2b3e7d3 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1273,6 +1273,49 @@ class Form } + /** + * Return select list of users. Selected users are stored into session. + * + * @param string $htmlname Field name in form + * @param int $show_empty 0=liste sans valeur nulle, 1=ajoute valeur inconnue + * @param array $exclude Array list of users id to exclude + * @param int $disabled If select list must be disabled + * @param array $include Array list of users id to include or 'hierarchy' to have only supervised users + * @param array $enableonly Array list of users id to be enabled. All other must be disabled + * @param int $force_entity 0 or Id of environment to force + * @param int $maxlength Maximum length of string into list (0=no limit) + * @param int $showstatus 0=show user status only if status is disabled, 1=always show user status into label, -1=never show user status + * @param string $morefilter Add more filters into sql request + * @return string HTML select string + * @see select_dolgroups + */ + function select_dolusers_forevent($htmlname='userid', $show_empty=0, $exclude='', $disabled=0, $include='', $enableonly='', $force_entity=0, $maxlength=0, $showstatus=0, $morefilter='') + { + global $conf,$user,$langs; + + $userstatic=new User($this->db); + + // Method with no ajax + //$out.='
'; + $out.=$this->select_dolusers('', $htmlname, $show_empty, $exclude, $disabled, $include, $enableonly, $force_entity, $maxlength, $showstatus, $morefilter); + $out.=''; + $assignedtouser=array(); + if (!empty($_SESSION['assignedtouser'])) $assignedtouser=dol_json_decode($_SESSION['assignedtouser'], true); + if (count($assignedtouser)) $out.='
'; + foreach($assignedtouser as $key => $value) + { + $userstatic->fetch($key); + $out.=$userstatic->getNomUrl(1); + //$out.=' '.($value['mandatory']?$langs->trans("Mandatory"):$langs->trans("Optional")); + //$out.=' '.($value['transparency']?$langs->trans("Busy"):$langs->trans("NotBusy")); + $out.='
'; + } + + //$out.='
'; + return $out; + } + + /** * Return list of products for customer in Ajax if Ajax activated or go to select_produits_list * From 40686fde0d3e78d28a35dc7a953d4b3aac137e00 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 9 Sep 2014 14:51:29 +0200 Subject: [PATCH 5/7] Fix: Bad td balance --- htdocs/product/liste.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index 7e4c4f12b10..682cd1dda6a 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -326,12 +326,14 @@ else print ''; print ''; print ''; + // Barcode if (! empty($conf->barcode->enabled)) { print ''; print ''; print ''; } + // Date modification print ''; print ' '; print ''; @@ -370,15 +372,6 @@ else print ' '; print ''; } - else - { - print ''; - print ' '; - print ''; - print ''; - print ' '; - print ''; - } print ''; print $form->selectarray('tosell', array('0'=>$langs->trans('ProductStatusNotOnSellShort'),'1'=>$langs->trans('ProductStatusOnSellShort')),$tosell,1); @@ -388,7 +381,7 @@ else print $form->selectarray('tobuy', array('0'=>$langs->trans('ProductStatusNotOnBuyShort'),'1'=>$langs->trans('ProductStatusOnBuyShort')),$tobuy,1); print ''; - print ''; + print ''; print ''; print ''; print ''; From 27ba1680bf5517a4278ae29de93d480adfd5004b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 9 Sep 2014 15:29:54 +0200 Subject: [PATCH 6/7] Add field weeklyhours. --- htdocs/install/mysql/migration/3.6.0-3.7.0.sql | 3 +++ htdocs/install/mysql/tables/llx_user.sql | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql index 6b7585b1854..70ce60e6a33 100644 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -84,6 +84,9 @@ ALTER TABLE llx_product MODIFY COLUMN accountancy_code_buy varchar(32); ALTER TABLE llx_user MODIFY COLUMN accountancy_code varchar(32); +ALTER TABLE llx_user ADD COLUMN weeklyhours double(16,8); + + ALTER TABLE llx_projet_task_time ADD COLUMN task_datehour datetime after task_date; diff --git a/htdocs/install/mysql/tables/llx_user.sql b/htdocs/install/mysql/tables/llx_user.sql index 8a75b545a54..87e28084ef0 100644 --- a/htdocs/install/mysql/tables/llx_user.sql +++ b/htdocs/install/mysql/tables/llx_user.sql @@ -71,5 +71,6 @@ create table llx_user fk_barcode_type integer DEFAULT 0, accountancy_code varchar(32) NULL, nb_holiday integer DEFAULT 0, - salary double(24,8) + salary double(24,8), + weeklyhours double(16,8) )ENGINE=innodb; From 653d9d416790af2c3e55eca30b0318a8a0250be5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 9 Sep 2014 15:33:41 +0200 Subject: [PATCH 7/7] Fix: ckeditor area is at wrong place --- htdocs/user/note.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/user/note.php b/htdocs/user/note.php index ceaa9ceb011..448dd76d147 100644 --- a/htdocs/user/note.php +++ b/htdocs/user/note.php @@ -58,7 +58,7 @@ if ($action == 'update' && $user->rights->user->user->creer && ! $_POST["cancel" { $db->begin(); - $res=$fuser->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES)); + $res=$fuser->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES)); if ($res < 0) { $mesg='
'.$adh->error.'
'; @@ -89,7 +89,7 @@ if ($id) if ($msg) print '
'.$msg.'
'; - print "
"; + print ""; print ''; print ''; @@ -120,7 +120,7 @@ if ($id) print "id."\">"; // Editeur wysiwyg require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor=new DolEditor('note',$fuser->note,'',280,'dolibarr_notes','In',true,false,$conf->global->FCKEDITOR_ENABLE_SOCIETE,10,80); + $doleditor=new DolEditor('note_private',$fuser->note,'',280,'dolibarr_notes','In',true,false,$conf->global->FCKEDITOR_ENABLE_SOCIETE,10,80); $doleditor->Create(); } else