diff --git a/app/Views/client_branch.php b/app/Views/client_branch.php index 18c2301..a6419b7 100755 --- a/app/Views/client_branch.php +++ b/app/Views/client_branch.php @@ -312,6 +312,7 @@ $('#btnBranchAdd').click(function() { $('#district').val(''); $('#branch_city').val(''); $('#branch_form')[0].reset(); + $('#branch_form').parsley().reset(); $('.ac').css('display', 'block'); contactCount = 1 @@ -400,8 +401,13 @@ $("#branch_form").submit(function(event) { $('.loader').fadeIn(); $('.loader-mask').fadeIn(); + if (branch_PrimaryKey == '') { + $('#branch_form input[name="pre_branch_id"]').val(''); + } + var formData = new FormData($('#branch_form')[0]); + const jsonString = JSON.stringify(selectedValues); const level_contect_data_json_string = JSON.stringify(level_contect_data); console.log('jsonString', jsonString); @@ -492,7 +498,7 @@ $("#branch_form").submit(function(event) { $('.loader').fadeOut(); $('.loader-mask').delay(350).fadeOut('slow'); console.log('Something Wrong!', 'warning'); - if(xhr.status == 409){ + if(xhr.status === 409){ alert('The Current Branch is Already Existing..!!'); }