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

Ajout : les champs "Nom de variable", "Nom du champ" et "Liste des options" sont devenu obligatoire

Ajout : le type de champ "Cases à cocher" peut être rendu obligatoire ou non.
Modification : refactorisation au click du btn 'Appliquer' afin de vérifier les variables qui veulent être attribué au champ et refactorisation de l'attribution des valeurs au champ
Ajout : de la modal pour ajouter un condition aux champs de type "Choix unique", "Cases à cocher", "Menu déroulant", "Menu multi-select"
parent 3eb18b32
......@@ -251,4 +251,16 @@ msgstr "Avez-vous réalisé l'analyse d'impact (AIPD) ?"
msgid "formulaire.champDepotPia"
msgstr "Avez-vous déposer dans l'onglet annexe l'analyse d'impact (AIPD) ?"
###############################################################################
\ No newline at end of file
###############################################################################
msgid "formulaire.champIfTheLadelField"
msgstr "Si le champ"
msgid "formulaire.champHasAsValue"
msgstr "a comme valeur"
msgid "formulaire.champThenTheField"
msgstr "alors le champ"
msgid "formulaire.champMustBe"
msgstr "doit être"
\ No newline at end of file
<?php
use Libriciel\Utility\Password\PasswordStrengthMeterAnssi;
?>
<!-- Pop-up de création d'un nouveau formulaire -->
<div class="modal fade" id="modalAddCondtion" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="myModalLabel">
<?php
echo "Ajouter une condition sur le champ";
?>
</h4>
</div>
<div class="modal-body">
<?php
echo $this->WebcilForm->create('modalConditions', [
'url' => '#'
]);
?>
<div class="row form-group">
<?php
echo $this->WebcilForm->hidden('ifTheNameField', ['id' => 'ifTheNameField']);
echo $this->WebcilForm->input('ifTheLadelField', [
'id' => 'ifTheLadelField',
'placeholder' => false,
'required' => true,
'readonly' => true
]);
?>
</div>
<div class="row form-group">
<?php
echo $this->WebcilForm->input('hasAsValue', [
'id' => 'hasAsValue',
'options' => [],
'empty' => true,
'class' => 'transformSelect form-control',
'placeholder' => false,
'required' => true,
'data-placeholder' => ' '
]);
?>
</div>
<div class="row form-group">
<?php
echo $this->WebcilForm->input('thenTheField', [
'id' => 'thenTheField',
'options' => [],
'empty' => true,
'class' => 'transformSelect form-control',
'placeholder' => false,
'required' => true,
'data-placeholder' => ' '
]);
?>
</div>
<div class="row form-group">
<?php
echo $this->WebcilForm->input('mustBe', [
'id' => 'mustBe',
'options' => [
'show' => "afficher",
'hide' => "cacher"
],
'empty' => true,
'class' => 'transformSelect form-control',
'placeholder' => false,
'required' => true,
'data-placeholder' => ' '
]);
?>
</div>
</div>
<div class="modal-footer">
<div class="btn-group">
<button type="button" class="btn btn-default-default" data-dismiss="modal">
<i class="fa fa-times-circle fa-lg"><!----></i>
<?php
echo __d('default', 'default.btnAnnuler');
?>
</button>
<button id="saveCondition" type="button" class="btn btn-default-success" >
<i class="fa fa-floppy-o fa-lg"><!----></i>
<?php
echo __d('default', 'default.btnEnregistrer');
?>
</button>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {
$('#saveCondition').click(function () {
alert('TOTO');
});
});
</script>
\ No newline at end of file
<!-- Pop-up de création de création de formulaire -->
<div class="modal fade" id="modalAddCondtion" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="myModalLabel">
<?php
echo "Ajouter une condition sur le champ";
?>
</h4>
</div>
<div class="modal-body">
<?php
echo $this->WebcilForm->create('modalConditions', [
'url' => '#'
]);
?>
<div class="row form-group">
<?php
echo $this->WebcilForm->input('ifTheField', [
'placeholder' => false,
'required' => true
]);
?>
</div>
<div class="row form-group">
<?php
echo $this->WebcilForm->input('hasAsValue', [
'options' => [],
'empty' => true,
'class' => 'transformSelect form-control',
'placeholder' => false,
'required' => true,
'data-placeholder' => ' '
]);
?>
</div>
<div class="row form-group">
<?php
echo $this->WebcilForm->input('thenTheField', [
'options' => [],
'empty' => true,
'class' => 'transformSelect form-control',
'placeholder' => false,
'required' => true,
'data-placeholder' => ' '
]);
?>
</div>
<div class="row form-group">
<?php
echo $this->WebcilForm->input('mustBe', [
'options' => [
'show' => "afficher",
'hide' => "cacher"
],
'empty' => true,
'class' => 'transformSelect form-control',
'placeholder' => false,
'required' => true,
'data-placeholder' => ' '
]);
?>
</div>
</div>
<div class="modal-footer">
<div class="btn-group">
<button type="button" class="btn btn-default-default" data-dismiss="modal">
<i class="fa fa-times-circle fa-lg"><!----></i>
<?php echo __d('default', 'default.btnAnnuler'); ?>
</button>
<?php
echo $this->Form->button("<i class='fa fa-floppy-o fa-lg'><!----></i>" . __d('default', 'default.btnEnregistrer'), [
// 'type' => 'submit',
'class' => 'btn btn-default-success',
'escape' => false
]);
?>
</div>
<?php
echo $this->Form->end();
?>
</div>
</div>
</div>
</div>
\ No newline at end of file
......@@ -147,6 +147,9 @@ echo $this->WebcilForm->create('Formulaire', [
</div>
<?php
//echo $this->element('Formulaires/modal/modalAddConditionOLD');
echo $this->element('Formulaires/modal/modalAddCondition');
echo $this->WebcilForm->end();
?>
......
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