diff --git a/app/Views/business.php b/app/Views/business.php index 06afd7f..04456c5 100644 --- a/app/Views/business.php +++ b/app/Views/business.php @@ -55,7 +55,7 @@
-
+
@@ -63,15 +63,8 @@
-
-
- -
- -
-
-
-
+ +
@@ -79,7 +72,7 @@
-
+
@@ -87,7 +80,14 @@
- +
+
+ +
+ +
+
+
@@ -132,7 +132,7 @@
- +
@@ -154,39 +154,39 @@ $(document).ready(function() { - $('#submit_business').click(function(e) { - e.preventDefault(); // Prevent the form from submitting normally + $('#submit_business').click(function(e) { + e.preventDefault(); // Prevent the form from submitting normally - var form = document.getElementById('business_edit_form'); - var formData = new FormData(form); + var form = document.getElementById('business_edit_form'); + var formData = new FormData(form); - $.ajax({ - url: 'business_edit', - type: 'POST', - data: formData, - processData: false, // Prevent jQuery from automatically processing the data - contentType: false, // Prevent jQuery from automatically setting the content type - success: function(response) { - console.log(response); - if (response) { - window.location.reload(); - } else { - // Handle the case where the response indicates failure - alert('Update failed.'); + $.ajax({ + url: 'business_edit', + type: 'POST', + data: formData, + processData: false, // Prevent jQuery from automatically processing the data + contentType: false, // Prevent jQuery from automatically setting the content type + success: function(response) { + console.log(response); + if (response) { + window.location.reload(); + } else { + // Handle the case where the response indicates failure + alert('Update failed.'); + } + }, + error: function(xhr, status, error) { + // Handle errors here + console.error(xhr.responseText); } - }, - error: function(xhr, status, error) { - // Handle errors here - console.error(xhr.responseText); - } + }); }); }); -}); - function changePassword(params) { + $('#submit_branch').click(function(e) { + e.preventDefault(); - var form = document.getElementById('branch_edit_form'); var formData = new FormData(form); $.ajax({ @@ -194,6 +194,8 @@ type: 'POST', data: formData, dataType: 'json', + processData: false, // Prevent jQuery from automatically processing the data + contentType: false, success: function(response) { console.log(response); if (response) { @@ -211,8 +213,10 @@ console.error(xhr.responseText); } }); + + }) + - }