Commit b1eb0d99 authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

Merge branch 'fix/20782/21.03' into '21.03'

[20782] Département par defaut < 10 non fonctionnel dans le formulaire de contact (21.03)

See merge request maarch/MaarchCourrier!687
parents ad9af778 d329e758
-- *************************************************************************--
-- --
-- --
-- Model migration script - 21.03.14 to 21.03.20 --
-- --
-- --
-- *************************************************************************--
--DATABASE_BACKUP|parameters
UPDATE parameters SET (param_value_string, param_value_int) = (lpad(param_value_int::text, 2, '0'), NULL) WHERE id = 'defaultDepartment';
UPDATE parameters SET param_value_string = '21.03.20' WHERE id = 'database_version';
......@@ -823,7 +823,7 @@ INSERT INTO parameters (id, param_value_string, param_value_int, param_value_dat
INSERT INTO parameters (id, param_value_string, param_value_int, param_value_date) VALUES ('postindexing_workbatch', NULL, 1, NULL);
INSERT INTO parameters (id, param_value_string, param_value_int, param_value_date) VALUES ('database_version', '21.03.14', NULL, NULL);
INSERT INTO parameters (id, param_value_string, param_value_int, param_value_date) VALUES ('user_quota', '', 0, NULL);
INSERT INTO parameters (id, description, param_value_string, param_value_int, param_value_date) VALUES ('defaultDepartment', 'Département par défaut sélectionné dans le formulaire des adresses', NULL, 75, NULL);
INSERT INTO parameters (id, description, param_value_string, param_value_int, param_value_date) VALUES ('defaultDepartment', 'Default department in address autocompletion form', '75', NULL, NULL);
INSERT INTO parameters (id, description, param_value_string) VALUES ('homepage_message', 'Texte apparaissant dans la bannière sur la page d''accueil, mettre un espace pour supprimer la bannière.', 'Bienvenue dans votre <b>G</b>estion <b>E</b>lectronique du <b>C</b>ourrier.');
INSERT INTO parameters (id, description, param_value_string) VALUES ('thumbnailsSize', 'Résolution des imagettes', '750x900');
INSERT INTO parameters (id, description, param_value_int) VALUES ('keepDestForRedirection', 'If enabled (1), put recipient in copy for diffusion list when redirecting', 0);
......
......@@ -740,7 +740,7 @@ INSERT INTO notifications (notification_sid, notification_id, description, is_en
INSERT INTO parameters (id, description, param_value_string, param_value_int, param_value_date) VALUES ('work_batch_autoimport_id', NULL, NULL, 1, NULL);
INSERT INTO parameters (id, description, param_value_string, param_value_int, param_value_date) VALUES ('database_version', NULL, '21.03.14', NULL, NULL);
INSERT INTO parameters (id, description, param_value_string, param_value_int, param_value_date) VALUES ('user_quota', NULL, '', 0, NULL);
INSERT INTO parameters (id, description, param_value_string, param_value_int, param_value_date) VALUES ('defaultDepartment', 'Département par défaut sélectionné dans les autocomplétions de la Base Adresse Nationale', NULL, 75, NULL);
INSERT INTO parameters (id, description, param_value_string, param_value_int, param_value_date) VALUES ('defaultDepartment', 'Département par défaut sélectionné dans les autocomplétions de la Base Adresse Nationale', '75', NULL, NULL);
INSERT INTO parameters (id, description, param_value_string, param_value_int, param_value_date) VALUES ('thumbnailsSize', 'Résolution des imagettes', '750x900', NULL, NULL);
INSERT INTO parameters (id, description, param_value_string, param_value_int, param_value_date) VALUES ('keepDestForRedirection', 'Si activé (1), met le destinataire en copie de la liste de diffusion lors d''une action de redirection', NULL, 0, NULL);
INSERT INTO parameters (id, description, param_value_string, param_value_int, param_value_date) VALUES ('QrCodePrefix', 'Si activé (1), ajoute "Maarch_" dans le contenu des QrCode générés. (Utilisable avec MaarchCapture >= 1.4)', NULL, 0, NULL);
......
......@@ -843,9 +843,9 @@ class ContactController
sort($departments, SORT_NUMERIC);
$defaultDepartment = ParameterModel::getById(['id' => 'defaultDepartment', 'select' => ['param_value_int']]);
$defaultDepartment = ParameterModel::getById(['id' => 'defaultDepartment', 'select' => ['param_value_string']]);
return $response->withJson(['departments' => $departments, 'default' => empty($defaultDepartment['param_value_int']) ? null : $defaultDepartment['param_value_int']]);
return $response->withJson(['departments' => $departments, 'default' => empty($defaultDepartment['param_value_string']) ? null : $defaultDepartment['param_value_string']]);
}
public function getDuplicatedContacts(Request $request, Response $response)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment