277 lines
17 KiB
PHP
277 lines
17 KiB
PHP
<html>
|
|
|
|
<head>
|
|
</head>
|
|
<style>
|
|
/* CSS for the preview image */
|
|
.preview-image {
|
|
display: block;
|
|
/* Ensure the image is displayed as a block element */
|
|
width: 120px;
|
|
/* Set the desired width for passport size */
|
|
height: 160px;
|
|
/* Set the desired height for passport size */
|
|
object-fit: cover;
|
|
/* Maintain the aspect ratio and fill the container */
|
|
margin-top: 10px;
|
|
/* Add a top margin for spacing */
|
|
}
|
|
</style>
|
|
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<h4 class="header-title"><?= $page_name; ?></h4>
|
|
<p class="sub-header"> </p>
|
|
|
|
<?php if (session()->getFlashdata('success')): ?>
|
|
<div class="alert alert-success"><?= session()->getFlashdata('success') ?></div>
|
|
<?php endif; ?>
|
|
<form method="post" enctype="multipart/form-data"
|
|
action="<?= base_url()."sitesetting_synchronization"; ?>">
|
|
<div class="form-group">
|
|
|
|
<div class="form-row">
|
|
<div class="form-group col-md-12">
|
|
<label for="postal_code" class="col-form-label">Organization</label>
|
|
<select id="business_id" name="business_id" class="form-control">
|
|
<option value="null"><?php if(!isset($details['business_id'])){ echo 'Choose Organization'; } ?></option>
|
|
<?php foreach ($business_details as $value) { ?>
|
|
<option value="<?php echo $value['business_id']; ?>"
|
|
<?php if (isset($details['business_id']) && ($details['business_id'] === $value['business_id'])) echo "selected"; ?>>
|
|
<?php echo $value['title']; ?></option>
|
|
<?php } ?>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<div class="form-group col-md-6">
|
|
<label for="site_name" class="col-form-label">Site Name</label>
|
|
<input type="text" class="form-control" id="site_name" name="site_name"
|
|
value="<?= isset($details['site_name']) ? $details['site_name'] : '' ?>"
|
|
placeholder="Site Name" />
|
|
</div>
|
|
<div class="form-group col-md-6">
|
|
<label for="site_title" class="col-form-label">Site Title</label>
|
|
<input type="text" class="form-control" id="site_title" name="site_title"
|
|
placeholder="Site Title"
|
|
value="<?= isset($details['site_title']) ? $details['site_title'] : '' ?>" />
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group col-md-6">
|
|
<label for="admin_email" class="col-form-label">Admin Email</label>
|
|
<input type="email" class="form-control" id="admin_email" name="admin_email"
|
|
placeholder="Admin Email"
|
|
value="<?= isset($details['admin_email']) ? $details['admin_email'] : '' ?>" />
|
|
</div>
|
|
<div class="form-group col-md-6">
|
|
<label for="mobile" class="col-form-label">Mobile Number</label>
|
|
<input type="text" class="form-control" id="mobile" name="mobile"
|
|
placeholder="Mobile Number (Enter only numbers)" data-parsley-type="number"
|
|
value="<?= isset($details['mobile']) ? $details['mobile'] : '' ?>" maxlength="10" />
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group col-md-6">
|
|
<label for="copyright" class="col-form-label">Copyright</label>
|
|
<input type="text" class="form-control" id="copyright" name="copyright"
|
|
placeholder="Copy Right"
|
|
value="<?= isset($details['copyright']) ? $details['copyright'] : '' ?>" />
|
|
</div>
|
|
<div class="form-group col-md-6">
|
|
<label for="pagination_limit" class="col-form-label">Pagination Limit</label>
|
|
<input type="text" class="form-control" id="pagination_limit" name="pagination_limit"
|
|
placeholder="Pagination Limit"
|
|
value="<?= isset($details['pagination_limit']) ? $details['pagination_limit'] : '' ?>" />
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group col-md-6">
|
|
<label for="logo" class="col-form-label">Logo Image</label>
|
|
<input type="file" class="form-control" style="border: 0px !important; " id="logo"
|
|
name="slogo" placeholder="Logo Name" accept=".png, .jpg, .jpeg"
|
|
value="<?= isset($details['logo']) ? $details['logo'] : '' ?>" />
|
|
</div>
|
|
<?php if (!empty($details['logo'])) { ?>
|
|
<div class="form-group col-md-6">
|
|
<label for="slogo" class="col-form-label"> Logo</label>
|
|
<img src="<?= base_url('public/uploads/'. $details['logo']) ?>" alt="Logo"
|
|
class="preview-image" />
|
|
</div>
|
|
<?php } ?>
|
|
<div class="form-group col-md-6">
|
|
<label for="favicon" class="col-form-label">Favicon</label>
|
|
<input type="file" class="form-control" style="border: 0px !important; " id="favic"
|
|
name="favicon" placeholder="Fav-icon Name" accept=".png, .jpg, .jpeg"
|
|
value="<?= isset($details['favicon']) ? $details['favicon'] : '' ?>" />
|
|
</div>
|
|
<?php if (!empty($details['favicon'])) { ?>
|
|
<div class="form-group col-md-6">
|
|
<label for="favicon" class="col-form-label">Icon</label>
|
|
<img src="<?= base_url('public/uploads/'. $details['favicon']) ?>" alt="Icon"
|
|
class="preview-image" />
|
|
</div>
|
|
<?php } ?>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group col-md-6">
|
|
<label for="currency" class="col-form-label">Currency</label>
|
|
<input type="text" class="form-control" id="currency" name="currency"
|
|
placeholder="currency (eg : Rupees,Dollar,Euro)"
|
|
value="<?= isset($details['currency']) ? $details['currency'] : '' ?>" />
|
|
</div>
|
|
<div class="form-group col-md-6">
|
|
<label for="country" class="col-form-label">Country</label>
|
|
<input type="text" class="form-control" id="country" name="country"
|
|
placeholder="Country"
|
|
value="<?= isset($details['country']) ? $details['country'] : '' ?>" />
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group col-md-4">
|
|
<label for="mail_protocol" class="col-form-label">Mail Protocol</label>
|
|
<input type="text" class="form-control" id="mail_protocol" name="mail_protocol"
|
|
placeholder="Mail Protocol (eg : zoho,gmail)"
|
|
value="<?= isset($details['mail_protocol']) ? $details['mail_protocol'] : '' ?>" />
|
|
</div>
|
|
<div class="form-group col-md-4">
|
|
<label for="mail_title" class="col-form-label">Mail Title</label>
|
|
<input type="text" class="form-control" id="mail_title" name="mail_title"
|
|
placeholder="Mail Title"
|
|
value="<?= isset($details['mail_title']) ? $details['mail_title'] : '' ?>" />
|
|
</div>
|
|
<div class="form-group col-md-4">
|
|
<label for="mail_host" class="col-form-label">Mail Host</label>
|
|
<input type="text" class="form-control" id="mail_host" name="mail_host"
|
|
placeholder="Mail Host"
|
|
value="<?= isset($details['mail_host']) ? $details['mail_host'] : '' ?>" />
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="form-group col-md-4">
|
|
<label for="mail_port" class="col-form-label">Mail Port</label>
|
|
<input type="text" class="form-control" id="mail_port" name="mail_port"
|
|
placeholder="Mail Port"
|
|
value="<?= isset($details['mail_port']) ? $details['mail_port'] : '' ?>" />
|
|
</div>
|
|
<!-- <div class="form-group col-md-3">
|
|
<label for="mail_encryption" class="col-form-label">Mail Encryption</label>
|
|
<input type="text" class="form-control" id="mail_encryption" name="mail_encryption"
|
|
placeholder="Mail Encryption"
|
|
value="<?= isset($details['mail_encryption']) ? $details['mail_encryption'] : '' ?>" />
|
|
</div> -->
|
|
<div class="form-group col-md-4">
|
|
<label for="mail_username" class="col-form-label">Mail Username</label>
|
|
<input type="text" class="form-control" id="mail_username" name="mail_username"
|
|
placeholder="Mail Username"
|
|
value="<?= isset($details['mail_username']) ? $details['mail_username'] : '' ?>" />
|
|
</div>
|
|
<div class="form-group col-md-4">
|
|
<label for="mail_password" class="col-form-label">Mail Password</label>
|
|
<input type="text" class="form-control" id="mail_password" name="mail_password"
|
|
placeholder="Mail Password"
|
|
value="<?= isset($details['mail_password']) ? $details['mail_password'] : '' ?>" />
|
|
</div>
|
|
</div>
|
|
|
|
<br />
|
|
<div class="after-add-more">
|
|
<hr />
|
|
<h4 class="header-title">Receipt Format</h4>
|
|
<div class="form-group">
|
|
<div class="form-row">
|
|
<div class="form-group col-md-4">
|
|
<div>
|
|
<label for="bistate" class="col-form-label">Prefix</label>
|
|
<input type="text" class="form-control" id="bistate" name="prefix_format" placeholder="Receipt Number Format" value="<?= isset($details['prefix_format']) ? $details['prefix_format'] : ''?>"/>
|
|
</div>
|
|
</div>
|
|
<div class="form-group col-md-4">
|
|
<label for="baddress1" class="col-form-label">Left Padding</label>
|
|
<input type="text" class="form-control" id="baddress1" name="left_pad" placeholder="Left Padding Number" value="<?= isset($details['left_pad']) ? $details['left_pad'] : '' ?>"/>
|
|
</div>
|
|
<div class="form-group col-md-4">
|
|
<label for="bcity" class="col-form-label">Start Number</label>
|
|
<input type="text" class="form-control" id="bcity" name="start_no" value="<?= isset($details['start_no']) ? $details['start_no'] : '1' ?>" placeholder="Start Number" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<br />
|
|
|
|
|
|
<input type="hidden" id="setting_id" name="setting_id" placeholder="hidden for setting id" value="<?= isset($details['setting_id']) ? $details['setting_id'] : '' ?>" />
|
|
|
|
<?php if(!empty($details)){ ?>
|
|
<div class="form-group text-right m-b-0 checkbox checkbox-purple">
|
|
<input type="checkbox" id="isactive" name="isactive" class="form-control"
|
|
<?= isset($details) && $details['isactive'] == 1 ? 'checked' : '' ?>>
|
|
<label for="isactive"> Is Active</label>
|
|
</div>
|
|
<br>
|
|
<?php } ?>
|
|
<div class="form-group text-right m-b-0">
|
|
<button type="submit" class="btn btn-success waves-effect waves-light mr-1" id="submitBtn">Submit</button>
|
|
<button type="reset" class="btn btn-primary waves-effect mr-1">Reset</button>
|
|
<!-- <button type="button" class="btn btn-secondary waves-effect">Cancel</button> -->
|
|
<button type="button" class="btn btn-secondary waves-effect" onclick="history.back()">Cancel</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div> <!-- end card-body-->
|
|
</div> <!-- end card-->
|
|
</div> <!-- end col-->
|
|
</div>
|
|
<!-- end row -->
|
|
<script>
|
|
document.getElementById('myForm').addEventListener('submit', function(event) {
|
|
var form = event.target;
|
|
|
|
if (form.checkValidity() === false) {
|
|
|
|
form.reportValidity(); // Display validation error messages
|
|
event.preventDefault(); // Prevent form submission if it's not valid
|
|
$('#submitBtn').prop('disabled', false);
|
|
} else {
|
|
|
|
$('#submitBtn').prop('disabled', true);
|
|
}
|
|
});
|
|
</script>
|
|
<script>
|
|
function checkFileFormat() {
|
|
var input = document.getElementById('logo');
|
|
var fileName = input.value;
|
|
var allowedFormats = ['.png', '.jpg', '.jpeg'];
|
|
|
|
if (fileName) {
|
|
var fileExtension = fileName.slice((fileName.lastIndexOf(".") - 1 >>> 0) + 2);
|
|
|
|
if (allowedFormats.indexOf(fileExtension.toLowerCase()) === -1) {
|
|
alert('Please choose a valid image file (PNG, JPG, JPEG).');
|
|
input.value = ''; // Clear the file input to allow choosing a new file
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
<script>
|
|
function checkFileFormats() {
|
|
var input = document.getElementById('favic');
|
|
var fileName = input.value;
|
|
var allowedFormats = ['.png', '.jpg', '.jpeg'];
|
|
|
|
if (fileName) {
|
|
var fileExtension = fileName.slice((fileName.lastIndexOf(".") - 1 >>> 0) + 2);
|
|
|
|
if (allowedFormats.indexOf(fileExtension.toLowerCase()) === -1) {
|
|
alert('Please choose a valid image file (PNG, JPG, JPEG).');
|
|
input.value = ''; // Clear the file input to allow choosing a new file
|
|
}
|
|
}
|
|
}
|
|
</script>
|