Commit 0740b5d8 authored by Théo GUILLON's avatar Théo GUILLON
Browse files

suppression : menu deroulant avec recherche (select2)

correction : des champs selectionner par l'ajout de condition en fonction du form-container dans lequel l'utilisateur click
parent c1b6cdb6
......@@ -69,7 +69,7 @@ $typeCreateForm = isset($typeCreateForm) === true ? $typeCreateForm : '';
<!-- Bouton ajout d'une condition -->
<?php
echo $this->Html->link('<i class="fa fa-plus fa-lg"></i>' . ' ' . __d('formulaire', 'formulaire.btnCondition'), ['#' => '#'], [
'id' => 'btn-condition',
'id' => 'btn-condition-'.$typeCreateForm,
'escape' => false,
'data-toggle' => 'modal',
'data-target' => '#modalAddCondtion',
......
......@@ -29,7 +29,7 @@
'donneesSensible' => 'Les données traitées sont qualifiées de \'données sensibles\' ?'
],
'empty' => true,
'class' => 'usersDeroulant transformSelect form-control',
'class' => 'transformSelect form-control',
'placeholder' => false,
'required' => true,
'data-placeholder' => ' '
......@@ -43,7 +43,7 @@
'id' => 'hasValue',
'options' => [],
'empty' => true,
'class' => 'usersDeroulant transformSelect form-control',
'class' => 'transformSelect form-control',
'placeholder' => false,
'required' => true,
'data-placeholder' => ' '
......@@ -57,7 +57,7 @@
'id' => 'thenTheField',
'options' => [],
'empty' => true,
'class' => 'usersDeroulant transformSelect form-control',
'class' => 'transformSelect form-control',
'placeholder' => false,
'required' => true,
'data-placeholder' => ' '
......@@ -130,11 +130,13 @@
var idContainer = null;
var idFieldConditionCreated = null;
$('#btn-condition').click(function () {
// $('#btn-condition').click(function () {
$('#btn-condition-formulaire, #btn-condition-coresponsable, #btn-condition-soustraitant').click(function () {
hideAllFields();
$('#ifTheField option').slice(3).remove();
idContainer = '#' + $('.form-container').attr('id');
// idContainer = '#' + $('.form-container').attr('id');
idContainer = '#' + $(this).parent().parent().nextAll('.form-container').attr('id');
if (!idContainer) {
return false;
}
......
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