Commit 3e0aec4b authored by THEO GUILLON's avatar THEO GUILLON
Browse files

Merge branch...

Merge branch '402-formulaires-bloquer-l-ajout-de-champs-possedant-un-nom-de-variable-deja-utilise' into '2.0.0'

Resolve "Formulaires:  bloquer l'ajout de champs possédant un nom de variable déja utilisé"

See merge request libriciel/pole-citoyens/web-DPO/web-DPO!388
parents 054bff0e 31c63112
......@@ -878,7 +878,7 @@ let createForm = function(typeCreateForm) {
return false;
}
if ($('#'+nameField).length !== 0) {
if ($('#'+nameField).filter(function (idx, elemt) { return $(this).closest('.ui-selected').length === 0; }).length !== 0) {
alert('Un champ possède déjà ce nom de variable !');
return false;
}
......@@ -1078,9 +1078,7 @@ let createForm = function(typeCreateForm) {
$(this).val(newNameField);
}
if ($('#'+newNameField).length === 0) {
success = checkNewNameField(newNameField);
}
success = checkNewNameField(newNameField);
}
// On récupère le "Nom du champ" et on le vérifie
......
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