Fixes : ps
This commit is contained in:
parent
a8c173990b
commit
ecdfc71c98
@ -124,7 +124,6 @@ define('SMTP_USER', getenv('SMTP_USER'));
|
||||
define('SMTP_PASS', getenv('SMTP_PASS'));
|
||||
define('SMTP_PORT', getenv('SMTP_PORT'));
|
||||
## GET Constant Based on Env File Ends...
|
||||
define('DUMMY_VAR', $_ENV['WAAI_TOKEN']);
|
||||
|
||||
define('SEND_WAAI_URL', 'https://waai.in/api/send');
|
||||
define('SEND_WAAI_GROUP_URL', 'https://waai.in/api/send_group');
|
||||
|
||||
@ -90,7 +90,7 @@ class Settings extends BaseController
|
||||
$validationRule = [
|
||||
'favicon' => [
|
||||
'label' => 'Image File',
|
||||
'rules' => 'uploaded[favicon]|is_image[favicon]|mime_in[favicon,image/jpg,image/jpeg,image/gif,image/png,image/webp]'
|
||||
'rules' => 'uploaded[favicon]|is_image[favicon]|mime_in[favicon,image/ico,image/x-icon]'
|
||||
]
|
||||
];
|
||||
|
||||
|
||||
@ -47,10 +47,17 @@ class NotificationHelper
|
||||
|
||||
if ($cc !== '') {
|
||||
$ccRecipients = explode(',', trim($cc));
|
||||
$this->logger->info('Helper : Email carboncopy CC recipient = ' . implode(',', $ccRecipients));
|
||||
if(!empty($ccRecipients)) {
|
||||
$this->logger->info('Helper : Email carbon copy CC recipient = ' . implode(',', $ccRecipients));
|
||||
if (!empty($ccRecipients)) {
|
||||
if (getenv('CI_ENVIRONMENT') == "production") {
|
||||
$this->email->setCC('contact@vijayabharathambooks.com');
|
||||
}
|
||||
$this->email->setCC($ccRecipients);
|
||||
}
|
||||
} else {
|
||||
if (getenv('CI_ENVIRONMENT') == "production") {
|
||||
$this->email->setCC('contact@vijayabharathambooks.com');
|
||||
}
|
||||
}
|
||||
|
||||
if ($bcc !== '') {
|
||||
|
||||
@ -102,7 +102,7 @@
|
||||
<?php } ?>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="business_logo" class="col-form-label">Business Logo</label>
|
||||
<input type="file" name="business_logo" value="<?= isset($businesses['business_logo']) ? $details['business_logo'] : '' ?>" accept="image/*" onchange="validateFile(this)" />
|
||||
<input type="file" name="business_logo" value="<?= isset($businesses['business_logo']) ? $businesses['business_logo'] : '' ?>" accept="image/*" onchange="validateFile(this)" />
|
||||
<div id="error_message" style="color: red;"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -143,7 +143,7 @@
|
||||
<?php } ?>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="favicon" class="col-form-label">FavIcon</label>
|
||||
<input type="file" name="favicon" value="<?= isset($details['favicon']) ? $details['favicon'] : '' ?>" accept="image/*" onchange="validateFile(this)" />
|
||||
<input type="file" name="favicon" value="<?= isset($details['favicon']) ? $details['favicon'] : '' ?>" accept="image/ico,image/x-icon" onchange="validateFile(this)" />
|
||||
<div id="error_message" style="color: red;"></div>
|
||||
</div>
|
||||
</div>
|
||||
@ -254,7 +254,7 @@
|
||||
$("#country").val(v.country).prop("readonly", true);
|
||||
$("#mobile").val(v.mobile_no).prop("readonly", true);
|
||||
$("#terms_service").val(v.terms).prop("readonly", true);
|
||||
$("#logo").val(v.favicon);
|
||||
$("#logo").val(v.business_logo);
|
||||
});
|
||||
}else{
|
||||
alert("Business Details Not Founded");
|
||||
@ -265,12 +265,12 @@
|
||||
const errorMessage = document.getElementById("error_message");
|
||||
|
||||
if (file) {
|
||||
if (file.type.startsWith("image/")) {
|
||||
if (file.type === "image/ico" || file.type === "image/x-icon") {
|
||||
// It's an image file, no error
|
||||
errorMessage.textContent = "";
|
||||
} else {
|
||||
// Invalid file type
|
||||
errorMessage.textContent = "Invalid file type. Please select an image.";
|
||||
errorMessage.textContent = "Invalid file type. Please select an ICO or X-Icon image.";
|
||||
input.value = ""; // Clear the input field
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user