fixing notifications bug
Showing
1 changed file
with
7 additions
and
1 deletions
| ... | @@ -28,6 +28,12 @@ use Tz\WordPress\Tools; | ... | @@ -28,6 +28,12 @@ use Tz\WordPress\Tools; |
| 28 | </div> | 28 | </div> |
| 29 | <?php endif;?> | 29 | <?php endif;?> |
| 30 | 30 | ||
| 31 | <?php | ||
| 32 | //print "<pre>"; | ||
| 33 | //print_r($entry); | ||
| 34 | //print "</pre>"; | ||
| 35 | ?> | ||
| 36 | |||
| 31 | <form enctype="multipart/form-data" method="post" action="/wp-admin/admin.php?page=notifications&action=edit&page_id=<?php echo $_GET['page_id']?>"> | 37 | <form enctype="multipart/form-data" method="post" action="/wp-admin/admin.php?page=notifications&action=edit&page_id=<?php echo $_GET['page_id']?>"> |
| 32 | 38 | ||
| 33 | <input type="hidden" name="_POSTED_" value="yes" /> | 39 | <input type="hidden" name="_POSTED_" value="yes" /> |
| ... | @@ -45,7 +51,7 @@ use Tz\WordPress\Tools; | ... | @@ -45,7 +51,7 @@ use Tz\WordPress\Tools; |
| 45 | <td> | 51 | <td> |
| 46 | <select name="type" id="notif_type" class="wide-input-field" onchange="updateNotificationType();"> | 52 | <select name="type" id="notif_type" class="wide-input-field" onchange="updateNotificationType();"> |
| 47 | <option value="scheduled" <?php echo ($validation->set_value('type',$entry->details['type'])=="scheduled") ? 'selected="selected"' : "";?>>Scheduled Notification</option> | 53 | <option value="scheduled" <?php echo ($validation->set_value('type',$entry->details['type'])=="scheduled") ? 'selected="selected"' : "";?>>Scheduled Notification</option> |
| 48 | <?php if (current_user_can(Settings\MANAGE_SYSTEM_NOTIFICATIONS)): ?> | 54 | <?php if (current_user_can(Settings\MANAGE_SYSTEM_NOTIFICATIONS) || ($_GET['action']=="edit" && $entry->details['type']=="triggered")): ?> |
| 49 | <option value="triggered" <?php echo ($validation->set_value('type',$entry->details['type'])=="triggered") ? 'selected="selected"' : "";?>>System Triggered Notification</option> | 55 | <option value="triggered" <?php echo ($validation->set_value('type',$entry->details['type'])=="triggered") ? 'selected="selected"' : "";?>>System Triggered Notification</option> |
| 50 | <?php endif; ?> | 56 | <?php endif; ?> |
| 51 | </select> | 57 | </select> | ... | ... |
-
Please register or sign in to post a comment