Bläddra i källkod

Add red border to invalid fields for recipes

Lee Morgan 6 år sedan
förälder
incheckning
750ed522e4
1 ändrade filer med 2 tillägg och 0 borttagningar
  1. 2 0
      views/merchantSetupPage/recipeSetup.js

+ 2 - 0
views/merchantSetupPage/recipeSetup.js

@@ -54,6 +54,7 @@ let recipeSetup = {
             ingQuant.type = "number";
             ingQuant.step = "0.01";
             ingQuant.value = ing.quantity;
+            ingQuant.onblur = ()=>{checkValid("quantity", ingQuant.value)};
             quantTd.appendChild(ingQuant);
         }
     
@@ -166,6 +167,7 @@ let recipeSetup = {
         ingQuant.type = "number";
         ingQuant.step = "0.01";
         ingQuant.min = "0";
+        ingQuant.onblur = ()=>{checkValid("quantity", ingQuant.value)};
         quantTd.appendChild(ingQuant);
     
         let removeTd = document.createElement("td");