Procházet zdrojové kódy

Add red border to invalid fields for recipes

Lee Morgan před 6 roky
rodič
revize
750ed522e4
1 změnil soubory, kde provedl 2 přidání a 0 odebrání
  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");