diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 2e28c7e2a5c..6a3ee5b2bcd 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -385,12 +385,13 @@ else }); $("#copyaddressfromsoc").click(function() { - $(\'textarea[name="address"]\').text("'.addslashes($objsoc->address).'"); - $(\'input[name="zipcode"]\').val("'.addslashes($objsoc->zip).'"); - $(\'input[name="town"]\').val("'.addslashes($objsoc->town).'"); - $(\'select[name="country_id"]\').val("'.addslashes($objsoc->country_id).'"); - $(\'select[name="state_id"]\').val("'.addslashes($objsoc->state_id).'"); - }); + $(\'textarea[name="address"]\').text("'.dol_escape_js($objsoc->address).'"); + $(\'input[name="zipcode"]\').val("'.dol_escape_js($objsoc->zip).'"); + $(\'input[name="town"]\').val("'.dol_escape_js($objsoc->town).'"); + $(\'select[name="country_id"]\').val("'.dol_escape_js($objsoc->country_id).'"); + $(\'select[name="state_id"]\').val("'.dol_escape_js($objsoc->state_id).'"); + $(\'input[name="email"]\').val("'.dol_escape_js($objsoc->email).'"); + }); })'."\n"; print ''."\n"; } @@ -482,16 +483,16 @@ else // Phone / Fax if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->phone_pro)) == 0) $object->phone_pro = $objsoc->tel; // Predefined with third party - print ''.$langs->trans("PhonePro").'phone_pro).'">'; - print ''.$langs->trans("PhonePerso").'phone_perso).'">'; + print ''.$langs->trans("PhonePro").'phone_pro).'">'; + print ''.$langs->trans("PhonePerso").'phone_perso).'">'; if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->fax)) == 0) $object->fax = $objsoc->fax; // Predefined with third party - print ''.$langs->trans("PhoneMobile").'phone_mobile).'">'; - print ''.$langs->trans("Fax").'fax).'">'; + print ''.$langs->trans("PhoneMobile").'phone_mobile).'">'; + print ''.$langs->trans("Fax").'fax).'">'; // EMail if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->email)) == 0) $object->email = $objsoc->email; // Predefined with third party - print ''.$langs->trans("Email").'email).'">'; + print ''.$langs->trans("Email").'email).'">'; if (! empty($conf->mailing->enabled)) { print ''.$langs->trans("No_Email").''.$form->selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).''; diff --git a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql index 07e1d00be10..7a57a99a0d3 100755 --- a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql +++ b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql @@ -172,6 +172,7 @@ date_create datetime NOT NULL , description varchar(255) NOT NULL , date_debut date NOT NULL , date_fin date NOT NULL , +halfday integer DEFAULT 0, statut integer NOT NULL DEFAULT '1', fk_validator integer NOT NULL , date_valid datetime DEFAULT NULL , @@ -183,6 +184,8 @@ fk_user_cancel integer DEFAULT NULL, detail_refuse varchar(250) DEFAULT NULL ) ENGINE=innodb; +ALTER TABLE llx_holiday ADD COLUMN halfday integer DEFAULT 0 after date_fin; + ALTER TABLE llx_holiday ADD INDEX idx_holiday_fk_user (fk_user); ALTER TABLE llx_holiday ADD INDEX idx_holiday_date_debut (date_debut); diff --git a/htdocs/install/mysql/tables/llx_holiday.sql b/htdocs/install/mysql/tables/llx_holiday.sql index 08e96799949..1d99405600a 100644 --- a/htdocs/install/mysql/tables/llx_holiday.sql +++ b/htdocs/install/mysql/tables/llx_holiday.sql @@ -24,6 +24,7 @@ date_create DATETIME NOT NULL, description VARCHAR( 255 ) NOT NULL, date_debut DATE NOT NULL, date_fin DATE NOT NULL, +halfday integer DEFAULT 0, statut integer NOT NULL DEFAULT '1', fk_validator integer NOT NULL, date_valid DATETIME DEFAULT NULL, diff --git a/htdocs/langs/fr_FR/companies.lang b/htdocs/langs/fr_FR/companies.lang index f00b80e6aa6..72115f17e5f 100644 --- a/htdocs/langs/fr_FR/companies.lang +++ b/htdocs/langs/fr_FR/companies.lang @@ -70,7 +70,7 @@ Phone=Téléphone PhonePro=Tél pro. PhonePerso=Tél perso. PhoneMobile=Tél portable -No_Email=Ne pas envoyer d'emailing de masse +No_Email=Désactiver l'envoi d'emailing de masse Fax=Fax Zip=Code postal Town=Ville diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 48731cec6cb..2a13c7f19e5 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -791,6 +791,8 @@ if (! function_exists("llxHeader")) */ function llxHeader($head = '', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='') { + global $conf; + top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers if (empty($conf->global->MAIN_HIDE_TOP_MENU)) {