Merge branch 'main' of bitbucket.org:venbainformationtechnology/bb_sign

This commit is contained in:
bitbucket 2024-06-05 15:24:46 +05:30
commit b6a2fefb9b
3 changed files with 48 additions and 43 deletions

3
.gitignore vendored
View File

@ -1 +1,2 @@
/writable /writable
/public/uploads

View File

@ -55,7 +55,7 @@
<form id="branch_edit_form" enctype="multipart/form-data"> <form id="branch_edit_form" enctype="multipart/form-data">
<input type="hidden" id="branch_id" name="branch_id" value="<?php echo $branch['branch_id']; ?>"> <input type="hidden" id="branch_id" name="branch_id" value="<?php echo $branch['branch_id']; ?>">
<div class="row"> <div class="row">
<div class="col-md-5"> <div class="col-md-4">
<div class="form-group"> <div class="form-group">
<label for="old_password">Branch Name</label> <label for="old_password">Branch Name</label>
<div class="input-group"> <div class="input-group">
@ -63,15 +63,8 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-5">
<div class="form-group"> <div class="col-md-4">
<label for="old_password">Email</label>
<div class="input-group">
<input type="text" class="form-control" id="email" name="email" value="<?php echo $branch['branch_name']; ?>" required>
</div>
</div>
</div>
<div class="col-md-5">
<div class="form-group"> <div class="form-group">
<label for="old_password">Contact 1</label> <label for="old_password">Contact 1</label>
<div class="input-group"> <div class="input-group">
@ -79,7 +72,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-5"> <div class="col-md-4">
<div class="form-group"> <div class="form-group">
<label for="old_password">Contact 2</label> <label for="old_password">Contact 2</label>
<div class="input-group"> <div class="input-group">
@ -87,7 +80,14 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-5">
<div class="form-group">
<label for="old_password">Email</label>
<div class="input-group">
<input type="text" class="form-control" id="email" name="email" value="<?php echo $branch['email']; ?>" required>
</div>
</div>
</div>
<div class="col-md-6" style="margin-top: 27px;"> <div class="col-md-6" style="margin-top: 27px;">
</div> </div>
@ -132,7 +132,7 @@
</div> </div>
</div> </div>
<div class="col-md-12" style="margin-top: 27px;"> <div class="col-md-12" style="margin-top: 27px;">
<button type="button" class="btn btn-primary" id="submit_password" style="float: inline-end;" onclick="changePassword(this)">Submit</button> <button type="button" class="btn btn-primary" id="submit_branch" style="float: inline-end;">Submit</button>
</div> </div>
</form> </form>
@ -154,39 +154,39 @@
$(document).ready(function() { $(document).ready(function() {
$('#submit_business').click(function(e) { $('#submit_business').click(function(e) {
e.preventDefault(); // Prevent the form from submitting normally e.preventDefault(); // Prevent the form from submitting normally
var form = document.getElementById('business_edit_form'); var form = document.getElementById('business_edit_form');
var formData = new FormData(form); var formData = new FormData(form);
$.ajax({ $.ajax({
url: '<?= base_url() ?>business_edit', url: '<?= base_url() ?>business_edit',
type: 'POST', type: 'POST',
data: formData, data: formData,
processData: false, // Prevent jQuery from automatically processing the data processData: false, // Prevent jQuery from automatically processing the data
contentType: false, // Prevent jQuery from automatically setting the content type contentType: false, // Prevent jQuery from automatically setting the content type
success: function(response) { success: function(response) {
console.log(response); console.log(response);
if (response) { if (response) {
window.location.reload(); window.location.reload();
} else { } else {
// Handle the case where the response indicates failure // Handle the case where the response indicates failure
alert('Update failed.'); 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 form = document.getElementById('branch_edit_form');
var formData = new FormData(form); var formData = new FormData(form);
$.ajax({ $.ajax({
@ -194,6 +194,8 @@
type: 'POST', type: 'POST',
data: formData, data: formData,
dataType: 'json', dataType: 'json',
processData: false, // Prevent jQuery from automatically processing the data
contentType: false,
success: function(response) { success: function(response) {
console.log(response); console.log(response);
if (response) { if (response) {
@ -211,8 +213,10 @@
console.error(xhr.responseText); console.error(xhr.responseText);
} }
}); });
})
}
</script> </script>
<script> <script>
var oldPasswordField = document.getElementById("old_password"); var oldPasswordField = document.getElementById("old_password");
@ -272,7 +276,7 @@
function PreviewImage() { function PreviewImage() {
console.log('function called'); console.log('function called');
var fileInput = document.getElementById("client_logo"); var fileInput = document.getElementById("business_logo");
var file = fileInput.files[0]; var file = fileInput.files[0];
if (file) { if (file) {

View File

@ -25,7 +25,7 @@
<div class="col-8"> <div class="col-8">
<div class="page-title-box page-title-box-alt"> <div class="page-title-box page-title-box-alt">
<h4 class="page-title"><?php echo $docData->service_name; ?> <h4 class="page-title"><?php echo $docData->service_name; ?>
<a class="btn btn-primary download-btn"> <a class="download-btnn" style="color:#000;">
<i class="fas fa-download"></i> <i class="fas fa-download"></i>
</a> </a>
</h4> </h4>
@ -300,7 +300,7 @@
<script> <script>
document.addEventListener("DOMContentLoaded", function() { document.addEventListener("DOMContentLoaded", function() {
document.querySelector(".download-btn").addEventListener("click", async function() { document.querySelector(".download-btnn").addEventListener("click", async function() {
const { jsPDF } = window.jspdf; const { jsPDF } = window.jspdf;
var element = document.querySelector(".card-body"); var element = document.querySelector(".card-body");