From f89d32b913472f14bad438c764a4e4bcdc71e30c Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Fri, 27 May 2022 14:42:46 +0300 Subject: Don't make a POST if there's a blank form-element --- wqflask/wqflask/templates/case_attributes.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wqflask/wqflask/templates/case_attributes.html b/wqflask/wqflask/templates/case_attributes.html index fad3dd94..d1669761 100644 --- a/wqflask/wqflask/templates/case_attributes.html +++ b/wqflask/wqflask/templates/case_attributes.html @@ -287,10 +287,12 @@ $(this).parents("tr").find(".add, .edit").toggle(); $(".add-new").removeAttr("disabled"); } + else { + return; + } let nameNode = $(this).parents("tr").find(".name"); let descNode = $(this).parents("tr").find(".description"); - let name = nameNode.html(); let desc = descNode.html(); let nodeId = $(this).parents("tr").data("id"); -- cgit v1.2.3