Commit d9875462 authored by THEO GUILLON's avatar THEO GUILLON

Merge branch '433-message-succint' into '2.0.0'

Resolve "Message succint"

See merge request libriciel/pole-citoyens/web-DPO/web-DPO!437
parents 3cf5b61d 4de1b2df
......@@ -39,6 +39,7 @@ if (isset($this->validationErrors['Formulaire']) && !empty($this->validationErro
}
echo $this->WebcilForm->create('Formulaire', [
'id' => 'addAndEditForm',
'autocomplete' => 'off',
'inputDefaults' => ['div' => false],
'class' => 'form-horizontal',
......
......@@ -7,7 +7,9 @@ $(document).ready(function () {
let success = true,
dynamicFields = [],
errorTabId = null;
errorTabId = null,
liTabActive = $('#addAndEditForm li.active a').attr("href"),
divTabActive = $('#addAndEditForm div.active').attr('id');
$('.ui-droppable').each(function(idxDroppable, droppable) {
if (success === false) {
......@@ -252,11 +254,12 @@ $(document).ready(function () {
});
});
// $('.active').removeClass('active');
// $('#info_complementaire').addClass('active');
// $('#onglet_info_complementaire').addClass('active');
$('.active').removeClass('active');
if (success === true) {
$('#'+divTabActive).addClass('active');
$('a[href="'+liTabActive+'"]').parent().addClass('active');
$.each(dynamicFields, function(idx, hidden) {
$('form').append(hidden);
});
......@@ -266,7 +269,6 @@ $(document).ready(function () {
console.log(errorTabId);
$(errorTabId).addClass('active');
$('a[href="'+errorTabId+'"]').parent().addClass('active');
// $('#onglet_info_complementaire').addClass('active');
event.preventDefault();
}
......
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