54fe6eef by Jeff Balicki

ss

1 parent 5b4ad83a
...@@ -16,19 +16,19 @@ function getInputFormValues($validation, $name) ...@@ -16,19 +16,19 @@ function getInputFormValues($validation, $name)
16 <div class="wrap"> 16 <div class="wrap">
17 <h2>Notifications - Create New</h2> 17 <h2>Notifications - Create New</h2>
18 18
19 <?php if (isset($flash) && $flash != '') : ?> 19 <?php if (isset($flash) && $flash != ''): ?>
20 <div class="post-success"> 20 <div class="post-success">
21 <?php echo $flash; ?> 21 <?php echo $flash; ?>
22 </div> 22 </div>
23 <?php endif; ?> 23 <?php endif;?>
24 <?php if ($validation->validation_errors() != "" || isset($form_error)) : ?> 24 <?php if ($validation->validation_errors() != "" || isset($form_error)): ?>
25 <div class="post-errors"> 25 <div class="post-errors">
26 <div class="post-errors-title"><strong>Oops.</strong> There was an error saving your notification.</div> 26 <div class="post-errors-title"><strong>Oops.</strong> There was an error saving your notification.</div>
27 <?php if (isset($form_error)) : ?> 27 <?php if (isset($form_error)): ?>
28 <p class="post-errors-content">You must include either an Email, System or SMS message.</p> 28 <p class="post-errors-content">You must include either an Email, System or SMS message.</p>
29 <?php endif; ?> 29 <?php endif;?>
30 </div> 30 </div>
31 <?php endif; ?> 31 <?php endif;?>
32 32
33 <form enctype="multipart/form-data" method="post" id="notifications-create-new" action="/wp-admin/admin.php?page=notifications-create-new"> 33 <form enctype="multipart/form-data" method="post" id="notifications-create-new" action="/wp-admin/admin.php?page=notifications-create-new">
34 34
...@@ -47,16 +47,16 @@ function getInputFormValues($validation, $name) ...@@ -47,16 +47,16 @@ function getInputFormValues($validation, $name)
47 <td> 47 <td>
48 <select name="type" id="notif_type" class="wide-input-field" onchange="updateNotificationType();"> 48 <select name="type" id="notif_type" class="wide-input-field" onchange="updateNotificationType();">
49 <option value="scheduled" <?php echo ($validation->set_value('type') == "scheduled" || $_POST['type'] == 'scheduled') 49 <option value="scheduled" <?php echo ($validation->set_value('type') == "scheduled" || $_POST['type'] == 'scheduled')
50 ? 'selected="selected"' : ""; ?>>Scheduled Notification 50 ? 'selected="selected"' : ""; ?>>Scheduled Notification
51 </option> 51 </option>
52 <option value="newsletter" <?php echo ($validation->set_value('type') == "newsletter" || $_POST['type'] == 'newsletter') 52 <option value="newsletter" <?php echo ($validation->set_value('type') == "newsletter" || $_POST['type'] == 'newsletter')
53 ? 'selected="selected"' : ""; ?>>Newsletter 53 ? 'selected="selected"' : ""; ?>>Newsletter
54 </option> 54 </option>
55 <?php if (current_user_can(Settings\MANAGE_SYSTEM_NOTIFICATIONS)) : ?> 55 <?php if (current_user_can(Settings\MANAGE_SYSTEM_NOTIFICATIONS)): ?>
56 <option value="triggered" <?php echo ($validation->set_value('type') == "triggered" || $_POST['type'] == 'triggered') 56 <option value="triggered" <?php echo ($validation->set_value('type') == "triggered" || $_POST['type'] == 'triggered')
57 ? 'selected="selected"' : ""; ?>>System Triggered Notification 57 ? 'selected="selected"' : ""; ?>>System Triggered Notification
58 </option> 58 </option>
59 <?php endif; ?> 59 <?php endif;?>
60 </select> 60 </select>
61 <?php echo $validation->form_error('type'); ?> 61 <?php echo $validation->form_error('type'); ?>
62 </td> 62 </td>
...@@ -72,18 +72,18 @@ function getInputFormValues($validation, $name) ...@@ -72,18 +72,18 @@ function getInputFormValues($validation, $name)
72 <td> 72 <td>
73 <select name="sendto" class="wide-input-field"> 73 <select name="sendto" class="wide-input-field">
74 <option value="nousers" <?php echo ($validation->set_value('sendto') == "nousers") 74 <option value="nousers" <?php echo ($validation->set_value('sendto') == "nousers")
75 ? 'selected="selected"' : ""; ?>>No Users 75 ? 'selected="selected"' : ""; ?>>No Users
76 </option> 76 </option>
77 <option value="allusers" <?php echo ($validation->set_value('sendto') == "allusers") 77 <option value="allusers" <?php echo ($validation->set_value('sendto') == "allusers")
78 ? 'selected="selected"' : ""; ?>>All Users 78 ? 'selected="selected"' : ""; ?>>All Users
79 </option> 79 </option>
80 <optgroup label="By Group:"> 80 <optgroup label="By Group:">
81 <?php foreach (Notifications\getGroups() as $group_id => $group_name) : ?> 81 <?php foreach (Notifications\getGroups() as $group_id => $group_name): ?>
82 <option value="<?php echo $group_id ?>" <?php echo ($validation->set_value( 82 <option value="<?php echo $group_id ?>" <?php echo ($validation->set_value(
83 'sendto' 83 'sendto'
84 ) == $group_id) ? 'selected="selected"' 84 ) == $group_id) ? 'selected="selected"'
85 : ""; ?>><?php echo $group_name; ?></option> 85 : ""; ?>><?php echo $group_name; ?></option>
86 <?php endforeach; ?> 86 <?php endforeach;?>
87 </optgroup> 87 </optgroup>
88 </select> 88 </select>
89 <?php echo $validation->form_error('sendto'); ?> 89 <?php echo $validation->form_error('sendto'); ?>
...@@ -114,7 +114,7 @@ function getInputFormValues($validation, $name) ...@@ -114,7 +114,7 @@ function getInputFormValues($validation, $name)
114 </li> 114 </li>
115 </ul> 115 </ul>
116 116
117 <?php foreach (['en', 'fr'] as $index => $lang) : ?> 117 <?php foreach (['en', 'fr'] as $index => $lang): ?>
118 <div id="tab-<?php echo $index + 1; ?>"> 118 <div id="tab-<?php echo $index + 1; ?>">
119 <table cellspacing="0" class="widefat post fixed expandable" style="margin-top: 15px;"> 119 <table cellspacing="0" class="widefat post fixed expandable" style="margin-top: 15px;">
120 <thead> 120 <thead>
...@@ -126,8 +126,8 @@ function getInputFormValues($validation, $name) ...@@ -126,8 +126,8 @@ function getInputFormValues($validation, $name)
126 </tr> 126 </tr>
127 </thead> 127 </thead>
128 <tbody style="<?php echo (getInputFormValues($validation, $lang . '_subject')) || 128 <tbody style="<?php echo (getInputFormValues($validation, $lang . '_subject')) ||
129 getInputFormValues($validation, $lang . '_text') || 129 getInputFormValues($validation, $lang . '_text') ||
130 getInputFormValues($validation, $lang . '_html') ? '' : 'display: none;'; ?>;"> 130 getInputFormValues($validation, $lang . '_html') ? '' : 'display: none;'; ?>;">
131 <tr> 131 <tr>
132 <td width="150">Subject Line</td> 132 <td width="150">Subject Line</td>
133 <td> 133 <td>
...@@ -146,10 +146,10 @@ function getInputFormValues($validation, $name) ...@@ -146,10 +146,10 @@ function getInputFormValues($validation, $name)
146 <td>HTML Version (optional)</td> 146 <td>HTML Version (optional)</td>
147 <td> 147 <td>
148 <?php 148 <?php
149 $content = getInputFormValues($validation, $lang . '_html'); 149 $content = getInputFormValues($validation, $lang . '_html');
150 $settings = array('textarea_name' => $lang . '_html', "media_buttons" => true); 150 $settings = array('textarea_name' => $lang . '_html', "media_buttons" => true);
151 wp_editor($content, $lang . '_html', $settings); 151 wp_editor($content, $lang . '_html', $settings);
152 ?><?php echo $validation->form_error($lang . '_html'); ?> 152 ?><?php echo $validation->form_error($lang . '_html'); ?>
153 153
154 </td> 154 </td>
155 </tr> 155 </tr>
...@@ -160,9 +160,9 @@ function getInputFormValues($validation, $name) ...@@ -160,9 +160,9 @@ function getInputFormValues($validation, $name)
160 </tr> 160 </tr>
161 161
162 <?php 162 <?php
163 $attachments = $entry->email[$lang . '_attachments']; 163 $attachments = $entry->email[$lang . '_attachments'];
164 $allowedAttachments = 3; 164 $allowedAttachments = 3;
165 foreach ($attachments as $attachment) : ?> 165 foreach ($attachments as $attachment): ?>
166 <tr> 166 <tr>
167 <td>&nbsp;</td> 167 <td>&nbsp;</td>
168 <td> 168 <td>
...@@ -170,16 +170,16 @@ function getInputFormValues($validation, $name) ...@@ -170,16 +170,16 @@ function getInputFormValues($validation, $name)
170 </td> 170 </td>
171 </tr> 171 </tr>
172 <?php 172 <?php
173 $allowedAttachments--; 173 $allowedAttachments--;
174 endforeach; 174 endforeach;
175 ?> 175 ?>
176 176
177 <?php for ($a = 1; $a <= $allowedAttachments; $a++) : ?> 177 <?php for ($a = 1; $a <= $allowedAttachments; $a++): ?>
178 <tr class="attachments"> 178 <tr class="attachments">
179 <td>&nbsp;</td> 179 <td>&nbsp;</td>
180 <td><input type="file" name="<?php echo $lang; ?>_attachment[]" /></td> 180 <td><input type="file" name="<?php echo $lang; ?>_attachment[]" /></td>
181 </tr> 181 </tr>
182 <?php endfor; ?> 182 <?php endfor;?>
183 183
184 </tbody> 184 </tbody>
185 </table> 185 </table>
...@@ -196,42 +196,42 @@ function getInputFormValues($validation, $name) ...@@ -196,42 +196,42 @@ function getInputFormValues($validation, $name)
196 <tbody style="<?php echo ($validation->set_value( 196 <tbody style="<?php echo ($validation->set_value(
197 $lang . '_system', 197 $lang . '_system',
198 $entry->system[$lang . '_message'] 198 $entry->system[$lang . '_message']
199 ) == '') 199 ) == '')
200 ? 'display: none' 200 ? 'display: none'
201 : ''; ?>;"> 201 : ''; ?>;">
202 <tr> 202 <tr>
203 <td>Message Type</td> 203 <td>Message Type</td>
204 <td> 204 <td>
205 <?php if ($lang == 'en') : ?> 205 <?php if ($lang == 'en'): ?>
206 <select name="system_message_type" class="wide-input-field"> 206 <select name="system_message_type" class="wide-input-field">
207 <option value="none" <?php echo ($validation->set_value( 207 <option value="none" <?php echo ($validation->set_value(
208 'system_message_type', 208 'system_message_type',
209 $entry->system['system_message_type'] 209 $entry->system['system_message_type']
210 ) == 'none') ? 'selected="selected"' : ''; ?>> 210 ) == 'none') ? 'selected="selected"' : ''; ?>>
211 General Message 211 General Message
212 </option> 212 </option>
213 <option value="action_required" <?php echo ($validation->set_value( 213 <option value="action_required" <?php echo ($validation->set_value(
214 'system_message_type', 214 'system_message_type',
215 $entry->system['system_message_type'] 215 $entry->system['system_message_type']
216 ) == 'action_required') ? 'selected="selected"' : ''; ?>> 216 ) == 'action_required') ? 'selected="selected"' : ''; ?>>
217 Action Required 217 Action Required
218 </option> 218 </option>
219 <option value="e-flash" <?php echo ($validation->set_value( 219 <option value="e-flash" <?php echo ($validation->set_value(
220 'system_message_type', 220 'system_message_type',
221 $entry->system['system_message_type'] 221 $entry->system['system_message_type']
222 ) == 'e-flash') ? 'selected="selected"' : ''; ?>> 222 ) == 'e-flash') ? 'selected="selected"' : ''; ?>>
223 E-Flash 223 E-Flash
224 </option> 224 </option>
225 <option value="new_event" <?php echo ($validation->set_value( 225 <option value="new_event" <?php echo ($validation->set_value(
226 'system_message_type', 226 'system_message_type',
227 $entry->system['system_message_type'] 227 $entry->system['system_message_type']
228 ) == 'new_event') ? 'selected="selected"' : ''; ?>> 228 ) == 'new_event') ? 'selected="selected"' : ''; ?>>
229 New Event 229 New Event
230 </option> 230 </option>
231 </select> 231 </select>
232 <?php else : ?> 232 <?php else: ?>
233 <span class="system_message_type_value"></span> 233 <span class="system_message_type_value"></span>
234 <?php endif; ?> 234 <?php endif;?>
235 </td> 235 </td>
236 </tr> 236 </tr>
237 <tr> 237 <tr>
...@@ -242,7 +242,7 @@ function getInputFormValues($validation, $name) ...@@ -242,7 +242,7 @@ function getInputFormValues($validation, $name)
242 isset($entry->system[$lang . '_message']) 242 isset($entry->system[$lang . '_message'])
243 ? $entry->system[$lang . '_message'] 243 ? $entry->system[$lang . '_message']
244 : '' 244 : ''
245 ); ?></textarea><?php echo $validation->form_error($lang . '_system'); ?> 245 ); ?></textarea><?php echo $validation->form_error($lang . '_system'); ?>
246 </td> 246 </td>
247 </tr> 247 </tr>
248 248
...@@ -276,7 +276,7 @@ function getInputFormValues($validation, $name) ...@@ -276,7 +276,7 @@ function getInputFormValues($validation, $name)
276 276
277 277
278 </div> 278 </div>
279 <?php endforeach; ?> 279 <?php endforeach;?>
280 </div> 280 </div>
281 <p> 281 <p>
282 <input type="submit" value=" Save " /> 282 <input type="submit" value=" Save " />
...@@ -446,7 +446,7 @@ function getInputFormValues($validation, $name) ...@@ -446,7 +446,7 @@ function getInputFormValues($validation, $name)
446 jQuery('.scheduled_sendto').show(); 446 jQuery('.scheduled_sendto').show();
447 //$(tinymce.get('en_html').getBody()).html(header+footer); 447 //$(tinymce.get('en_html').getBody()).html(header+footer);
448 //$(tinymce.get('fr_html').getBody()).html(header_fr+footer_fr); 448 //$(tinymce.get('fr_html').getBody()).html(header_fr+footer_fr);
449 $(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>' + 449 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>' +
450 '<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>'+ 450 '<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>'+
451 '<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>.'+ 451 '<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>.'+
452 ' <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>'+ 452 ' <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) ...@@ -465,7 +465,7 @@ function getInputFormValues($validation, $name)
465 ' <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> '+ 465 ' <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> '+
466 ' <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>'); 466 ' <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>');
467 467
468 $(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>' + 468 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>' +
469 '<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>'+ 469 '<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>'+
470 '<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>.'+ 470 '<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>.'+
471 '<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>'+ 471 '<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>'+
......