54fe6eef by Jeff Balicki

ss

1 parent 5b4ad83a
......@@ -16,19 +16,19 @@ function getInputFormValues($validation, $name)
<div class="wrap">
<h2>Notifications - Create New</h2>
<?php if (isset($flash) && $flash != '') : ?>
<?php if (isset($flash) && $flash != ''): ?>
<div class="post-success">
<?php echo $flash; ?>
</div>
<?php endif; ?>
<?php if ($validation->validation_errors() != "" || isset($form_error)) : ?>
<?php endif;?>
<?php if ($validation->validation_errors() != "" || isset($form_error)): ?>
<div class="post-errors">
<div class="post-errors-title"><strong>Oops.</strong> There was an error saving your notification.</div>
<?php if (isset($form_error)) : ?>
<?php if (isset($form_error)): ?>
<p class="post-errors-content">You must include either an Email, System or SMS message.</p>
<?php endif; ?>
<?php endif;?>
</div>
<?php endif; ?>
<?php endif;?>
<form enctype="multipart/form-data" method="post" id="notifications-create-new" action="/wp-admin/admin.php?page=notifications-create-new">
......@@ -47,16 +47,16 @@ function getInputFormValues($validation, $name)
<td>
<select name="type" id="notif_type" class="wide-input-field" onchange="updateNotificationType();">
<option value="scheduled" <?php echo ($validation->set_value('type') == "scheduled" || $_POST['type'] == 'scheduled')
? 'selected="selected"' : ""; ?>>Scheduled Notification
? 'selected="selected"' : ""; ?>>Scheduled Notification
</option>
<option value="newsletter" <?php echo ($validation->set_value('type') == "newsletter" || $_POST['type'] == 'newsletter')
? 'selected="selected"' : ""; ?>>Newsletter
? 'selected="selected"' : ""; ?>>Newsletter
</option>
<?php if (current_user_can(Settings\MANAGE_SYSTEM_NOTIFICATIONS)) : ?>
<?php if (current_user_can(Settings\MANAGE_SYSTEM_NOTIFICATIONS)): ?>
<option value="triggered" <?php echo ($validation->set_value('type') == "triggered" || $_POST['type'] == 'triggered')
? 'selected="selected"' : ""; ?>>System Triggered Notification
? 'selected="selected"' : ""; ?>>System Triggered Notification
</option>
<?php endif; ?>
<?php endif;?>
</select>
<?php echo $validation->form_error('type'); ?>
</td>
......@@ -72,18 +72,18 @@ function getInputFormValues($validation, $name)
<td>
<select name="sendto" class="wide-input-field">
<option value="nousers" <?php echo ($validation->set_value('sendto') == "nousers")
? 'selected="selected"' : ""; ?>>No Users
? 'selected="selected"' : ""; ?>>No Users
</option>
<option value="allusers" <?php echo ($validation->set_value('sendto') == "allusers")
? 'selected="selected"' : ""; ?>>All Users
? 'selected="selected"' : ""; ?>>All Users
</option>
<optgroup label="By Group:">
<?php foreach (Notifications\getGroups() as $group_id => $group_name) : ?>
<?php foreach (Notifications\getGroups() as $group_id => $group_name): ?>
<option value="<?php echo $group_id ?>" <?php echo ($validation->set_value(
'sendto'
) == $group_id) ? 'selected="selected"'
: ""; ?>><?php echo $group_name; ?></option>
<?php endforeach; ?>
'sendto'
) == $group_id) ? 'selected="selected"'
: ""; ?>><?php echo $group_name; ?></option>
<?php endforeach;?>
</optgroup>
</select>
<?php echo $validation->form_error('sendto'); ?>
......@@ -114,7 +114,7 @@ function getInputFormValues($validation, $name)
</li>
</ul>
<?php foreach (['en', 'fr'] as $index => $lang) : ?>
<?php foreach (['en', 'fr'] as $index => $lang): ?>
<div id="tab-<?php echo $index + 1; ?>">
<table cellspacing="0" class="widefat post fixed expandable" style="margin-top: 15px;">
<thead>
......@@ -126,8 +126,8 @@ function getInputFormValues($validation, $name)
</tr>
</thead>
<tbody style="<?php echo (getInputFormValues($validation, $lang . '_subject')) ||
getInputFormValues($validation, $lang . '_text') ||
getInputFormValues($validation, $lang . '_html') ? '' : 'display: none;'; ?>;">
getInputFormValues($validation, $lang . '_text') ||
getInputFormValues($validation, $lang . '_html') ? '' : 'display: none;'; ?>;">
<tr>
<td width="150">Subject Line</td>
<td>
......@@ -146,10 +146,10 @@ function getInputFormValues($validation, $name)
<td>HTML Version (optional)</td>
<td>
<?php
$content = getInputFormValues($validation, $lang . '_html');
$settings = array('textarea_name' => $lang . '_html', "media_buttons" => true);
wp_editor($content, $lang . '_html', $settings);
?><?php echo $validation->form_error($lang . '_html'); ?>
$content = getInputFormValues($validation, $lang . '_html');
$settings = array('textarea_name' => $lang . '_html', "media_buttons" => true);
wp_editor($content, $lang . '_html', $settings);
?><?php echo $validation->form_error($lang . '_html'); ?>
</td>
</tr>
......@@ -160,9 +160,9 @@ function getInputFormValues($validation, $name)
</tr>
<?php
$attachments = $entry->email[$lang . '_attachments'];
$allowedAttachments = 3;
foreach ($attachments as $attachment) : ?>
$attachments = $entry->email[$lang . '_attachments'];
$allowedAttachments = 3;
foreach ($attachments as $attachment): ?>
<tr>
<td>&nbsp;</td>
<td>
......@@ -170,16 +170,16 @@ function getInputFormValues($validation, $name)
</td>
</tr>
<?php
$allowedAttachments--;
endforeach;
?>
$allowedAttachments--;
endforeach;
?>
<?php for ($a = 1; $a <= $allowedAttachments; $a++) : ?>
<?php for ($a = 1; $a <= $allowedAttachments; $a++): ?>
<tr class="attachments">
<td>&nbsp;</td>
<td><input type="file" name="<?php echo $lang; ?>_attachment[]" /></td>
</tr>
<?php endfor; ?>
<?php endfor;?>
</tbody>
</table>
......@@ -194,55 +194,55 @@ function getInputFormValues($validation, $name)
</tr>
</thead>
<tbody style="<?php echo ($validation->set_value(
$lang . '_system',
$entry->system[$lang . '_message']
) == '')
? 'display: none'
: ''; ?>;">
$lang . '_system',
$entry->system[$lang . '_message']
) == '')
? 'display: none'
: ''; ?>;">
<tr>
<td>Message Type</td>
<td>
<?php if ($lang == 'en') : ?>
<?php if ($lang == 'en'): ?>
<select name="system_message_type" class="wide-input-field">
<option value="none" <?php echo ($validation->set_value(
'system_message_type',
$entry->system['system_message_type']
) == 'none') ? 'selected="selected"' : ''; ?>>
'system_message_type',
$entry->system['system_message_type']
) == 'none') ? 'selected="selected"' : ''; ?>>
General Message
</option>
<option value="action_required" <?php echo ($validation->set_value(
'system_message_type',
$entry->system['system_message_type']
) == 'action_required') ? 'selected="selected"' : ''; ?>>
'system_message_type',
$entry->system['system_message_type']
) == 'action_required') ? 'selected="selected"' : ''; ?>>
Action Required
</option>
<option value="e-flash" <?php echo ($validation->set_value(
'system_message_type',
$entry->system['system_message_type']
) == 'e-flash') ? 'selected="selected"' : ''; ?>>
'system_message_type',
$entry->system['system_message_type']
) == 'e-flash') ? 'selected="selected"' : ''; ?>>
E-Flash
</option>
<option value="new_event" <?php echo ($validation->set_value(
'system_message_type',
$entry->system['system_message_type']
) == 'new_event') ? 'selected="selected"' : ''; ?>>
'system_message_type',
$entry->system['system_message_type']
) == 'new_event') ? 'selected="selected"' : ''; ?>>
New Event
</option>
</select>
<?php else : ?>
<?php else: ?>
<span class="system_message_type_value"></span>
<?php endif; ?>
<?php endif;?>
</td>
</tr>
<tr>
<td>Message (Text/HTML)</td>
<td>
<textarea name="<?php echo $lang; ?>_system" class="wide-input-field" rows="4" style="width:100%;"><?php echo $validation->set_value(
$lang . '_system',
isset($entry->system[$lang . '_message'])
? $entry->system[$lang . '_message']
: ''
); ?></textarea><?php echo $validation->form_error($lang . '_system'); ?>
$lang . '_system',
isset($entry->system[$lang . '_message'])
? $entry->system[$lang . '_message']
: ''
); ?></textarea><?php echo $validation->form_error($lang . '_system'); ?>
</td>
</tr>
......@@ -276,7 +276,7 @@ function getInputFormValues($validation, $name)
</div>
<?php endforeach; ?>
<?php endforeach;?>
</div>
<p>
<input type="submit" value=" Save " />
......@@ -421,11 +421,11 @@ function getInputFormValues($validation, $name)
});
// 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="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/>';
//
//
// var footer ='<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>';
//
//
// 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/>';
//
//
// 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>';
......@@ -446,7 +446,7 @@ function getInputFormValues($validation, $name)
jQuery('.scheduled_sendto').show();
//$(tinymce.get('en_html').getBody()).html(header+footer);
//$(tinymce.get('fr_html').getBody()).html(header_fr+footer_fr);
$(tinymce.get('en_html').getBody()).html('<div id="newsletter"><p><img class="header-img alignnone wp-image-125416 size-full" src="https://cbvinstitute.com/wp-content/uploads/2019/02/image001.png" alt="" width="1691" height="441" /></p><p>&nbsp;</p>' +
jQuery(tinymce.get('en_html').getBody()).html('<div id="newsletter"><p><img class="header-img alignnone wp-image-125416 size-full" src="https://cbvinstitute.com/wp-content/uploads/2019/02/image001.png" alt="" width="1691" height="441" /></p><p>&nbsp;</p>' +
'<div class="content-block-header"><h2><span style="font-family: MyanmarMN;"><strong><span style="color: #ffffff;">BREAKING</span> <span style="color: #6ac9c8;">NEWS</span></strong></span></h2>'+
'<table> <tbody> <tr class="trlast-child"> <td class="tdlast-child"> <h1 style="text-align: left;"><span style="font-family: MyanmarMN; color: #221d58;">FIRST-EVER CBV INSTITUTE </span><br /> <span style="font-family: MyanmarMN; color: #6ac9c8;">EXPERT WITNESS SYMPOSIUM</span></h1> <p style="text-align: left;">The CICBV is pleased to present its inaugural <strong>Expert Witness Symposium on Nov 19 20, 2018</strong>.'+
' <p>This event will provide CBVs with the unique opportunity to learn from, and with, renowned CBVs, senior legal counsel, and a federal court judge in an interactive and practical format. The Symposium will be of interest to CBVs who are looking to either brush up on, or develop, credible expert witness skills. Participants interested in attending this session should have some litigation support experience.</p> <p style="text-align: left;">Attendees may choose the live in-person <strong><a href="https://cicbv.ca/events/expert-witness-symposium-in-person-2-day-live-event/">2-day session</a></strong> or the <strong>'+
......@@ -465,7 +465,7 @@ function getInputFormValues($validation, $name)
' <p><span style="color: #221d58;"><strong><u> </u></strong></span></p> </td> </tr> <tr class="trlast-child"> <td class="tdlast-child"> <h1 style="text-align: left;"><span style="font-family: MyanmarMN; color: #221d58;">EMPLOYMENT <span style="color: #6ac9c8;">OPPORTUNITIES</span></span></h1> <table> <tbody> <tr> <td> <p>08/02/18</p> </td> <td> <p>MDD Forensic Accountants</p> </td> <td> <p>LONDON</p> </td> <td class="tdlast-child"> <p>Senior Manager</p> </td> </tr> <tr> <td> <p>07/26/18</p> </td> <td> <p>Ontario Teachers Pension Plan</p> </td> <td> <p>TORONTO</p> </td> <td class="tdlast-child"> <p><a href="https://cicbv.ca/employment/senior-financial-analyst-valuations/">Senior Financial Analyst, Valuations</a></p> </td> </tr> <tr class="trlast-child"> <td> <p>06/13/16</p> </td> <td> <p>Raymond Chabot Grant Thornton</p> </td> <td> '+
' <p>SHERBROOKE</p> </td> <td class="tdlast-child"> <p><a href="https://cicbv.ca/employment/conseiller-en-evaluation-dentreprise-2/">Conseiller en valuation d entreprises</a></p> </td> </tr> </tbody> </table> <p><img class="alignnone wp-image-129621 " src="https://cbvinstitute.com/wp-content/uploads/2019/07/LI-In-Bug-150x150.png" alt="" width="50" height="50" /></p> </td> </tr> </tbody> </table> </div>');
$(tinymce.get('fr_html').getBody()).html('<div id="newsletter"><p><img class="header-img alignnone wp-image-125416 size-full" src="https://cbvinstitute.com/wp-content/uploads/2019/02/image002.png" alt="" width="1691" height="441" /></p><p>&nbsp;</p>' +
jQuery(tinymce.get('fr_html').getBody()).html('<div id="newsletter"><p><img class="header-img alignnone wp-image-125416 size-full" src="https://cbvinstitute.com/wp-content/uploads/2019/02/image002.png" alt="" width="1691" height="441" /></p><p>&nbsp;</p>' +
'<div class="content-block-header"><h2><span style="font-family: MyanmarMN;"><strong><span style="color: #ffffff;">DERNIÈRES</span> <span style="color: #6ac9c8;">NOUVELLES</span></strong></span></h2>'+
'<table> <tbody> <tr class="trlast-child"> <td class="tdlast-child"> <h1 style="text-align: left;"><span style="font-family: MyanmarMN; color: #221d58;">FIRST-EVER CBV INSTITUTE </span><br /> <span style="font-family: MyanmarMN; color: #6ac9c8;">EXPERT WITNESS SYMPOSIUM</span></h1> <p style="text-align: left;">The CICBV is pleased to present its inaugural <strong>Expert Witness Symposium on Nov 19 20, 2018</strong>.'+
'<p>This event will provide CBVs with the unique opportunity to learn from, and with, renowned CBVs, senior legal counsel, and a federal court judge in an interactive and practical format. The Symposium will be of interest to CBVs who are looking to either brush up on, or develop, credible expert witness skills. Participants interested in attending this session should have some litigation support experience.</p> <p style="text-align: left;">Attendees may choose the live in-person <strong><a href="https://cicbv.ca/events/expert-witness-symposium-in-person-2-day-live-event/">2-day session</a></strong> or the <strong>'+
......