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 ''."\n"; print ''.$langs->trans("AGENDA_DEFAULT_VIEW").''."\n"; print ' '."\n"; 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")); +$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, $conf->global->AGENDA_DEFAULT_VIEW); print ''."\n"; diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 596b795999d..dbd472af1d3 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -372,32 +372,32 @@ class Asset extends CommonObject if ($mode == 0 || $mode == 1) { if ($status == 1) return $langs->trans('Enabled'); - if ($status == 0) return $langs->trans('Disabled'); + elseif ($status == 0) return $langs->trans('Disabled'); } elseif ($mode == 2) { if ($status == 1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled'); - if ($status == 0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled'); + elseif ($status == 0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled'); } elseif ($mode == 3) { if ($status == 1) return img_picto($langs->trans('Enabled'),'statut4'); - if ($status == 0) return img_picto($langs->trans('Disabled'),'statut5'); + elseif ($status == 0) return img_picto($langs->trans('Disabled'),'statut5'); } elseif ($mode == 4) { if ($status == 1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled'); - if ($status == 0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled'); + elseif ($status == 0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled'); } elseif ($mode == 5) { if ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'),'statut4'); - if ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5'); + elseif ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5'); } elseif ($mode == 6) { if ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'),'statut4'); - if ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5'); + elseif ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5'); } } diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 178e4bfb6d7..7e27c0d924c 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -101,11 +101,15 @@ else if ($actioncode == '' && empty($actioncodearray)) $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); -if (empty($action) && ! isset($_GET['action']) && ! isset($_POST['action'])) $action=(empty($conf->global->AGENDA_DEFAULT_VIEW)?'show_month':$conf->global->AGENDA_DEFAULT_VIEW); -if ($action == 'default') + +$defaultview = (empty($conf->global->AGENDA_DEFAULT_VIEW) ? 'show_month' : $conf->global->AGENDA_DEFAULT_VIEW); +$defaultview = (empty($user->conf->AGENDA_DEFAULT_VIEW) ? $defaultview : $user->conf->AGENDA_DEFAULT_VIEW); +if (empty($action) && ! isset($_GET['action']) && ! isset($_POST['action'])) $action=$defaultview; +if ($action == 'default') // When action is default, we want a calendar view and not the list { - $action = ((! empty($conf->global->AGENDA_DEFAULT_VIEW) && $conf->global->AGENDA_DEFAULT_VIEW!='show_list') ? $conf->global->AGENDA_DEFAULT_VIEW : 'show_month'); + $action = (($defaultview != 'show_list') ? $defaultview : 'show_month'); } + if (GETPOST('viewcal') && $action != 'show_day' && $action != 'show_week') { $action='show_month'; $day=''; } // View by month diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 45e139c0b4f..de234159f93 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -3174,18 +3174,18 @@ class Propal extends CommonObject $statuttrans=''; if ($statut==self::STATUS_DRAFT) $statuttrans='statut0'; - if ($statut==self::STATUS_VALIDATED) $statuttrans='statut1'; - if ($statut==self::STATUS_SIGNED) $statuttrans='statut3'; - if ($statut==self::STATUS_NOTSIGNED) $statuttrans='statut5'; - if ($statut==self::STATUS_BILLED) $statuttrans='statut6'; + elseif ($statut==self::STATUS_VALIDATED) $statuttrans='statut1'; + elseif ($statut==self::STATUS_SIGNED) $statuttrans='statut3'; + elseif ($statut==self::STATUS_NOTSIGNED) $statuttrans='statut5'; + elseif ($statut==self::STATUS_BILLED) $statuttrans='statut6'; if ($mode == 0) return $this->labelstatut[$statut]; - if ($mode == 1) return $this->labelstatut_short[$statut]; - if ($mode == 2) return img_picto($this->labelstatut_short[$statut], $statuttrans).' '.$this->labelstatut_short[$statut]; - if ($mode == 3) return img_picto($this->labelstatut[$statut], $statuttrans); - if ($mode == 4) return img_picto($this->labelstatut[$statut],$statuttrans).' '.$this->labelstatut[$statut]; - if ($mode == 5) return ''.$this->labelstatut_short[$statut].' '.img_picto($this->labelstatut[$statut],$statuttrans); - if ($mode == 6) return ''.$this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut],$statuttrans); + elseif ($mode == 1) return $this->labelstatut_short[$statut]; + elseif ($mode == 2) return img_picto($this->labelstatut_short[$statut], $statuttrans).' '.$this->labelstatut_short[$statut]; + elseif ($mode == 3) return img_picto($this->labelstatut[$statut], $statuttrans); + elseif ($mode == 4) return img_picto($this->labelstatut[$statut],$statuttrans).' '.$this->labelstatut[$statut]; + elseif ($mode == 5) return ''.$this->labelstatut_short[$statut].' '.img_picto($this->labelstatut[$statut],$statuttrans); + elseif ($mode == 6) return ''.$this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut],$statuttrans); } diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 804398232de..3fdfbc0c514 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -148,29 +148,29 @@ if (empty($user->socid)) $fieldstosearchall["f.note_private"]="NotePrivate"; $checkedtypetiers=0; $arrayfields=array( - 'f.facnumber'=>array('label'=>$langs->trans("Ref"), 'checked'=>1), - 'f.ref_client'=>array('label'=>$langs->trans("RefCustomer"), 'checked'=>1), - 'f.type'=>array('label'=>$langs->trans("Type"), 'checked'=>0), - 'f.date'=>array('label'=>$langs->trans("DateInvoice"), 'checked'=>1), - 'f.date_lim_reglement'=>array('label'=>$langs->trans("DateDue"), 'checked'=>1), - 'p.ref'=>array('label'=>$langs->trans("ProjectRef"), 'checked'=>0, 'enabled'=>(empty($conf->projet->enabled)?0:1)), - 's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1), - 's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>1), - 's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>1), - 'state.nom'=>array('label'=>$langs->trans("StateShort"), 'checked'=>0), - 'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0), - 'typent.code'=>array('label'=>$langs->trans("ThirdPartyType"), 'checked'=>$checkedtypetiers), - 'f.fk_mode_reglement'=>array('label'=>$langs->trans("PaymentMode"), 'checked'=>1), - 'f.total_ht'=>array('label'=>$langs->trans("AmountHT"), 'checked'=>1), - 'f.total_vat'=>array('label'=>$langs->trans("AmountVAT"), 'checked'=>0), + 'f.facnumber'=>array('label'=>"Ref", 'checked'=>1), + 'f.ref_client'=>array('label'=>"RefCustomer", 'checked'=>1), + 'f.type'=>array('label'=>"Type", 'checked'=>0), + 'f.date'=>array('label'=>"DateInvoice", 'checked'=>1), + 'f.date_lim_reglement'=>array('label'=>"DateDue", 'checked'=>1), + 'p.ref'=>array('label'=>"ProjectRef", 'checked'=>0, 'enabled'=>(empty($conf->projet->enabled)?0:1)), + 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1), + 's.town'=>array('label'=>"Town", 'checked'=>1), + 's.zip'=>array('label'=>"Zip", 'checked'=>1), + 'state.nom'=>array('label'=>"StateShort", 'checked'=>0), + 'country.code_iso'=>array('label'=>"Country", 'checked'=>0), + 'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers), + 'f.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>1), + 'f.total_ht'=>array('label'=>"AmountHT", 'checked'=>1), + 'f.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0), 'f.total_localtax1'=>array('label'=>$langs->transcountry("AmountLT1", $mysoc->country_code), 'checked'=>0, 'enabled'=>($mysoc->localtax1_assuj=="1")), 'f.total_localtax2'=>array('label'=>$langs->transcountry("AmountLT2", $mysoc->country_code), 'checked'=>0, 'enabled'=>($mysoc->localtax2_assuj=="1")), - 'f.total_ttc'=>array('label'=>$langs->trans("AmountTTC"), 'checked'=>0), - 'dynamount_payed'=>array('label'=>$langs->trans("Received"), 'checked'=>0), - 'rtp'=>array('label'=>$langs->trans("Rest"), 'checked'=>0), - 'f.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), - 'f.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), - 'f.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), + 'f.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0), + 'dynamount_payed'=>array('label'=>"Received", 'checked'=>0), + 'rtp'=>array('label'=>"Rest", 'checked'=>0), + 'f.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500), + 'f.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500), + 'f.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), ); // Extra fields if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) @@ -422,22 +422,14 @@ if ($filtre) } if ($search_ref) $sql .= natural_search('f.facnumber', $search_ref); if ($search_refcustomer) $sql .= natural_search('f.ref_client', $search_refcustomer); -if ($search_type != '' && $search_type >= 0) -{ - if ($search_type == '0') $sql.=" AND f.type = 0"; // standard - if ($search_type == '1') $sql.=" AND f.type = 1"; // replacement - if ($search_type == '2') $sql.=" AND f.type = 2"; // credit note - if ($search_type == '3') $sql.=" AND f.type = 3"; // deposit - if ($search_type == '4') $sql.=" AND f.type = 4"; // proforma - if ($search_type == '5') $sql.=" AND f.type = 5"; // situation -} +if ($search_type != '') $sql.=" AND f.type IN (".$db->escape($search_type).")"; if ($search_project) $sql .= natural_search('p.ref', $search_project); if ($search_societe) $sql .= natural_search('s.nom', $search_societe); if ($search_town) $sql.= natural_search('s.town', $search_town); if ($search_zip) $sql.= natural_search("s.zip",$search_zip); if ($search_state) $sql.= natural_search("state.nom",$search_state); -if ($search_country) $sql .= " AND s.fk_pays IN (".$search_country.')'; -if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')'; +if ($search_country) $sql .= " AND s.fk_pays IN (".$db->escape($search_country).')'; +if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$db->escape($search_type_thirdparty).')'; if ($search_company) $sql .= natural_search('s.nom', $search_company); if ($search_montant_ht != '') $sql.= natural_search('f.total', $search_montant_ht, 1); if ($search_montant_vat != '') $sql.= natural_search('f.tva', $search_montant_vat, 1); @@ -1071,11 +1063,20 @@ if ($resql) if (! empty($arrayfields['typent.code']['checked'])) { print ''; - if (count($typenArray)==0) $typenArray = $formcompany->typent_array(1); + if (! is_array($typenArray) || count($typenArray)==0) $typenArray = $formcompany->typent_array(1); print $typenArray[$obj->typent_code]; 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']++; + } // Payment mode if (! empty($arrayfields['f.fk_mode_reglement']['checked'])) diff --git a/htdocs/compta/paiement/class/cpaiement.class.php b/htdocs/compta/paiement/class/cpaiement.class.php index c9794d9662e..1f0175bd370 100644 --- a/htdocs/compta/paiement/class/cpaiement.class.php +++ b/htdocs/compta/paiement/class/cpaiement.class.php @@ -135,15 +135,15 @@ class Cpaiement if (!$error) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . $this->table_element); - if (!$notrigger) { - // Uncomment this and change MYOBJECT to your own tag if you - // want this action to call a trigger. + // Uncomment this and change MYOBJECT to your own tag if you + // want this action to call a trigger. + //if (!$notrigger) { - //// Call triggers - //$result=$this->call_trigger('MYOBJECT_CREATE',$user); - //if ($result < 0) $error++; - //// End call triggers - } + // // Call triggers + // $result=$this->call_trigger('MYOBJECT_CREATE',$user); + // if ($result < 0) $error++; + // // End call triggers + //} } // Commit or rollback @@ -278,15 +278,15 @@ class Cpaiement dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR); } - if (!$error && !$notrigger) { - // Uncomment this and change MYOBJECT to your own tag if you - // want this action calls a trigger. + // Uncomment this and change MYOBJECT to your own tag if you + // want this action calls a trigger. + //if (!$error && !$notrigger) { - //// Call triggers - //$result=$this->call_trigger('MYOBJECT_MODIFY',$user); - //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} - //// End call triggers - } + // // Call triggers + // $result=$this->call_trigger('MYOBJECT_MODIFY',$user); + // if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} + // // End call triggers + //} // Commit or rollback if ($error) { @@ -316,17 +316,15 @@ class Cpaiement $this->db->begin(); - if (!$error) { - if (!$notrigger) { - // Uncomment this and change MYOBJECT to your own tag if you - // want this action calls a trigger. + // Uncomment this and change MYOBJECT to your own tag if you + // want this action calls a trigger. + //if (!$error && !$notrigger) { - //// Call triggers - //$result=$this->call_trigger('MYOBJECT_DELETE',$user); - //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} - //// End call triggers - } - } + // // Call triggers + // $result=$this->call_trigger('MYOBJECT_DELETE',$user); + // if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} + // // End call triggers + //} if (!$error) { $sql = 'DELETE FROM ' . MAIN_DB_PREFIX . $this->table_element; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 177b05850ed..c1619f97f6f 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1108,8 +1108,8 @@ class Form else if (!is_array($selected)) $selected = array($selected); // Clean $filter that may contains sql conditions so sql code - if (function_exists('test_sql_and_script_inject')) { - if (test_sql_and_script_inject($filter, 3)>0) { + if (function_exists('testSqlAndScriptInject')) { + if (testSqlAndScriptInject($filter, 3)>0) { $filter =''; } } @@ -5730,7 +5730,7 @@ class Form * @param string $morecss Add more class to css styles * @param int $callurlonselect If set to 1, some code is added so an url return by the ajax is called when value is selected. * @param string $placeholder String to use as placeholder - * @param integer $acceptdelayedhtml 1 if caller request to have html js content not returned but saved into global $delayedhtmlcontent (so caller can show it at end of page to avoid flash FOUC effect) + * @param integer $acceptdelayedhtml 1 = caller is requesting to have html js content not returned but saved into global $delayedhtmlcontent (so caller can show it at end of page to avoid flash FOUC effect) * @return string HTML select string * @see selectArrayFilter, ajax_combobox in ajax.lib.php */ @@ -5832,7 +5832,7 @@ class Form * @param string $morecss Add more class to css styles * @param int $callurlonselect If set to 1, some code is added so an url return by the ajax is called when value is selected. * @param string $placeholder String to use as placeholder - * @param integer $acceptdelayedhtml 1 if caller request to have html js content not returned but saved into global $delayedhtmlcontent (so caller can show it at end of page to avoid flash FOUC effect) + * @param integer $acceptdelayedhtml 1 = caller is requesting to have html js content not returned but saved into global $delayedhtmlcontent (so caller can show it at end of page to avoid flash FOUC effect) * @return string HTML select string * @see selectArrayAjax, ajax_combobox in ajax.lib.php */ @@ -5949,55 +5949,76 @@ class Form * @param int $width Force width of select box. May be used only when using jquery couch. Example: 250, 95% * @param string $moreattrib Add more options on select component. Example: 'disabled' * @param string $elemtype Type of element we show ('category', ...) + * @param string $placeholder String to use as placeholder + * @param int $addjscombo Add js combo * @return string HTML multiselect string * @see selectarray */ - static function multiselectarray($htmlname, $array, $selected=array(), $key_in_label=0, $value_as_key=0, $morecss='', $translate=0, $width=0, $moreattrib='',$elemtype='') + static function multiselectarray($htmlname, $array, $selected=array(), $key_in_label=0, $value_as_key=0, $morecss='', $translate=0, $width=0, $moreattrib='', $elemtype='', $placeholder='', $addjscombo=1) { global $conf, $langs; $out = ''; + // Add code for jquery to use multiselect if (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT')) { - $tmpplugin=empty($conf->global->MAIN_USE_JQUERY_MULTISELECT)?constant('REQUIRE_JQUERY_MULTISELECT'):$conf->global->MAIN_USE_JQUERY_MULTISELECT; - $out.="\n".' - '; + $out.="\n".' + '; } // Try also magic suggest diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index d53012191af..eb9ce00c5ed 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -123,26 +123,29 @@ if ($disablenofollow) echo '';
-"> +
"> + -
- - +" name="username" class="flat input-icon-user minwidth150" value="" tabindex="1" autofocus="autofocus" /> + + + - - +" name="password" class="flat input-icon-password minwidth150" type="password" value="" tabindex="2" autocomplete="global->MAIN_LOGIN_ENABLE_PASSWORD_AUTOCOMPLETE)?'off':'on'; ?>" /> + + - - +
+
+
global->MAIN_OPTIMIZEFORTEXTBROWSER)) { ?> -" name="username" class="flat input-icon-user minwidth150" value="" tabindex="1" autofocus="autofocus" /> -
+
+
global->MAIN_OPTIMIZEFORTEXTBROWSER)) { ?> -" name="password" class="flat input-icon-password minwidth150" type="password" value="" tabindex="2" autocomplete="global->MAIN_LOGIN_ENABLE_PASSWORD_AUTOCOMPLETE)?'off':'on'; ?>" /> -
+
+
- + + - +
- +
- + + diff --git a/htdocs/core/tpl/passwordforgotten.tpl.php b/htdocs/core/tpl/passwordforgotten.tpl.php index 62a441643e7..a573cf74855 100644 --- a/htdocs/core/tpl/passwordforgotten.tpl.php +++ b/htdocs/core/tpl/passwordforgotten.tpl.php @@ -97,17 +97,17 @@ if ($disablenofollow) echo '';
- +
-
- - + + - - +
+
+
" id="username" name="username" class="flat input-icon-user minwidth150" value="" tabindex="1" /> -
+
+
- + + -
diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 279f8d980de..0723ecb659a 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -107,7 +107,7 @@ class Don extends CommonObject function LibStatut($statut,$mode=0) { // phpcs:enable - if (empty($this->labelstatut) || empty($this->labelstatushort)) + if (empty($this->labelstatut) || empty($this->labelstatutshort)) { global $langs; $langs->load("donations"); @@ -132,37 +132,37 @@ class Don extends CommonObject elseif ($mode == 2) { if ($statut == -1) return img_picto($this->labelstatut[$statut],'statut5').' '.$this->labelstatutshort[$statut]; - if ($statut == 0) return img_picto($this->labelstatut[$statut],'statut0').' '.$this->labelstatutshort[$statut]; - if ($statut == 1) return img_picto($this->labelstatut[$statut],'statut1').' '.$this->labelstatutshort[$statut]; - if ($statut == 2) return img_picto($this->labelstatut[$statut],'statut6').' '.$this->labelstatutshort[$statut]; + elseif ($statut == 0) return img_picto($this->labelstatut[$statut],'statut0').' '.$this->labelstatutshort[$statut]; + elseif ($statut == 1) return img_picto($this->labelstatut[$statut],'statut1').' '.$this->labelstatutshort[$statut]; + elseif ($statut == 2) return img_picto($this->labelstatut[$statut],'statut6').' '.$this->labelstatutshort[$statut]; } elseif ($mode == 3) { if ($statut == -1) return img_picto($this->labelstatut[$statut],'statut5'); - if ($statut == 0) return img_picto($this->labelstatut[$statut],'statut0'); - if ($statut == 1) return img_picto($this->labelstatut[$statut],'statut1'); - if ($statut == 2) return img_picto($this->labelstatut[$statut],'statut6'); + elseif ($statut == 0) return img_picto($this->labelstatut[$statut],'statut0'); + elseif ($statut == 1) return img_picto($this->labelstatut[$statut],'statut1'); + elseif ($statut == 2) return img_picto($this->labelstatut[$statut],'statut6'); } elseif ($mode == 4) { if ($statut == -1) return img_picto($this->labelstatut[$statut],'statut5').' '.$this->labelstatut[$statut]; - if ($statut == 0) return img_picto($this->labelstatut[$statut],'statut0').' '.$this->labelstatut[$statut]; - if ($statut == 1) return img_picto($this->labelstatut[$statut],'statut1').' '.$this->labelstatut[$statut]; - if ($statut == 2) return img_picto($this->labelstatut[$statut],'statut6').' '.$this->labelstatut[$statut]; + elseif ($statut == 0) return img_picto($this->labelstatut[$statut],'statut0').' '.$this->labelstatut[$statut]; + elseif ($statut == 1) return img_picto($this->labelstatut[$statut],'statut1').' '.$this->labelstatut[$statut]; + elseif ($statut == 2) return img_picto($this->labelstatut[$statut],'statut6').' '.$this->labelstatut[$statut]; } elseif ($mode == 5) { if ($statut == -1) return $this->labelstatutshort[$statut].' '.img_picto($this->labelstatut[$statut],'statut5'); - if ($statut == 0) return $this->labelstatutshort[$statut].' '.img_picto($this->labelstatut[$statut],'statut0'); - if ($statut == 1) return $this->labelstatutshort[$statut].' '.img_picto($this->labelstatut[$statut],'statut1'); - if ($statut == 2) return $this->labelstatutshort[$statut].' '.img_picto($this->labelstatut[$statut],'statut6'); + elseif ($statut == 0) return $this->labelstatutshort[$statut].' '.img_picto($this->labelstatut[$statut],'statut0'); + elseif ($statut == 1) return $this->labelstatutshort[$statut].' '.img_picto($this->labelstatut[$statut],'statut1'); + elseif ($statut == 2) return $this->labelstatutshort[$statut].' '.img_picto($this->labelstatut[$statut],'statut6'); } elseif ($mode == 6) { if ($statut == -1) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut],'statut5'); - if ($statut == 0) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut],'statut0'); - if ($statut == 1) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut],'statut1'); - if ($statut == 2) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut],'statut6'); + elseif ($statut == 0) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut],'statut0'); + elseif ($statut == 1) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut],'statut1'); + elseif ($statut == 2) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut],'statut6'); } } diff --git a/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt b/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt deleted file mode 100755 index 1076f8b4b2b..00000000000 --- a/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2009 Michael Aufreiter, http://www.quasipartikel.at - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/htdocs/includes/jquery/plugins/multiselect/css/ui.multiselect.css b/htdocs/includes/jquery/plugins/multiselect/css/ui.multiselect.css deleted file mode 100755 index 2072baa57c4..00000000000 --- a/htdocs/includes/jquery/plugins/multiselect/css/ui.multiselect.css +++ /dev/null @@ -1,144 +0,0 @@ -/* Multiselect -----------------------------------*/ -.multiselect { - width: 600px; - height: 150px; -} - -.ui-multiselect { - border: solid 1px; - font-size: 0.8em; -} - -.ui-multiselect ul { - -moz-user-select: none; -} - -.ui-multiselect li { - margin: 0; - padding: 0; - cursor: default; - line-height: 20px; - height: 20px; - font-size: 11px; - list-style: none; -} - -.ui-multiselect li a { - color: #999; - text-decoration: none; - padding: 0; - display: block; - float: left; - cursor: pointer; -} - -.ui-multiselect li.ui-draggable-dragging { - padding-left: 10px; -} - -.ui-multiselect div.selected { - position: relative; - padding: 0; - margin: 0; - border: 0; - float: left; -} - -.ui-multiselect ul.selected { - position: relative; - padding: 0; - overflow: auto; - overflow-x: hidden; - background: #fff; - margin: 0; - list-style: none; - border: 0; - position: relative; - width: 100%; -} - -.ui-multiselect ul.selected li { - -} - -.ui-multiselect div.available { - position: relative; - padding: 0; - margin: 0; - border: 0; - float: left; - border-left: 1px solid; -} - -.ui-multiselect ul.available { - position: relative; - padding: 0; - overflow: auto; - overflow-x: hidden; - background: #fff; - margin: 0; - list-style: none; - border: 0; - width: 100%; -} - -.ui-multiselect ul.available li { - padding-left: 10px; -} - -.ui-multiselect .ui-state-default { - border: none; - margin-bottom: 1px; - position: relative; - padding-left: 20px; -} - -.ui-multiselect .ui-state-hover { - border: none; -} - -.ui-multiselect .ui-widget-header { - border: none; - font-size: 11px; - margin-bottom: 1px; -} - -.ui-multiselect .add-all { - float: right; - padding: 7px; -} - -.ui-multiselect .remove-all { - float: right; - padding: 7px; -} - -.ui-multiselect .search { - float: left; - padding: 4px; -} - -.ui-multiselect .count { - float: left; - padding: 7px; -} - -.ui-multiselect li span.ui-icon-arrowthick-2-n-s { - position: absolute; - left: 2px; -} - -.ui-multiselect li a.action { - position: absolute; - right: 2px; - top: 2px; -} - -.ui-multiselect input.search { - height: 14px; - padding: 1px; - opacity: 0.5; - margin: 4px; - width: 100px; -} \ No newline at end of file diff --git a/htdocs/includes/jquery/plugins/multiselect/jquery.multi-select.js b/htdocs/includes/jquery/plugins/multiselect/jquery.multi-select.js new file mode 100644 index 00000000000..ee62d1f588d --- /dev/null +++ b/htdocs/includes/jquery/plugins/multiselect/jquery.multi-select.js @@ -0,0 +1,360 @@ +// jquery.multi-select.js +// by mySociety +// https://github.com/mysociety/jquery-multi-select + +;(function($) { + + "use strict"; + + var pluginName = "multiSelect", + defaults = { + 'containerHTML': '
', + 'menuHTML': '
', + 'buttonHTML': '', + 'menuItemsHTML': '
', + 'menuItemHTML': '