+
-
-
+
+
-
+
-
+
@@ -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: '= base_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: '= base_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);
}
});
+
+ })
+
- }