Commit 46341b1f authored by THEO GUILLON's avatar THEO GUILLON
Browse files

Merge branch '404-formulaires-enregistrement' into '2.0.0'

Resolve "Formulaires: enregistrement"

See merge request libriciel/pole-citoyens/web-DPO/web-DPO!433
parents ff190365 b5594307
......@@ -6,12 +6,19 @@ $(document).ready(function () {
}
let success = true,
dynamicFields = [];
dynamicFields = [],
errorTabId = null;
$('.ui-droppable').each(function(idxDroppable, droppable) {
if (success === false) {
return;
}
let droppableId = $(droppable).attr('id'),
idTab = '#'+$(droppable).parent().attr('id');
errorTabId = idTab;
$('.active').removeClass('active');
$(idTab).addClass('active');
......@@ -245,17 +252,22 @@ $(document).ready(function () {
});
});
$('.active').removeClass('active');
$('#info_complementaire').addClass('active');
$('#onglet_info_complementaire').addClass('active');
// $('.active').removeClass('active');
// $('#info_complementaire').addClass('active');
// $('#onglet_info_complementaire').addClass('active');
if (success) {
if (success === true) {
$.each(dynamicFields, function(idx, hidden) {
$('form').append(hidden);
});
return true;
} else {
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