b8378740 by Jeff Balicki

w

1 parent defc7943
...@@ -127,8 +127,8 @@ function display_page() ...@@ -127,8 +127,8 @@ function display_page()
127 'sendto' => $sendto, 127 'sendto' => $sendto,
128 'status' => $entry->details['status'], 128 'status' => $entry->details['status'],
129 'trigger' => $trigger, 129 'trigger' => $trigger,
130 'execute_date' => $executeDate, 130 'execute_date' => $executeDate
131 'style' => $style 131
132 132
133 ] 133 ]
134 ); 134 );
...@@ -355,7 +355,7 @@ function create_notification() ...@@ -355,7 +355,7 @@ function create_notification()
355 [ 355 [
356 $lang.'_subject' => $subject, 356 $lang.'_subject' => $subject,
357 $lang.'_text' => $text, 357 $lang.'_text' => $text,
358 $lang.'_html' => $style.$html, 358 $lang.'_html' => $html,
359 $lang.'_attachments' => $attachments 359 $lang.'_attachments' => $attachments
360 ] 360 ]
361 ); 361 );
...@@ -386,8 +386,8 @@ function create_notification() ...@@ -386,8 +386,8 @@ function create_notification()
386 'sendto' => $sendto, 386 'sendto' => $sendto,
387 'status' => 'pending', 387 'status' => 'pending',
388 'trigger' => $trigger, 388 'trigger' => $trigger,
389 'execute_date' => $executeDate, 389 'execute_date' => $executeDate
390 'style' => $style 390
391 ] 391 ]
392 ); 392 );
393 update_post_meta($id, 'send_status', 'pending'); 393 update_post_meta($id, 'send_status', 'pending');
......
...@@ -329,19 +329,14 @@ function getInputFormValues($validation, $name) { ...@@ -329,19 +329,14 @@ function getInputFormValues($validation, $name) {
329 function updateNotificationType() { 329 function updateNotificationType() {
330 var type = jQuery('#notif_type').val(); 330 var type = jQuery('#notif_type').val();
331 var date = new Date().toLocaleDateString("en-US", {year: 'numeric', month: 'long', day: 'numeric'}); 331 var date = new Date().toLocaleDateString("en-US", {year: 'numeric', month: 'long', day: 'numeric'});
332
333
334
335
336
337 332
338 var header ='<div><span style="font-size: 9.5pt;">If you are unable to clearly view the below E-Flash, please click<b><a><span style="font-weight: normal;"> here</span></a></b></span><hr /><img class="&quot;alignnone" src="https://cbvinstitute.com/wp-content/uploads/2019/02/email_logo.png" alt="Logo" width="81" height="57" align="left" /><span style="font-size: 9.5pt; line-height: 115%; float: right;">'+date+'</span><div>'; 333 var header ='<div class="content"><div><span style="font-size: 9.5pt;">If you are unable to clearly view the below E-Flash, please click<b><a><span style="font-weight: normal;"> here</span></a></b></span><hr /><img class="alignnone" src="https://cbvinstitute.com/wp-content/uploads/2019/02/email_logo.png" alt="Logo" width="81" height="57" align="left" /><span style="font-size: 9.5pt; line-height: 115%; float: right;">'+date+'</span></div><br/><br/>';
339 334
340 var footer ='<div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><p class="footer"><strong><span style="font-family: GothamLight; font-size: 12px;"> To opt out, please:<br />1. Log in to cicbv.ca<br />2. Click on your name<br />3. From the drop down menu select profile<br />4. Edit E-flash settings<br />If you have any questions, please contact us: admin@cicbv.ca<br /></span></strong></p>' 335 var footer ='</div><div>&nbsp;</div><div>&nbsp;</div><div>&nbsp;</div><div>&nbsp;</div><div>&nbsp;</div><div>&nbsp;</div><div>&nbsp;</div><p class="footer"><strong><span style="font-family: GothamLight; font-size: 12px;"> To opt out, please:<br />1. Log in to cicbv.ca<br />2. Click on your name<br />3. From the drop down menu select profile<br />4. Edit E-flash settings<br />If you have any questions, please contact us: admin@cicbv.ca<br /></span></strong></p>';
341 336
342 var header_fr ='<div><span style="font-size: 9.5pt;">If you are unable to clearly view the below E-Flash, please click<b><a><span style="font-weight: normal;"> here</span></a></b></span><hr /><img class="&quot;alignnone" src="https://cbvinstitute.com/wp-content/uploads/2019/02/email_logo_fr.png" alt="Logo" width="81" height="57" align="left" /><span style="font-size: 9.5pt; line-height: 115%; float: right;">'+date+'</span><div>'; 337 var header_fr ='<div class="content"><div><span style="font-size: 9.5pt;">If you are unable to clearly view the below E-Flash, please click<b><a><span style="font-weight: normal;"> here</span></a></b></span><hr /><img class="alignnone" src="https://cbvinstitute.com/wp-content/uploads/2019/02/email_logo_fr.png" alt="Logo" width="81" height="57" align="left" /><span style="font-size: 9.5pt; line-height: 115%; float: right;">'+date+'</span></div>><br/><br/></div>';
343 338
344 var footer_fr ='<div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><div> </div><p class="footer"><strong><span style="font-family: GothamLight; font-size: 12px;"> To opt out, please:<br />1. Log in to cicbv.ca<br />2. Click on your name<br />3. From the drop down menu select profile<br />4. Edit E-flash settings<br />If you have any questions, please contact us: admin@cicbv.ca<br /></span></strong></p>' 339 var footer_fr ='</div><div>&nbsp;</div><div>&nbsp;</div><div>&nbsp;</div><div>&nbsp;</div><div>&nbsp;</div><div>&nbsp;</div><div>&nbsp;</div><p class="footer"><strong><span style="font-family: GothamLight; font-size: 12px;"> To opt out, please:<br />1. Log in to cicbv.ca<br />2. Click on your name<br />3. From the drop down menu select profile<br />4. Edit E-flash settings<br />If you have any questions, please contact us: admin@cicbv.ca<br /></span></strong></p>';
345 340
346 341
347 342
...@@ -351,22 +346,9 @@ function getInputFormValues($validation, $name) { ...@@ -351,22 +346,9 @@ function getInputFormValues($validation, $name) {
351 jQuery('.trigger-extended').show(); 346 jQuery('.trigger-extended').show();
352 }else if (type == "newsletter") { 347 }else if (type == "newsletter") {
353 348
354 $.ajax({ 349 jQuery("#tabs").append('<input type="hidden" id="email_style" name="email_style" class="wide-input-field" />');
355 url : window.location.protocol+"//"+window.location.hostname+"/wp-content/themes/cbv/assets/css/custom-editor-style.css", 350 jQuery("#email_style").val('newsletter');
356 dataType: "text", 351 jQuery('.scheduled-extended').show();
357 success : function (result) {
358
359 jQuery("#tabs").append('<input type="hidden" id="email_style" name="email_style" class="wide-input-field" />');
360 jQuery("#email_style").val('<style>'+result+'</style>');
361
362
363
364
365 }
366 });
367
368
369 jQuery('.scheduled-extended').show();
370 jQuery('.trigger-extended').hide(); 352 jQuery('.trigger-extended').hide();
371 jQuery(".text_verson").hide(); 353 jQuery(".text_verson").hide();
372 jQuery('.attachments').hide(); 354 jQuery('.attachments').hide();
......