Commit 90a0ba72 authored by Théo GUILLON's avatar Théo GUILLON
Browse files

Correction : warning js

Ajout : field checkbox sur l'onglet co-responsable et soustraitant
parent 9e3c9597
......@@ -815,42 +815,42 @@ class FormulairesController extends AppController {
}
// valeur par défault
// if ($this->request->params['action'] == 'add' && empty($this->request->data)) {
// $fields['coresponsable'] = [
// [
// 'Champ' => [
// 'type' => 'input',
// 'ligne' => 1,
// 'colonne' => 1,
// 'details' => '{"name":"nom_responsable_conjoint","placeholder":"Nom et prénom","label":"Nom et prénom du responsable conjoint","default":"","obligatoire":true,"repeat":false}'
// ]
// ],
// [
// 'Champ' => [
// 'type' => 'input',
// 'ligne' => 3,
// 'colonne' => 1,
// 'details' => '{"name":"structure_responsable_conjointe","placeholder":"Raison sociale","label":"Raison sociale de la structure conjointe","default":"","obligatoire":true,"repeat":false}'
// ]
// ],
// [
// 'Champ' => [
// 'type' => 'input',
// 'ligne' => 1,
// 'colonne' => 2,
// 'details' => '{"name":"email_responsable_conjoint","placeholder":"Adresse e-mail","label":"Adresse mail du responsable conjoint","default":"","obligatoire":true,"repeat":false}'
// ]
// ],
// [
// 'Champ' => [
// 'type' => 'textarea',
// 'ligne' => 3,
// 'colonne' => 2,
// 'details' => '{"name":"adresse_structure_responsable_conjointe","placeholder":"Adresse postale","label":"Adresse de la structure conjointe","default":"","obligatoire":false,"repeat":false}'
// ]
// ]
// ];
// }
if ($this->request->params['action'] == 'add' && empty($this->request->data)) {
$fields['coresponsable'] = [
[
'Champ' => [
'type' => 'input',
'ligne' => 1,
'colonne' => 1,
'details' => '{"name":"nom_responsable_conjoint","placeholder":"Nom et prénom","label":"Nom et prénom du responsable conjoint","default":"","obligatoire":true,"repeat":true}'
]
],
[
'Champ' => [
'type' => 'input',
'ligne' => 3,
'colonne' => 1,
'details' => '{"name":"structure_responsable_conjointe","placeholder":"Raison sociale","label":"Raison sociale de la structure conjointe","default":"","obligatoire":true,"repeat":false}'
]
],
[
'Champ' => [
'type' => 'input',
'ligne' => 1,
'colonne' => 2,
'details' => '{"name":"email_responsable_conjoint","placeholder":"Adresse e-mail","label":"Adresse mail du responsable conjoint","default":"","obligatoire":true,"repeat":false}'
]
],
[
'Champ' => [
'type' => 'textarea',
'ligne' => 3,
'colonne' => 2,
'details' => '{"name":"adresse_structure_responsable_conjointe","placeholder":"Adresse postale","label":"Adresse de la structure conjointe","default":"","obligatoire":false,"repeat":false}'
]
]
];
}
$this->request->data['Formulaire']['form-container-formulaire'] = $fields['formulaire'];
$this->request->data['Formulaire']['form-container-coresponsable'] = $fields['coresponsable'];
......
......@@ -20,20 +20,15 @@ foreach ($champs as $key => $value) {
// Champ obligatoire ou non
if ($details['obligatoire'] == true) {
$champObligatoire = "fieldRequired";
$test = true;
} else {
$champObligatoire = "fieldNotRequired";
$test = false;
}
$fieldRepeat = "false";
if (isset($details['repeat'])) {
if ($details['repeat'] == true) {
$fieldRepeat = "fieldRepeat";
} else {
$fieldRepeat = "fieldNoRepeat";
$fieldRepeat = "true";
}
} else {
$fieldRepeat = '';
}
if (!isset($details['conditions'])) {
......
Markdown is supported
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