Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev
This commit is contained in:
commit
642cce286f
@ -57,7 +57,7 @@ class NotificationController extends AdminController
|
|||||||
$form_data['mail_content'] = $this->request->getPost('mailContent');
|
$form_data['mail_content'] = $this->request->getPost('mailContent');
|
||||||
$form_data['client_id'] = $this->request->getPost('client_id');
|
$form_data['client_id'] = $this->request->getPost('client_id');
|
||||||
$form_data['mail_content_json'] = $this->request->getPost('mailJson');
|
$form_data['mail_content_json'] = $this->request->getPost('mailJson');
|
||||||
$form_data['email_list'] = $this->request->getPost('email_list');
|
$form_data['email_list'] = $this->request->getPost('email_list')??'';
|
||||||
$notificationModel = new NotificationModel();
|
$notificationModel = new NotificationModel();
|
||||||
|
|
||||||
$find_notification = $notificationModel->where('client_id',$form_data['client_id'])->where('template_name',$form_data['template_name'])->first();
|
$find_notification = $notificationModel->where('client_id',$form_data['client_id'])->where('template_name',$form_data['template_name'])->first();
|
||||||
@ -195,11 +195,17 @@ class NotificationController extends AdminController
|
|||||||
public function getMailTemplateData($template_name,$client_id)
|
public function getMailTemplateData($template_name,$client_id)
|
||||||
{
|
{
|
||||||
$notificationModel = new NotificationModel();
|
$notificationModel = new NotificationModel();
|
||||||
$value = $notificationModel->where('client_id',$client_id)->where('template_name',$template_name)->first();
|
$value = $notificationModel->where('client_id',$client_id)->where('template_name',$template_name)->first()??[];
|
||||||
if($value){
|
if(!empty($value)){
|
||||||
$value['data'] = $this->MailAttachmentModel->where('notification_id', $value['id'])->where('is_active', 1)->findAll();
|
$value['data'] = $this->MailAttachmentModel->where('notification_id', $value['id'])->where('is_active', 1)->findAll()??[];
|
||||||
}
|
}
|
||||||
// return $this->respond(['status' => true, 'code' => 200, '' => 'Attachment deleted successfully'], 200);
|
|
||||||
|
if( isset($value['template_name']) && !empty($value['template_name']) && $value['template_name'] == "member_common_mail"){
|
||||||
|
$value['common_mails'] = $this->CommonEMailModel->where('notification_id',$value['id'])->findAll()??[];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return json_encode($value);
|
return json_encode($value);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
$value = json_decode($params['notification_data']['mail_content_json']??[],true);
|
||||||
|
$contentWidth = (int)$value['body']['values']['contentWidth']??500;
|
||||||
|
?>
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
@ -10,7 +15,7 @@
|
|||||||
<style>
|
<style>
|
||||||
|
|
||||||
.mail-template-header {
|
.mail-template-header {
|
||||||
max-width: 500px;
|
max-width: <?=$contentWidth?>px;
|
||||||
background-color: #ffffff !important;
|
background-color: #ffffff !important;
|
||||||
border-bottom: 1px solid #00999E;
|
border-bottom: 1px solid #00999E;
|
||||||
width: 100%; /* default: allow full width */
|
width: 100%; /* default: allow full width */
|
||||||
@ -26,7 +31,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.mail-template-footer {
|
.mail-template-footer {
|
||||||
max-width: 500px;
|
max-width: <?=$contentWidth?>px;
|
||||||
background-color: #ffffff !important;
|
background-color: #ffffff !important;
|
||||||
border-top: 1px solid #00999E;
|
border-top: 1px solid #00999E;
|
||||||
width: 100%; /* default: allow full width */
|
width: 100%; /* default: allow full width */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user