Commit c6fe6812 authored by tguillon's avatar tguillon
Browse files

Suppression : de la description de la base légale

parent 6375b200
......@@ -243,8 +243,6 @@ class FichesController extends AppController
$this->redirect($this->Referers->get());
}
// debug($this->request->data);die;
$success = true;
$this->Fiche->begin();
......
......@@ -317,6 +317,9 @@ msgstr "Information complémentaire concernant le traitement :"
msgid "fiche.champBaselegale"
msgstr "Base légale"
msgid "fiche.champDescriptionBaseLegale"
msgstr "Description des bases légales"
msgid "fiche.champDecisionAutomatisee"
msgstr "Prise de décision automatisée sur le traitement ?"
......
......@@ -69,50 +69,55 @@ if ($this->request->params['action'] === 'show') {
<!-- Colonne de gauche -->
<div class="col-md-6">
<?php
echo $this->WebcilForm->inputs([
'baselegale' => [
'id' => 'baselegale',
'multiple' => 'checkbox',
'class' => 'checkbox',
'options' => $options_baseLegales,
'div' => "input select"
],
'decisionAutomatisee' => [
'id' => 'decisionAutomatisee',
// 'options' => [
// true => 'Oui',
// false => 'Non'
// ],
'options' => [
'Oui' => 'Oui',
'Non' => 'Non'
],
'class' => 'transformSelect form-control',
'empty' => true,
'placeholder' => false,
'data-placeholder' => ' '
]
echo $this->WebcilForm->input('baselegale', [
'id' => 'baselegale',
'multiple' => 'checkbox',
'class' => 'checkbox',
'options' => $options_baseLegales,
'div' => "input select"
]);
?>
</div>
<!-- Colonne de droite -->
<div class="col-md-6">
<?php
echo $this->WebcilForm->inputs([
'descriptionBaseLegale' => [
'id' => 'descriptionBaseLegale',
'type' => 'textarea',
'readonly' => true,
'placeholder' => false
// echo $this->WebcilForm->input('descriptionBaseLegale', [
// 'id' => 'descriptionBaseLegale',
// 'type' => 'textarea',
// 'readonly' => true,
// 'placeholder' => false
// ]);
?>
</div>
</div>
<div class="row">
<!-- Colonne de gauche -->
<div class="col-md-6">
<?php
echo $this->WebcilForm->input('decisionAutomatisee', [
'id' => 'decisionAutomatisee',
'options' => [
'Oui' => 'Oui',
'Non' => 'Non'
],
'descriptionDecisionAutomatisee' => [
'id' => 'descriptionDecisionAutomatisee',
'type' => 'textarea',
'required' => true,
'placeholder' => false
]
'class' => 'transformSelect form-control',
'empty' => true,
'placeholder' => false,
'data-placeholder' => ' '
]);
?>
</div>
<!-- Colonne de droite -->
<div class="col-md-6">
<?php
echo $this->WebcilForm->input('descriptionDecisionAutomatisee', [
'id' => 'descriptionDecisionAutomatisee',
'type' => 'textarea',
'required' => true,
'placeholder' => false
]);
?>
</div>
......@@ -159,11 +164,34 @@ if ($this->request->params['action'] === 'show') {
idField--;
})
// Partie concernant la description de la base légale sélectionné
//var descriptionsBaseLegale = <?php //echo json_encode($descriptions_baseLegale); ?>//;
//
//$('input[id^="baselegale"]').click(function () {
// var valDescription = $('#descriptionBaseLegale').val();
//
// if (this.checked) {
// if (valDescription == "") {
// valDescription = descriptionsBaseLegale[$(this).val()];
// } else {
// valDescription = valDescription + '\n\n' + descriptionsBaseLegale[$(this).val()];
// }
//
// valDescription = valDescription.replace(/<br\s*[\/]?>/gi, '\n');
//
// $('#descriptionBaseLegale').val(valDescription);
// } else {
// valDescription = valDescription.replace(descriptionsBaseLegale[$(this).val()], '');
//
// valDescription = valDescription.replace('\n\n', '');
//
// $('#descriptionBaseLegale').val(valDescription);
// }
//});
// Partie concernant les champs sur la decision automatisee
displayDescriptionDecisionAutomatisee($('#decisionAutomatisee').val());
var descriptionsBaseLegale = <?php echo json_encode($descriptions_baseLegale); ?>;
$('#decisionAutomatisee').change(function () {
var select = $(this).val();
......
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