Fix Form Validation Replace-In-Files error

This commit is contained in:
Katharina Bogad 2021-06-25 18:04:19 +02:00
parent a7dc588ad0
commit 615c378c56
21 changed files with 29 additions and 29 deletions

View File

@ -501,7 +501,7 @@ function consumeView(Grocy, scope = null)
{ {
event.preventDefault(); event.preventDefault();
if ($scope('#consume-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#consume-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }

View File

@ -132,7 +132,7 @@ function equipmentformView(Grocy, scope = null)
{ {
event.preventDefault(); event.preventDefault();
if ($scope('#equipment-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#equipment-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }

View File

@ -295,7 +295,7 @@ function inventoryView(Grocy, scope = null)
{ {
event.preventDefault(); event.preventDefault();
if ($scope('#inventory-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#inventory-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }

View File

@ -84,7 +84,7 @@ function locationformView(Grocy, scope = null)
{ {
event.preventDefault(); event.preventDefault();
if ($scope('#location-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#location-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }

View File

@ -432,7 +432,7 @@ function mealplanView(Grocy, scope = null)
return; return;
} }
if ($scope('#add-recipe-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#add-recipe-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }
@ -474,7 +474,7 @@ function mealplanView(Grocy, scope = null)
return; return;
} }
if ($scope('#add-note-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#add-note-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }
@ -520,7 +520,7 @@ function mealplanView(Grocy, scope = null)
return; return;
} }
if ($scope('#add-product-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#add-product-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }
@ -567,7 +567,7 @@ function mealplanView(Grocy, scope = null)
{ {
event.preventDefault(); event.preventDefault();
if ($scope('#add-recipe-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#add-recipe-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }
@ -584,7 +584,7 @@ function mealplanView(Grocy, scope = null)
{ {
event.preventDefault(); event.preventDefault();
if ($scope('#add-product-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#add-product-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }
@ -601,7 +601,7 @@ function mealplanView(Grocy, scope = null)
{ {
event.preventDefault(); event.preventDefault();
if ($scope('#add-recipe-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#add-recipe-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }

View File

@ -86,7 +86,7 @@ function productbarcodeformView(Grocy, scope = null)
{ {
event.preventDefault(); event.preventDefault();
if ($scope('#barcode-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#barcode-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }

View File

@ -217,7 +217,7 @@ function productformView(Grocy, scope = null)
$scope(".input-group-qu").trigger("change"); $scope(".input-group-qu").trigger("change");
$scope("#product-form select").trigger("select"); $scope("#product-form select").trigger("select");
if ($scope('#product-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#product-form')[0].checkValidity() === false) //There is at least one validation error
{ {
$scope("#qu-conversion-add-button").addClass("disabled"); $scope("#qu-conversion-add-button").addClass("disabled");
} }
@ -226,7 +226,7 @@ function productformView(Grocy, scope = null)
$scope("#qu-conversion-add-button").removeClass("disabled"); $scope("#qu-conversion-add-button").removeClass("disabled");
} }
if ($scope('#product-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#product-form')[0].checkValidity() === false) //There is at least one validation error
{ {
$scope("#barcode-add-button").addClass("disabled"); $scope("#barcode-add-button").addClass("disabled");
} }
@ -243,7 +243,7 @@ function productformView(Grocy, scope = null)
{ {
event.preventDefault(); event.preventDefault();
if ($scope('#product-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#product-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }

View File

@ -70,7 +70,7 @@ function productgroupformView(Grocy, scope = null)
{ {
event.preventDefault(); event.preventDefault();
if ($scope('#product-group-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#product-group-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }

View File

@ -149,7 +149,7 @@ function quantityunitconversionformView(Grocy, scope = null)
{ {
event.preventDefault(); event.preventDefault();
if ($scope('#quconversion-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#quconversion-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }

View File

@ -128,7 +128,7 @@ function recipeformView(Grocy, scope = null)
{ {
event.preventDefault(); event.preventDefault();
if ($scope('#recipe-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#recipe-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }
@ -264,7 +264,7 @@ function recipeformView(Grocy, scope = null)
return; return;
} }
if ($scope('#recipe-include-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#recipe-include-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }

View File

@ -145,7 +145,7 @@ function recipeposformView(Grocy, scope = null)
{ {
event.preventDefault(); event.preventDefault();
if ($scope('#recipe-pos-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#recipe-pos-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }

View File

@ -74,7 +74,7 @@ function shoppinglistformView(Grocy, scope = null)
{ {
event.preventDefault(); event.preventDefault();
if ($scope('#shopping-list-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#shopping-list-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }

View File

@ -226,7 +226,7 @@ function shoppinglistitemformView(Grocy, scope = null)
{ {
event.preventDefault(); event.preventDefault();
if ($scope('#shoppinglist-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#shoppinglist-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }

View File

@ -84,7 +84,7 @@ function shoppinglocationformView(Grocy, scope = null)
{ {
event.preventDefault(); event.preventDefault();
if ($scope('#shoppinglocation-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#shoppinglocation-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }

View File

@ -81,7 +81,7 @@ function stockentryformView(Grocy, scope = null)
{ {
event.preventDefault(); event.preventDefault();
if ($scope('#stockentry-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#stockentry-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }

View File

@ -84,7 +84,7 @@ function taskcategoryformView(Grocy, scope = null)
{ {
event.preventDefault(); event.preventDefault();
if ($scope('#task-category-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#task-category-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }

View File

@ -89,7 +89,7 @@ function taskformView(Grocy, scope = null)
{ {
event.preventDefault(); event.preventDefault();
if ($scope('#task-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#task-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }

View File

@ -404,7 +404,7 @@ function transferView(Grocy, scope = null)
{ {
event.preventDefault(); event.preventDefault();
if ($scope('#transfer-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#transfer-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }

View File

@ -82,7 +82,7 @@ function userentityformView(Grocy, scope = null)
{ {
event.preventDefault(); event.preventDefault();
if ($scope('#userentity-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#userentity-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }

View File

@ -88,7 +88,7 @@ function userfieldformView(Grocy, scope = null)
{ {
event.preventDefault(); event.preventDefault();
if ($scope('#userfield-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#userfield-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }

View File

@ -113,7 +113,7 @@
{ {
event.preventDefault(); event.preventDefault();
if ($scope('#user-form')[0].checkValidity()() === false) //There is at least one validation error if ($scope('#user-form')[0].checkValidity() === false) //There is at least one validation error
{ {
return false; return false;
} }