diff --git a/js/funcs.js b/js/funcs.js index 3717a40..bbef664 100644 --- a/js/funcs.js +++ b/js/funcs.js @@ -14,4 +14,11 @@ $(document).ready( function () { window.close(); }, 500); } + + $("form.form-add").submit( function(e) { + if ( $(".add-category").val() == -1) { + e.preventDefault(); + $(".add-category-col").addClass("has-error"); + } + }); }); diff --git a/templates/pages/add.html b/templates/pages/add.html index a9d18d5..28e3faa 100644 --- a/templates/pages/add.html +++ b/templates/pages/add.html @@ -6,15 +6,16 @@