diff --git a/Views/recipe/edit.php b/Views/recipe/edit.php
index 8cb218d..f92d448 100644
--- a/Views/recipe/edit.php
+++ b/Views/recipe/edit.php
@@ -77,9 +77,9 @@ if ($O_recipe === null) {
foreach($A_ingredients as $O_ingredient) {
echo '
-
+
-
+
';
$i++;
}
@@ -89,9 +89,9 @@ if ($O_recipe === null) {
} else {
echo '
-
+
-
+
';
@@ -112,16 +112,17 @@ if ($O_recipe === null) {
if (count($A_steps) === 0) {
echo '
-
+
';
$numberOfInstructions = 1;
} else {
+ $i = 1;
foreach($A_steps as $S_step) {
echo '
-
+
';
$i++;
}
@@ -157,7 +158,6 @@ buttonIngredientPlus.addEventListener('click', () => {
if(nextArray[e].tagName == "LABEL") {
nextArray[e].setAttribute("for", "recipeIngredient"+numberOfIngredients);
} else {
- nextArray[e].setAttribute("name", "recipeIngredient"+numberOfIngredients);
nextArray[e].setAttribute("id", "recipeIngredient"+numberOfIngredients);
nextArray[e].value = "";
}
@@ -191,11 +191,10 @@ buttonInstructionPlus.addEventListener('click', () => {
for(let e in nextArray) {
console.log(nextArray[e]);
if(nextArray[e].tagName == "LABEL") {
- nextArray[e].setAttribute("for", "recipeIngredient"+numberOfInstructions);
+ nextArray[e].setAttribute("for", "recipeInstruction"+numberOfInstructions);
nextArray[e].textContent = "Étape "+numberOfInstructions+"\u00A0:";
} else {
- nextArray[e].setAttribute("name", "recipeIngredient"+numberOfInstructions);
- nextArray[e].setAttribute("id", "recipeIngredient"+numberOfInstructions);
+ nextArray[e].setAttribute("id", "recipeInstruction"+numberOfInstructions);
nextArray[e].value = "";
}
next.appendChild(nextArray[e]);