mirror of
https://github.com/grocy/grocy.git
synced 2025-08-24 14:06:44 +00:00
Improved form validation handling (closes #1836)
This commit is contained in:
@@ -30,6 +30,11 @@ $('.save-recipe').on('click', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
|
||||
if (!Grocy.FrontendHelpers.ValidateForm("recipe-form", true))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var jsonData = $('#recipe-form').serializeJSON();
|
||||
Grocy.FrontendHelpers.BeginUiBusy("recipe-form");
|
||||
|
||||
@@ -301,6 +306,11 @@ $('#save-recipe-include-button').on('click', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
|
||||
if (!Grocy.FrontendHelpers.ValidateForm("recipe-include-form", true))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ($(".combobox-menu-visible").length)
|
||||
{
|
||||
return;
|
||||
|
Reference in New Issue
Block a user