/** * Render the notification editor. * * @since 1.0 */ protected function render_notification_editor() { $editor = new Editor(Factory::make('itelic-outdated-customers'), array('mustSelectItem' => __("You must select an item", Plugin::SLUG), 'selectTemplateTag' => __("Select Template Tag", Plugin::SLUG), 'templateTag' => __("Template Tag", Plugin::SLUG), 'selectATag' => __("Select a tag", Plugin::SLUG), 'insertTag' => __("Insert", Plugin::SLUG), 'cancel' => __("Cancel", Plugin::SLUG), 'insertTemplateTag' => __("Insert Template Tag", Plugin::SLUG))); $editor->thickbox(); ?> <div class="spacing-wrapper hidden notifications-editor"> <h4><?php _e("Send Update Reminders", Plugin::SLUG); ?> </h4> <p class="description"> <?php printf(__('Email your customers who have not yet updated to version %1$s of %2$s.', Plugin::SLUG), $this->release->get_version(), $this->release->get_product()->post_title); ?> </p> <div class="notification-editor-fields-container"> <input type="text" id="notification-subject" placeholder="<?php esc_attr_e("Enter your subject", Plugin::SLUG); ?> "> <?php $editor->display_template_tag_button(); ?> <?php wp_editor('', 'notification-body', array('teeny' => true, 'media_buttons' => false, 'editor_height' => '250px')); ?> <p class="clearfix notification-buttons"> <a href="javascript:" class="button button-secondary" id="cancel-notification"> <?php _e("Cancel", Plugin::SLUG); ?> </a> <a href="javascript:" class="button button-primary" id="send-notification"> <?php _e("Send", Plugin::SLUG); ?> </a> </p> </div> </div> <?php }
/** * Get data to display for a single key. * * @param \ITELIC\Activation|\ITELIC\Release $release * @param bool $raw * * @return array */ protected function get_fields_for_object(\ITELIC\Release $release, $raw = false) { if ($release->get_start_date()) { $started = $release->get_start_date()->format(DateTime::ISO8601); } else { $started = '-'; } return array('ID' => $release->get_ID(), 'product' => $raw ? $release->get_product()->ID : $release->get_product()->post_title, 'version' => $release->get_version(), 'type' => $release->get_type(!$raw), 'status' => $release->get_status(!$raw), 'download' => $raw ? $release->get_download()->ID : $release->get_download()->post_title, 'started' => $started, 'changelog' => $release->get_changelog()); }