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

Correction : le nom de variable est unique sur un formulaire

parent 054bff0e
......@@ -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