a1fdf9d8 by Kevin Burton

fixing notifications bug

1 parent 553f2e5f
......@@ -28,6 +28,12 @@ use Tz\WordPress\Tools;
</div>
<?php endif;?>
<?php
//print "<pre>";
//print_r($entry);
//print "</pre>";
?>
<form enctype="multipart/form-data" method="post" action="/wp-admin/admin.php?page=notifications&action=edit&page_id=<?php echo $_GET['page_id']?>">
<input type="hidden" name="_POSTED_" value="yes" />
......@@ -45,7 +51,7 @@ use Tz\WordPress\Tools;
<td>
<select name="type" id="notif_type" class="wide-input-field" onchange="updateNotificationType();">
<option value="scheduled" <?php echo ($validation->set_value('type',$entry->details['type'])=="scheduled") ? 'selected="selected"' : "";?>>Scheduled Notification</option>
<?php if (current_user_can(Settings\MANAGE_SYSTEM_NOTIFICATIONS)): ?>
<?php if (current_user_can(Settings\MANAGE_SYSTEM_NOTIFICATIONS) || ($_GET['action']=="edit" && $entry->details['type']=="triggered")): ?>
<option value="triggered" <?php echo ($validation->set_value('type',$entry->details['type'])=="triggered") ? 'selected="selected"' : "";?>>System Triggered Notification</option>
<?php endif; ?>
</select>
......