protected function _get_table_filters() { $filters = $where = array(); EE_Registry::instance()->load_helper('Form_Fields'); if (empty($this->_dtts_for_event)) { //this means we don't have an event so let's setup a filter dropdown for all the events to select //note possible capability restrictions if (!EE_Registry::instance()->CAP->current_user_can('ee_read_private_events', 'get_events')) { $where['status**'] = array('!=', 'private'); } if (!EE_Registry::instance()->CAP->current_user_can('ee_read_others_events', 'get_events')) { $where['EVT_wp_user'] = get_current_user_id(); } $events = EEM_Event::instance()->get_all(array($where, 'order_by' => array('EVT_name' => 'asc'))); $evts[] = array('id' => 0, 'text' => __('To toggle Check-in status, select an event', 'event_espresso')); foreach ($events as $evt) { //any registrations for this event? if (!$evt->get_count_of_all_registrations()) { continue; } $evts[] = array('id' => $evt->ID(), 'text' => $evt->get('EVT_name')); } $filters[] = EEH_Form_Fields::select_input('event_id', $evts); } else { //DTT datetimes filter $cur_dtt = isset($this->_req_data['DTT_ID']) ? $this->_req_data['DTT_ID'] : $this->_evt->primary_datetime()->ID(); $dtts = array(); foreach ($this->_dtts_for_event as $dtt) { $datetime_string = $dtt->start_date_and_time() . ' - ' . $dtt->end_date_and_time(); $dtts[] = array('id' => $dtt->ID(), 'text' => $datetime_string); } $filters[] = EEH_Form_Fields::select_input('DTT_ID', $dtts, $cur_dtt); } return $filters; }
/** * add_to_featured_image_meta_box * @param $event_meta */ public function add_to_featured_image_meta_box($event_meta) { EE_Registry::instance()->load_helper('Form_Fields'); $html = '<p>'; $html .= EEH_Form_Fields::select(__('Add image to event calendar', 'event_espresso'), isset($event_meta['display_thumb_in_calendar']) ? $event_meta['display_thumb_in_calendar'] : '', array(array('id' => true, 'text' => __('Yes', 'event_espresso')), array('id' => false, 'text' => __('No', 'event_espresso'))), 'show_on_calendar', 'show_on_calendar'); $html .= '</p>'; echo $html; }
protected function _get_table_filters() { $filters = array(); //todo we're currently using old functions here. We need to move things into the Events_Admin_Page() class as methods. EE_Registry::instance()->load_helper('Form_Fields'); $curstatus = isset($this->_req_data['status']) ? $this->_req_data['status'] : NULL; $cur_date = isset($this->_req_data['month_range']) ? $this->_req_data['month_range'] : ''; $cur_category = isset($this->_req_data['EVT_CAT']) ? $this->_req_data['EVT_CAT'] : -1; $reg_status = isset($this->_req_data['_reg_status']) ? $this->_req_data['_reg_status'] : ''; $filters[] = EEH_Form_Fields::generate_registration_months_dropdown($cur_date, $reg_status, $cur_category); $filters[] = EEH_Form_Fields::generate_event_category_dropdown($cur_category); $status = array(); $status[] = array('id' => 0, 'text' => __('Select Status', 'event_espresso')); foreach ($this->_status as $key => $value) { $status[] = array('id' => $key, 'text' => $value); } $filters[] = EEH_Form_Fields::select_input('_reg_status', $status, isset($this->_req_data['_reg_status']) ? strtoupper(sanitize_key($this->_req_data['_reg_status'])) : ''); return $filters; }
protected function _term_object_details_content($taxonomy = 'espresso_people_categories') { $editor_args['category_desc'] = array('type' => 'wp_editor', 'value' => EEH_Formatter::admin_format_content($this->_term_object->category_desc), 'class' => 'my_editor_custom', 'wpeditor_args' => array('media_buttons' => FALSE)); $_wp_editor = $this->_generate_admin_form_fields($editor_args, 'array'); $all_terms = get_terms(array($taxonomy), array('hide_empty' => 0, 'exclude' => array($this->_term_object->id))); //setup category select for term parents. $category_select_values[] = array('text' => __('No Parent', 'event_espresso'), 'id' => 0); foreach ($all_terms as $term) { $category_select_values[] = array('text' => $term->name, 'id' => $term->term_id); } $category_select = EEH_Form_Fields::select_input('category_parent', $category_select_values, $this->_term_object->parent); $template_args = array('category' => $this->_term_object, 'category_select' => $category_select, 'unique_id_info_help_link' => $this->_get_help_tab_link('unique_id_info'), 'category_desc_editor' => $_wp_editor['category_desc']['field'], 'disable' => '', 'disabled_message' => FALSE, 'term_name_label' => $taxonomy == 'espresso_people_categories' ? __('Category Name', 'event_espresso') : __('Type Name', 'event_espresso'), 'term_id_description' => $taxonomy == 'espresso_people_categories' ? __('This is a default category so you can edit the label and the description but not the slug', 'event_espresso') : __('This is a default type so you can edit the label and the description but not the slug', 'event_espresso'), 'term_parent_label' => $taxonomy == 'espresso_people_categories' ? __('Category Parent', 'event_espresso') : __('Type Parent', 'event_espresso'), 'term_parent_description' => $taxonomy == 'espresso_people_categories' ? __('Categories are hierarchical. You can change the parent for this category here.', 'event_espresso') : __('People Types are hierarchical. You can change the parent for this type here.', 'event_espresso'), 'term_description_label' => $taxonomy == 'espresso_people_categories' ? __('Category Description', 'event_espresso') : __('Type Description')); $template = EEA_PEOPLE_ADDON_ADMIN_TEMPLATE_PATH . 'people_term_details.template.php'; return EEH_Template::display_template($template, $template_args, TRUE); }
?> <?php echo EEH_Template::get_help_tab_link('display_expired_events_info'); ?> </label> </th> <td> <?php echo EEH_Form_Fields::select('expired_events', $display_expired_events, $values, 'EED_Events_Archive_display_expired_events', 'EED_Events_Archive_display_expired_events'); ?> </td> </tr> <tr> <th> <label for="EED_Events_Archive_reset_event_list_settings"> <?php _e('Reset Event List Settings', 'event_espresso'); ?> </label> </th> <td> <?php echo EEH_Form_Fields::select('reset_event_list_settings', 0, $values, 'EED_Events_Archive_reset_event_list_settings', 'EED_Events_Archive_reset_event_list_settings'); ?> </td> </tr> </tbody> </table>
<div class="padding"> <h2 class="ee-admin-settings-hdr"><?php _e('Countries and States/Provinces', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('country_select_info'); ?> </h2> <table class="form-table"> <tbody> <?php echo EEH_Form_Fields::generate_form_input($countries); ?> </tbody> </table> <br/> <p> <?php _e('The country that is selected above will populate the Country Details settings and the options for States/Provinces. This information will be used throughout Event Espresso including for registration purposes and how currency is displayed. If you make a change to the country on this page, it is important that you also update your Contact Information on the Your Organization tab.', 'event_espresso'); ?> </p> <div id="country-details-settings-dv"> <h2 class="ee-admin-settings-hdr"><?php _e('Country Details', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('country_details_info'); ?> </h2>
/** * Back-end widget form. * * @see WP_Widget::form() * * @param array $instance Previously saved values from database. * @return string|void */ public function form($instance) { EE_Registry::instance()->load_helper('Form_Fields'); EE_Registry::instance()->load_class('Question_Option', array(), FALSE, FALSE, TRUE); // Set up some default widget settings. $defaults = array('title' => 'Calendar', 'show_expired' => FALSE, 'category_id' => '', 'calendar_page' => ''); $instance = wp_parse_args((array) $instance, $defaults); add_filter('FHEE__EEH_Form_Fields__label_html', '__return_empty_string'); $yes_no_values = array(EE_Question_Option::new_instance(array('QSO_value' => 0, 'QSO_desc' => __('No', 'event_espresso'))), EE_Question_Option::new_instance(array('QSO_value' => 1, 'QSO_desc' => __('Yes', 'event_espresso')))); ?> <p> <label for="<?php echo $this->get_field_id('title'); ?> "> <?php _e('Title:', 'event_espresso'); ?> </label> <input type="text" id="<?php echo $this->get_field_id('title'); ?> " name="<?php echo $this->get_field_name('title'); ?> " width="20" value="<?php echo $instance['title']; ?> " /> </p> <p> <label for="<?php echo $this->get_field_id('show_expired'); ?> "> <?php _e('Display Expired Events?', 'event_espresso'); ?> </label> <?php echo EEH_Form_Fields::select(__('Display Expired Events?', 'event_espresso'), $instance['show_expired'], $yes_no_values, $this->get_field_name('show_expired'), $this->get_field_id('show_expired')); ?> </p> <p> <label for="<?php echo $this->get_field_id('category_id'); ?> "> <?php _e('Single Category Name (optional)', 'event_espresso'); ?> </label> <input type="text" id="<?php echo $this->get_field_id('category_id'); ?> " name="<?php echo $this->get_field_name('category_id'); ?> " width="20" value="<?php echo $instance['category_id']; ?> " /><br/> <span class="small-text"> <?php printf(__('Enter the Category Slug from the %sEvent Categories%s page', 'event_espresso'), '<a href="' . admin_url('admin.php?page=espresso_events&action=category_list') . '" target="_blank">', '</a>'); ?> </span> </p> <?php }
/** * generates a year dropdown selector with numbers for the next ten years * @return object */ public static function next_decade_two_digit_year_dropdown_options() { $options = array(); $current_year = date('y'); $next_decade = $current_year + 10; for ($x = $current_year; $x <= $next_decade; $x++) { $yy = str_pad($x, 2, '0', STR_PAD_LEFT); $options[(string) $yy] = (string) $yy; } return EEH_Form_Fields::prep_answer_options($options); }
<p> <?php echo EE_PUE::espresso_data_collection_optin_text(FALSE); ?> </p> <table class="form-table"> <tbody> <tr> <th> <label for="ueip_optin"> <?php _e('UXIP Opt In?', 'event_espresso'); ?> </label> </th> <td> <?php $values = array(array('id' => 'yes', 'text' => __('Yes! I want to help improve Event Espresso!', 'event_espresso')), array('id' => 'no', 'text' => __('Not at this time. Maybe later.', 'event_espresso'))); echo EEH_Form_Fields::select_input('ueip_optin', $values, !empty($ee_ueip_optin) ? $ee_ueip_optin : 'yes'); ?> </td> </tr> </tbody> </table> </div>
protected function _get_table_filters() { $filters = array(); EE_Registry::instance()->load_helper('Form_Fields'); $messengers = $this->_admin_page->get_active_messengers(); $message_types = $this->_admin_page->get_installed_message_types(); //setup messengers for selects $i = 1; $m_values[0]['id'] = 'all'; $m_values[0]['text'] = __('All Messengers', 'event_espresso'); foreach ($messengers as $messenger => $args) { $m_values[$i]['id'] = $messenger; $m_values[$i]['text'] = ucwords($args['obj']->label['singular']); $i++; } //lets do the same for message types $i = 1; foreach ($message_types as $message_type => $args) { $mt_values[$i]['id'] = $message_type; $mt_values[$i]['text'] = ucwords($args['obj']->label['singular']); $i++; } $msgr_default[0] = array('id' => 'none_selected', 'text' => __('Show All', 'event_espresso')); $mt_default[0] = array('id' => 'none_selected', 'text' => __('Show All', 'event_espresso')); $msgr_filters = !empty($m_values) ? array_merge($msgr_default, $m_values) : array(); $mt_filters = !empty($mt_values) ? array_merge($mt_default, $mt_values) : array(); if (empty($m_values)) { $msgr_filters[0] = array('id' => 'no_messenger_options', 'text' => __('No Messengers active', 'event_espresso')); } if (empty($mt_values)) { $mt_filters[0] = array('id' => 'no_message_type_options', 'text' => __('No Message Types active', 'event_espresso')); } if (count($messengers) >= 1 && !empty($m_values)) { unset($msgr_filters[0]); $msgr_filters = array_values($msgr_filters); //reindex keys } $filters[] = EEH_Form_Fields::select_input('ee_messenger_filter_by', $msgr_filters, isset($this->_req_data['ee_messenger_filter_by']) ? sanitize_key($this->_req_data['ee_messenger_filter_by']) : ''); $filters[] = EEH_Form_Fields::select_input('ee_message_type_filter_by', $mt_filters, isset($this->_req_data['ee_message_type_filter_by']) ? sanitize_key($this->_req_data['ee_message_type_filter_by']) : ''); return $filters; }
/** * generates HTML for the forms used on admin pages * @access protected * @param array $input_vars - array of input field details * @param array $id - used for defining unique identifiers for the form. * @param string $generator (options are 'string' or 'array', basically use this to indicate which generator to use) * @return string * @uses EEH_Form_Fields::get_form_fields (/helper/EEH_Form_Fields.helper.php) * @uses EEH_Form_Fields::get_form_fields_array (/helper/EEH_Form_Fields.helper.php) */ protected function _generate_admin_form_fields($input_vars = array(), $generator = 'string', $id = FALSE) { EE_Registry::instance()->load_helper('Form_Fields'); $content = $generator == 'string' ? EEH_Form_Fields::get_form_fields($input_vars, $id) : EEH_Form_Fields::get_form_fields_array($input_vars); return $content; }
public function venue_metabox() { $values = array(array('id' => true, 'text' => __('Yes', 'event_espresso')), array('id' => false, 'text' => __('No', 'event_espresso'))); $evt_obj = $this->_adminpage_obj->get_event_object(); $evt_id = $evt_obj->ID(); //first let's see if we have a venue already $evt_venues = !empty($evt_id) ? $evt_obj->venues() : array(); $evt_venue = $evt_venues && is_array($evt_venues) ? reset($evt_venues) : null; $evt_venue_id = $evt_venue instanceof EE_Venue ? $evt_venue->ID() : null; //possibly private venues. if (EE_Registry::instance()->CAP->current_user_can('ee_read_private_venues', 'get_venues')) { $vnu_where['status'] = array('IN', array('publish', 'private')); } else { $vnu_where['status'] = 'publish'; } //cap checks if (!EE_Registry::instance()->CAP->current_user_can('ee_read_others_venues', 'get_venues')) { $vnu_where['VNU_wp_user'] = get_current_user_id(); } $vnumdl = EE_Registry::instance()->load_model('Venue'); $venues = $vnumdl->get_all(array($vnu_where, 'order_by' => array('VNU_name' => 'ASC'))); $ven_select = array(); $ven_select[0] = __('Select a Venue', 'event_espresso'); //setup venues for selector foreach ($venues as $venue) { $ven_select[$venue->ID()] = $venue->name(); } //if $ven_select does not have the existing venue attached to event then let's add that because we'll always //show existing attached venues even if it's trashed (or some other restricted status). if ($evt_venue_id && !isset($ven_select[$evt_venue_id])) { $ven_select[$evt_venue_id] = $evt_venue->name(); $venues = array_merge($venues, array($evt_venue)); } $template_args['venues'] = $venues; $template_args['evt_venue_id'] = $evt_venue_id; $template_args['venue_selector'] = EEH_Form_Fields::select_input('venue_id', $ven_select, $evt_venue_id, 'id="venue_id"'); $template_args['enable_for_gmap'] = EEH_Form_Fields::select_input('enable_for_gmap', $values, is_object($evt_venue) ? $evt_venue->enable_for_gmap() : NULL, 'id="enable_for_gmap"'); $template_path = empty($venues) ? EE_VENUES_TEMPLATE_PATH . 'event_venues_metabox_content.template.php' : EE_VENUES_TEMPLATE_PATH . 'event_venues_metabox_content_from_manager.template.php'; EEH_Template::display_template($template_path, $template_args); }
public function use_venue_and_staff_manager_settings($template_args) { $_args['use_personnel_manager_select'] = EEH_Form_Fields::select_input('use_personnel_manager', $template_args['values'], $template_args['use_personnel_manager']); $template = GEN_SET_CAF_TEMPLATE_PATH . 'use_venue_and_staff_manager_settings.template.php'; EEH_Template::display_template($template, $_args); }
<div class="padding"> <table class="form-table"> <tbody> <tr> <th> <label> <?php _e('Allow Payment-retry for Pending and Deferred Payments?', 'event_espresso'); ?> </label> </th> <td> <?php echo EEH_Form_Fields::select_input('show_pending_payment_options', $values, $show_pending_payment_options); ?> </td> </tr> </tbody> </table> <p class="description" style="margin-left: 10px;"> <?php _e("If a payment is marked as 'Pending Payment', or if payment is deferred (ie, an offline gateway like Check, Bank, or Invoice is used), then give registrants the option to retry payment. ", 'event_espresso'); ?> </p> </div>
echo $price->type(); ?> " /> <p><strong><?php _e('Price', 'event_espresso'); ?> </strong></p> <p class="description"><?php _e('This is the default base price. Every new ticket created will start off with this base price.', 'event_espresso'); ?> </p> <?php } else { ?> <?php echo EEH_Form_Fields::select_input('PRT_ID', $price_types, $price->type(), 'id="PRT_ID"'); ?> <p class="description"><?php _e('Price Modifier. Default items will apply to ALL new events you create.', 'event_espresso'); ?> </p> <?php } ?> </td> </tr> <tr valign="top"> <th><label for="PRC_name"><?php _e('Name', 'event_espresso'); ?> </label> <?php
_e('Help Tour Global Activation', 'event_espresso'); ?> <span id="help_tour_activation"><?php echo EEH_Template::get_help_tab_link('help_tour_activation_info'); ?> </span> </h2> <table class="form-table"> <tbody> <tr> <th> <label> <?php _e('This toggles whether the Event Espresso help tours are active globally or not', 'event_espresso'); ?> </label> </th> <td> <?php echo EEH_Form_Fields::select_input('help_tour_activation', $values, $help_tour_activation); ?> </td> </tr> </tbody> </table> </div>
?> </p> </td> </tr> <tr> <th> <label for="EED_Events_Single_use_sortable_display_order"> <?php _e('Use Custom Display Order?', 'event_espresso'); ?> </label> </th> <td> <?php echo EEH_Form_Fields::select('use_sortable_display_order', $use_sortable_display_order, $values, 'EED_Events_Single_use_sortable_display_order', 'EED_Events_Single_use_sortable_display_order'); ?> <p class="description "> <?php echo sprintf(__('%1$sPlease Note:%2$s%3$sIf you are currently using filters to customize the display order for elements within the Event Single page display, then you do NOT activate this feature until those filters have been removed or disabled. If this feature is activated while still using such filters, duplicate event content such as the ticket selector, datetimes, or venue information could be displayed on the frontend of the site. Please verify that this is not the case after activating this feature.', 'event_espresso'), '<span class="important-notice">', '</span>', '<br />'); ?> </p> </td> </tr> <tr> <th> <?php _e('Display Order', 'event_espresso'); echo EEH_Template::get_help_tab_link('display_addresses_in_reg_form_info'); ?>
/** * _get_table_filters * We use this to assemble and return any filters that are associated with this table that help further refine what get's shown in the table. * * @abstract * @access protected * @return string * @throws \EE_Error */ protected function _get_table_filters() { $filters = array(); EE_Registry::instance()->load_helper('Form_Fields'); //setup messengers for selects $m_values = $this->get_admin_page()->get_messengers_for_list_table(); //lets do the same for message types $mt_values = $this->get_admin_page()->get_message_types_for_list_table(); //and the same for contexts $contexts = $this->get_admin_page()->get_contexts_for_message_types_for_list_table(); $i = 1; $labels = $c_values = array(); foreach ($contexts as $context => $label) { //some message types may have the same label for a different context, so we're grouping these together so the end user //doesn't get confused. if (isset($labels[$label])) { $c_values[$labels[$label]]['id'] .= ',' . $context; continue; } $c_values[$i]['id'] = $context; $c_values[$i]['text'] = $label; $labels[$label] = $i; $i++; } $msgr_default[0] = array('id' => 'none_selected', 'text' => __('All Messengers', 'event_espresso')); $mt_default[0] = array('id' => 'none_selected', 'text' => __('All Message Types', 'event_espresso')); $c_default[0] = array('id' => 'none_selected', 'text' => __('All Contexts', 'event_espresso ')); $msgr_filters = count($m_values) > 1 ? array_merge($msgr_default, $m_values) : $m_values; $mt_filters = !empty($mt_values) && count($mt_values) > 1 ? array_merge($mt_default, $mt_values) : (array) $mt_values; $c_filters = !empty($c_values) && count($c_values) > 1 ? array_merge($c_default, $c_values) : (array) $c_values; if (empty($msgr_filters)) { $msgr_filters[0] = array('id' => 'none_selected', 'text' => __('No Messengers active', 'event_espresso')); } if (empty($mt_filters)) { $mt_filters[0] = array('id' => 'none_selected', 'text' => __('No Message Types active', 'event_espresso')); } if (empty($c_filters)) { $c_filters[0] = array('id' => 'none_selected', 'text' => __('No Contexts (because no message types active)', 'event_espresso')); } if (count($msgr_filters) > 1) { $filters[] = EEH_Form_Fields::select_input('ee_messenger_filter_by', array_values($msgr_filters), isset($this->_req_data['ee_messenger_filter_by']) ? sanitize_title($this->_req_data['ee_messenger_filter_by']) : ''); } if (count($mt_filters) > 1) { $filters[] = EEH_Form_Fields::select_input('ee_message_type_filter_by', array_values($mt_filters), isset($this->_req_data['ee_message_type_filter_by']) ? sanitize_title($this->_req_data['ee_message_type_filter_by']) : ''); } if (count($c_filters) > 1) { $filters[] = EEH_Form_Fields::select_input('ee_context_filter_by', array_values($c_filters), isset($this->_req_data['ee_context_filter_by']) ? sanitize_text_field($this->_req_data['ee_context_filter_by']) : ''); } return $filters; }
<?php $tooltip_style = array(array('id' => 'qtip-plain', 'text' => __('plain', 'event_espresso')), array('id' => 'qtip-light', 'text' => __('light', 'event_espresso')), array('id' => 'qtip-dark', 'text' => __('dark', 'event_espresso')), array('id' => 'qtip-red', 'text' => __('red', 'event_espresso')), array('id' => 'qtip-green', 'text' => __('green', 'event_espresso')), array('id' => 'qtip-blue', 'text' => __('blue', 'event_espresso')), array('id' => 'qtip-bootstrap', 'text' => __('Twitter Bootstrap', 'event_espresso')), array('id' => 'qtip-tipsy', 'text' => __('Tipsy', 'event_espresso')), array('id' => 'qtip-youtube', 'text' => __('YouTube', 'event_espresso')), array('id' => 'qtip-jtools', 'text' => __('jTools', 'event_espresso')), array('id' => 'qtip-cluetip', 'text' => __('clueTip', 'event_espresso')), array('id' => 'qtip-tipped', 'text' => __('Tipped', 'event_espresso'))); ?> <tr class="tooltip_style-selections requires-tooltips"> <th class="tooltip_style"> <label for="tooltip_style"> <?php _e('Tooltip Style', 'event_espresso'); ?> </label> </th> <td> <?php echo EEH_Form_Fields::select_input('calendar[tooltip][style]', $tooltip_style, $calendar_config->tooltip->style, 'id="tooltip_style"'); ?> <br/> <span class="description"> <?php _e('Adds styling to tooltips. Default: light', 'event_espresso'); ?> </span> </td> </tr> </tbody> </table> </div> <input type='hidden' name="return_action" value="<?php echo $return_action;
/** * @return array */ protected function _get_table_filters() { $filters = array(); //setup messengers for selects $m_values = $this->get_admin_page()->get_messengers_for_list_table(); //lets do the same for message types $mt_values = $this->get_admin_page()->get_message_types_for_list_table(); //setup messengers for selects $m_values[0]['id'] = 'all'; $m_values[0]['text'] = __('All Messengers', 'event_espresso'); $msgr_default[0] = array('id' => 'none_selected', 'text' => __('Show All', 'event_espresso')); $mt_default[0] = array('id' => 'none_selected', 'text' => __('Show All', 'event_espresso')); $msgr_filters = !empty($m_values) ? array_merge($msgr_default, $m_values) : array(); $mt_filters = !empty($mt_values) ? array_merge($mt_default, $mt_values) : array(); if (empty($m_values)) { $msgr_filters[0] = array('id' => 'no_messenger_options', 'text' => __('No Messengers active', 'event_espresso')); } if (empty($mt_values)) { $mt_filters[0] = array('id' => 'no_message_type_options', 'text' => __('No Message Types active', 'event_espresso')); } if (count($m_values) >= 1 && !empty($m_values)) { unset($msgr_filters[0]); $msgr_filters = array_values($msgr_filters); //reindex keys } $filters[] = EEH_Form_Fields::select_input('ee_messenger_filter_by', $msgr_filters, isset($this->_req_data['ee_messenger_filter_by']) ? sanitize_key($this->_req_data['ee_messenger_filter_by']) : ''); $filters[] = EEH_Form_Fields::select_input('ee_message_type_filter_by', $mt_filters, isset($this->_req_data['ee_message_type_filter_by']) ? sanitize_key($this->_req_data['ee_message_type_filter_by']) : ''); return $filters; }
protected function _get_price_modifier_template($tktrow, $prcrow, $price, $default, $disabled = FALSE) { $select_name = $default && empty($price) ? 'edit_prices[TICKETNUM][PRICENUM][PRT_ID]' : 'edit_prices[' . $tktrow . '][' . $prcrow . '][PRT_ID]'; $price_types = EE_Registry::instance()->load_model('Price_Type')->get_all(array(array('OR' => array('PBT_ID' => '2', 'PBT_ID*' => '3')))); $price_option_span_template = PRICING_TEMPLATE_PATH . 'event_tickets_datetime_price_option_span.template.php'; $all_price_types = $default && empty($price) ? array(array('id' => 0, 'text' => __('Select Modifier', 'event_espresso'))) : array(); $selected_price_type_id = $default && empty($price) ? 0 : $price->type(); $price_option_spans = ''; //setup pricetypes for selector foreach ($price_types as $price_type) { $all_price_types[] = array('id' => $price_type->ID(), 'text' => $price_type->get('PRT_name')); //while we're in the loop let's setup the option spans used by js $spanargs = array('PRT_ID' => $price_type->ID(), 'PRT_operator' => $price_type->is_discount() ? '-' : '+', 'PRT_is_percent' => $price_type->get('PRT_is_percent') ? 1 : 0); $price_option_spans .= EEH_Template::display_template($price_option_span_template, $spanargs, TRUE); } $select_params = $disabled ? 'style="width:auto;" disabled' : 'style="width:auto;"'; $main_name = $select_name; $select_name = $disabled ? 'archive_price[' . $tktrow . '][' . $prcrow . '][PRT_ID]' : $main_name; $template_args = array('tkt_row' => $default ? 'TICKETNUM' : $tktrow, 'PRC_order' => $default && empty($price) ? 'PRICENUM' : $prcrow, 'price_modifier_selector' => EEH_Form_Fields::select_input($select_name, $all_price_types, $selected_price_type_id, $select_params, 'edit-price-PRT_ID'), 'main_name' => $main_name, 'selected_price_type_id' => $selected_price_type_id, 'price_option_spans' => $price_option_spans, 'price_selected_operator' => $default && empty($price) ? '' : ($price->is_discount() ? '-' : '+'), 'price_selected_is_percent' => $default && empty($price) ? '' : ($price->is_percent() ? 1 : 0), 'disabled' => $disabled); $template_args = apply_filters('FHEE__espresso_events_Pricing_Hooks___get_price_modifier_template__template_args', $template_args, $tktrow, $prcrow, $price, $default, $disabled, $this->_is_creating_event); $template = PRICING_TEMPLATE_PATH . 'event_tickets_datetime_price_modifier_selector.template.php'; return EEH_Template::display_template($template, $template_args, TRUE); }
protected function _get_admin_content_events_edit($message_types, $extra) { //defaults $template_args = array(); $custom_templates = array(); $selector_rows = ''; //we don't need message types here so we're just going to ignore. we do, however, expect the event id here. The event id is needed to provide a link to setup a custom template for this event. $event_id = isset($extra['event']) ? $extra['event'] : NULL; $template_wrapper_path = EE_LIBRARIES . 'messages/messenger/admin_templates/event_switcher_wrapper.template.php'; $template_row_path = EE_LIBRARIES . 'messages/messenger/admin_templates/event_switcher_row.template.php'; //array of template objects for global and custom (non-trashed) (but remember just for this messenger!) $global_templates = EEM_Message_Template_Group::instance()->get_all(array(array('MTP_messenger' => $this->name, 'MTP_is_global' => TRUE, 'MTP_is_active' => TRUE))); $templates_for_event = EEM_Message_Template_Group::instance()->get_all_custom_templates_by_event($event_id, array('MTP_messenger' => $this->name, 'MTP_is_active' => TRUE)); $templates_for_event = !empty($templates_for_event) ? $templates_for_event : array(); //so we need to setup the rows for the selectors and we use the global mtpgs (cause those will the active message template groups) foreach ($global_templates as $mtpgID => $mtpg) { //verify this message type is supposed to show on this page $mtp_obj = $mtpg->message_type_obj(); if (!$mtp_obj instanceof EE_message_type) { continue; } $mtp_obj->admin_registered_pages = (array) $mtp_obj->admin_registered_pages; if (!in_array('events_edit', $mtp_obj->admin_registered_pages)) { continue; } $stargs = array(); $default_value = ''; $select_values = array(); $select_values[$mtpgID] = __('Global', 'event_espresso'); $default_value = array_key_exists($mtpgID, $templates_for_event) && !$mtpg->get('MTP_is_override') ? $mtpgID : NULL; //if the override has been set for the global template, then that means even if there are custom templates already created we ignore them because of the set override. if (!$mtpg->get('MTP_is_override')) { //any custom templates for this message type? $custom_templates = EEM_Message_Template_Group::instance()->get_custom_message_template_by_m_and_mt($this->name, $mtpg->message_type()); foreach ($custom_templates as $cmtpgID => $cmtpg) { $select_values[$cmtpgID] = $cmtpg->name(); $default_value = array_key_exists($cmtpgID, $templates_for_event) ? $cmtpgID : $default_value; } } //if there is no $default_value then we set it as the global $default_value = empty($default_value) ? $mtpgID : $default_value; $edit_url = EEH_URL::add_query_args_and_nonce(array('page' => 'espresso_messages', 'action' => 'edit_message_template', 'id' => $default_value), admin_url('admin.php')); $create_url = EEH_URL::add_query_args_and_nonce(array('page' => 'espresso_messages', 'action' => 'add_new_message_template', 'GRP_ID' => $default_value), admin_url('admin.php')); $st_args['mt_name'] = ucwords($mtp_obj->label['singular']); $st_args['mt_slug'] = $mtpg->message_type(); $st_args['messenger_slug'] = $this->name; $st_args['selector'] = EEH_Form_Fields::select_input('event_message_templates_relation[' . $mtpgID . ']', $select_values, $default_value, 'data-messenger="' . $this->name . '" data-messagetype="' . $mtpg->message_type() . '"', 'message-template-selector'); //note that message template group that has override_all_custom set will remove the ability to set a custom message template based off of the global (and that also in turn overrides any other custom templates). $st_args['create_button'] = $mtpg->get('MTP_is_override') ? '' : '<a data-messenger="' . $this->name . '" data-messagetype="' . $mtpg->message_type() . '" data-grpid="' . $default_value . '" target="_blank" href="' . $create_url . '" class="button button-small create-mtpg-button">' . __('Create New Custom', 'event_espresso') . '</a>'; $st_args['create_button'] = EE_Registry::instance()->CAP->current_user_can('ee_edit_messages', 'espresso_messsages_add_new_message_template') ? $st_args['create_button'] : ''; $st_args['edit_button'] = EE_Registry::instance()->CAP->current_user_can('ee_edit_message', 'espresso_messages_edit_message_template', $mtpgID) ? '<a data-messagetype="' . $mtpg->message_type() . '" data-grpid="' . $default_value . '" target="_blank" href="' . $edit_url . '" class="button button-small edit-mtpg-button">' . __('Edit', 'event_espresso') . '</a>' : ''; $selector_rows .= EEH_Template::display_template($template_row_path, $st_args, TRUE); } //if no selectors present then get out. if (empty($selector_rows)) { return ''; } $template_args['selector_rows'] = $selector_rows; return EEH_Template::display_template($template_wrapper_path, $template_args, TRUE); }
/** * Metabox for attendee details * @param WP_Post $post wp post object * @return string attendee address details (and form) */ public function attendee_address_details($post) { //get attendee object (should already have it) $this->_template_args['attendee'] = $this->_cpt_model_obj; $this->_template_args['state_html'] = EEH_Form_Fields::generate_form_input(new EE_Question_Form_Input(EE_Question::new_instance(array('QST_ID' => 0, 'QST_display_text' => __('State/Province', 'event_espresso'), 'QST_system' => 'admin-state')), EE_Answer::new_instance(array('ANS_ID' => 0, 'ANS_value' => $this->_cpt_model_obj->state_ID())), array('input_id' => 'STA_ID', 'input_name' => 'STA_ID', 'input_prefix' => '', 'append_qstn_id' => FALSE))); $this->_template_args['country_html'] = EEH_Form_Fields::generate_form_input(new EE_Question_Form_Input(EE_Question::new_instance(array('QST_ID' => 0, 'QST_display_text' => __('Country', 'event_espresso'), 'QST_system' => 'admin-country')), EE_Answer::new_instance(array('ANS_ID' => 0, 'ANS_value' => $this->_cpt_model_obj->country_ID())), array('input_id' => 'CNT_ISO', 'input_name' => 'CNT_ISO', 'input_prefix' => '', 'append_qstn_id' => FALSE))); $template = REG_TEMPLATE_PATH . 'attendee_address_details_metabox_content.template.php'; EEH_Template::display_template($template, $this->_template_args); }
</tr> </thead> <tbody> <?php //printr( $states, '$states <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' ); if ($states) { foreach ($states as $STA_ID => $state) { ?> <tr id="state-<?php echo $STA_ID; ?> -tr" class="country-state-columns"> <?php foreach ($state['inputs'] as $ID => $input) { if ($ID != 'STA_ID' && $ID != 'CNT_ISO') { echo EEH_Form_Fields::generate_form_input($input); } } ?> <td class="delete-state-td"> <a id="delete-state-<?php echo $STA_ID; ?> -lnk" class="dashicons dashicons-post-trash ee-icon-size-20 delete-state-lnk" rel="<?php echo $STA_ID; ?> " title="Delete State #<?php echo $STA_ID; ?> ?" href="<?php echo $state['delete_state_url'];
protected function _category_details_content() { $editor_args['category_desc'] = array('type' => 'wp_editor', 'value' => EEH_Formatter::admin_format_content($this->_category->category_desc), 'class' => 'my_editor_custom', 'wpeditor_args' => array('media_buttons' => FALSE)); $_wp_editor = $this->_generate_admin_form_fields($editor_args, 'array'); $all_terms = get_terms(array('espresso_venue_categories'), array('hide_empty' => 0, 'exclude' => array($this->_category->id))); //setup category select for term parents. $category_select_values[] = array('text' => __('No Parent', 'event_espresso'), 'id' => 0); foreach ($all_terms as $term) { $category_select_values[] = array('text' => $term->name, 'id' => $term->term_id); } $category_select = EEH_Form_Fields::select_input('category_parent', $category_select_values, $this->_category->parent); $template_args = array('category' => $this->_category, 'category_select' => $category_select, 'unique_id_info_help_link' => $this->_get_help_tab_link('unique_id_info'), 'category_desc_editor' => $_wp_editor['category_desc']['field'], 'disable' => '', 'disabled_message' => FALSE); $template = EVENTS_TEMPLATE_PATH . 'event_category_details.template.php'; return EEH_Template::display_template($template, $template_args, TRUE); }
/** * display_add_new_state_micro_form * * @access public * @return string */ public static function display_add_new_state_micro_form($input_html, $question, $answer, $name, $id, $class, $system_ID) { // load JS add_action('wp_enqueue_scripts', array('EED_Add_New_State', 'wp_enqueue_scripts'), 10); $output = ''; // we're only doing this for state select inputs if ($system_ID == 'state') { // add hidden input to indicate that a new state is being added $output .= EEH_Form_Fields::hidden_input(str_replace('state', 'add_new_state', $name), 0, str_replace('state', 'add_new_state', $id)); $output .= '<a id="display-' . $id . '" class="ee-form-add-new-state-lnk display-the-hidden smaller-text hide-if-no-js" rel="' . $id . '">' . __('click here to add a new state/province', 'event_espresso') . '</a>'; $output .= '<div id="' . $id . '-dv" class="ee-form-add-new-state-dv" style="display: none;">'; $output .= '<h6>' . __('If your State/Province does not appear in the list above, you can easily add it by doing the following:', 'event_espresso') . '</h6>'; $output .= '<ul>'; $output .= sprintf(__('%1$sfirst select the Country that your State/Province belongs to%2$s%1$senter the name of your State/Province%2$s%1$senter a two to six letter abbreviation for the name of your State/Province%2$s%1$sclick the ADD button%2$s', 'event_espresso'), '<li>', '</li>'); $output .= '</ul>'; // NEW STATE COUNTRY $cntry_id = str_replace('state', 'new_state_country', $id); $cntry_input = str_replace('state', 'new_state_country', $name); $country = new EE_Question_Form_Input(EE_Question::new_instance(array('QST_display_text' => __('New State/Province Country', 'event_espresso'), 'QST_system' => 'admin-country', 'QST_type' => EEM_Question::QST_type_dropdown, 'QST_required' => FALSE)), EE_Answer::new_instance(array('ANS_value' => EE_Registry::instance()->REQ->is_set($cntry_input) ? EE_Registry::instance()->REQ->get($cntry_input) : '')), array('input_name' => $cntry_input, 'input_id' => $cntry_id, 'input_class' => $class, 'input_prefix' => '', 'append_qstn_id' => FALSE)); $output .= EEH_Form_Fields::generate_form_input($country); // NEW STATE NAME $state_id = str_replace('state', 'new_state_name', $id); $state_name = str_replace('state', 'new_state_name', $name); $new_state_name = new EE_Question_Form_Input(EE_Question::new_instance(array('QST_display_text' => __('New State/Province Name', 'event_espresso'), 'QST_system' => '', 'QST_type' => EEM_Question::QST_type_text, 'QST_required' => FALSE)), EE_Answer::new_instance(array('ANS_value' => EE_Registry::instance()->REQ->is_set($state_name) ? EE_Registry::instance()->REQ->get($state_name) : '')), array('input_name' => $state_name, 'input_id' => $state_id, 'input_class' => $class, 'input_prefix' => '', 'append_qstn_id' => FALSE)); $output .= EEH_Form_Fields::generate_form_input($new_state_name); // NEW STATE ABBREVIATION $abbrv_id = str_replace('state', 'new_state_abbrv', $id); $abbrv_name = str_replace('state', 'new_state_abbrv', $name); $new_state_abbrv = new EE_Question_Form_Input(EE_Question::new_instance(array('QST_display_text' => __('New State/Province Abbreviation', 'event_espresso'), 'QST_system' => '', 'QST_type' => EEM_Question::QST_type_text, 'QST_required' => FALSE)), EE_Answer::new_instance(array('ANS_value' => EE_Registry::instance()->REQ->is_set($abbrv_name) ? EE_Registry::instance()->REQ->get($abbrv_name) : '')), array('input_name' => $abbrv_name, 'input_id' => $abbrv_id, 'input_class' => $class, 'input_prefix' => '', 'append_qstn_id' => FALSE)); // add filters for reducing size of State Abbrv text input, and adding an "ADD" button, as well as a "cancel" button add_filter('FHEE__EEH_Form_Fields__additional_form_field_attributes', array('EED_Add_New_State', 'set_new_state_input_size')); add_filter('FHEE__EEH_Form_Fields__input_html', array('EED_Add_New_State', 'add_new_state_submit_button'), 1, 3); add_filter('FHEE__EEH_Form_Fields__input_html', array('EED_Add_New_State', 'cancel_new_state'), 2, 3); $output .= EEH_Form_Fields::generate_form_input($new_state_abbrv); // remove the filters from above so that they don't affect any other inputs remove_filter('FHEE__EEH_Form_Fields__additional_form_field_attributes', array('EED_Add_New_State', 'set_new_state_input_size')); remove_filter('FHEE__EEH_Form_Fields__input_html', array('EED_Add_New_State', 'add_new_state_submit_button'), 1, 3); remove_filter('FHEE__EEH_Form_Fields__input_html', array('EED_Add_New_State', 'cancel_new_state'), 2, 3); $output .= '</div>'; } return $input_html . $output; }
/** * Back-end widget form. * * @see WP_Widget::form() * @param array $instance Previously saved values from database. * @return string|void */ public function form($instance) { EE_Registry::instance()->load_class('Question_Option', array(), FALSE, FALSE, TRUE); // Set up some default widget settings. $defaults = array('title' => __('Upcoming Events', 'event_espresso'), 'category_name' => '', 'show_expired' => FALSE, 'show_desc' => TRUE, 'show_dates' => TRUE, 'show_everywhere' => FALSE, 'date_limit' => 2, 'limit' => 10, 'date_range' => FALSE, 'image_size' => 'medium'); $instance = wp_parse_args((array) $instance, $defaults); // don't add HTML labels for EE_Form_Fields generated inputs add_filter('FHEE__EEH_Form_Fields__label_html', '__return_empty_string'); $yes_no_values = array(EE_Question_Option::new_instance(array('QSO_value' => FALSE, 'QSO_desc' => __('No', 'event_espresso'))), EE_Question_Option::new_instance(array('QSO_value' => TRUE, 'QSO_desc' => __('Yes', 'event_espresso')))); ?> <!-- Widget Title: Text Input --> <p> <label for="<?php echo $this->get_field_id('title'); ?> "> <?php _e('Title:', 'event_espresso'); ?> </label> <input id="<?php echo $this->get_field_id('title'); ?> " class="widefat" name="<?php echo $this->get_field_name('title'); ?> " value="<?php echo esc_attr($instance['title']); ?> " type="text" /> </p> <p> <label for="<?php echo $this->get_field_id('category_name'); ?> "> <?php _e('Event Category:', 'event_espresso'); ?> </label> <?php $event_categories = array(); /** @type EEM_Term $EEM_Term */ $EEM_Term = EE_Registry::instance()->load_model('Term'); $categories = $EEM_Term->get_all_ee_categories(TRUE); if ($categories) { foreach ($categories as $category) { if ($category instanceof EE_Term) { $event_categories[] = EE_Question_Option::new_instance(array('QSO_value' => $category->get('slug'), 'QSO_desc' => $category->get('name'))); } } } array_unshift($event_categories, EE_Question_Option::new_instance(array('QSO_value' => '', 'QSO_desc' => __(' - display all - ', 'event_espresso')))); echo EEH_Form_Fields::select(__('Event Category:', 'event_espresso'), $instance['category_name'], $event_categories, $this->get_field_name('category_name'), $this->get_field_id('category_name')); ?> </p> <p> <label for="<?php echo $this->get_field_id('limit'); ?> "> <?php _e('Number of Events to Display:', 'event_espresso'); ?> </label> <input id="<?php echo $this->get_field_id('limit'); ?> " name="<?php echo $this->get_field_name('limit'); ?> " value="<?php echo $instance['limit']; ?> " size="3" type="text" /> </p> <p> <label for="<?php echo $this->get_field_id('show_expired'); ?> "> <?php _e('Show Expired Events:', 'event_espresso'); ?> </label> <?php echo EEH_Form_Fields::select(__('Show Expired Events:', 'event_espresso'), $instance['show_expired'], $yes_no_values, $this->get_field_name('show_expired'), $this->get_field_id('show_expired')); ?> </p> <p> <label for="<?php echo $this->get_field_id('image_size'); ?> "> <?php _e('Image Size:', 'event_espresso'); ?> </label> <?php $image_sizes = array(); $sizes = get_intermediate_image_sizes(); if ($sizes) { // loop thru images and create option objects out of them foreach ($sizes as $image_size) { $image_size = trim($image_size); // no big images plz if (!in_array($image_size, array('large', 'post-thumbnail'))) { $image_sizes[] = EE_Question_Option::new_instance(array('QSO_value' => $image_size, 'QSO_desc' => $image_size)); } } $image_sizes[] = EE_Question_Option::new_instance(array('QSO_value' => 'none', 'QSO_desc' => __('don\'t show images', 'event_espresso'))); } echo EEH_Form_Fields::select(__('Image Size:', 'event_espresso'), $instance['image_size'], $image_sizes, $this->get_field_name('image_size'), $this->get_field_id('image_size')); ?> </p> <p> <label for="<?php echo $this->get_field_id('show_desc'); ?> "> <?php _e('Show Description:', 'event_espresso'); ?> </label> <?php echo EEH_Form_Fields::select(__('Show Description:', 'event_espresso'), $instance['show_desc'], $yes_no_values, $this->get_field_name('show_desc'), $this->get_field_id('show_desc')); ?> </p> <p> <label for="<?php echo $this->get_field_id('show_dates'); ?> "> <?php _e('Show Dates:', 'event_espresso'); ?> </label> <?php echo EEH_Form_Fields::select(__('Show Dates:', 'event_espresso'), $instance['show_dates'], $yes_no_values, $this->get_field_name('show_dates'), $this->get_field_id('show_dates')); ?> </p> <p> <label for="<?php echo $this->get_field_id('show_everywhere'); ?> "> <?php _e('Show on all Pages:', 'event_espresso'); ?> </label> <?php echo EEH_Form_Fields::select(__('Show on all Pages:', 'event_espresso'), $instance['show_everywhere'], $yes_no_values, $this->get_field_name('show_everywhere'), $this->get_field_id('show_everywhere')); ?> </p> <p> <label for="<?php echo $this->get_field_id('date_limit'); ?> "> <?php _e('Number of Dates to Display:', 'event_espresso'); ?> </label> <input id="<?php echo $this->get_field_id('date_limit'); ?> " name="<?php echo $this->get_field_name('date_limit'); ?> " value="<?php echo esc_attr($instance['date_limit']); ?> " size="3" type="text" /> </p> <p> <label for="<?php echo $this->get_field_id('date_range'); ?> "> <?php _e('Show Date Range:', 'event_espresso'); ?> </label> <?php echo EEH_Form_Fields::select(__('Show Date Range:', 'event_espresso'), $instance['date_range'], $yes_no_values, $this->get_field_name('date_range'), $this->get_field_id('date_range')); ?> <span class="description"><br /><?php _e('This setting will replace the list of dates in the widget.', 'event_espresso'); ?> </span> </p> <?php }
/** * Back-end widget form. * * @see WP_Widget::form() * * @param array $instance Previously saved values from database. * @return string|void */ public function form($instance) { EE_Registry::instance()->load_helper('Form_Fields'); EE_Registry::instance()->load_class('Question_Option', array(), FALSE, FALSE, TRUE); // Set up some default widget settings. $defaults = array('title' => 'New_Addon'); $instance = wp_parse_args((array) $instance, $defaults); add_filter('FHEE__EEH_Form_Fields__label_html', '__return_empty_string'); $yes_no_values = array(EE_Question_Option::new_instance(array('QSO_value' => 0, 'QSO_desc' => __('No', 'event_espresso'))), EE_Question_Option::new_instance(array('QSO_value' => 1, 'QSO_desc' => __('Yes', 'event_espresso')))); ?> <p> <label for="<?php echo $this->get_field_id('title'); ?> "> <?php _e('Title:', 'event_espresso'); ?> </label> <input type="text" id="<?php echo $this->get_field_id('title'); ?> " name="<?php echo $this->get_field_name('title'); ?> " width="20" value="<?php echo $instance['title']; ?> " /> </p> <p> <label for="<?php echo $this->get_field_id('yes_or_no_question'); ?> "> <?php _e('Yes or No?', 'event_espresso'); ?> </label> <?php echo EEH_Form_Fields::select(__('Yes or No?', 'event_espresso'), $instance['yes_or_no_question'], $yes_no_values, $this->get_field_name('yes_or_no_question'), $this->get_field_id('yes_or_no_question')); ?> </p> <?php }
/** * sets up the filters for the promotions scope selector * * @since 1.0.0 * @return string */ protected function _get_applies_to_filters() { EE_Registry::instance()->load_helper('Form_Fields'); //categories $categories = get_terms('espresso_event_categories', array('hide_empty' => FALSE, 'fields' => 'id=>name')); $cat_values[] = array('text' => __('Include all categories', 'event_espresso'), 'id' => 0); $default = !empty($_REQUEST['EVT_CAT_ID']) ? absint($_REQUEST['EVT_CAT_ID']) : ''; foreach ($categories as $id => $name) { $cat_values[] = array('text' => $name, 'id' => $id); } $cat_filter = '<label for="EVT_CAT_ID" class="ee-promotions-filter-lbl">' . __('event categories', 'event_espresso') . '</label>'; $cat_filter .= EEH_Form_Fields::select_input('EVT_CAT_ID', $cat_values, $default); //start date $existing_start_date = !empty($_REQUEST['EVT_start_date_filter']) ? date('Y-m-d h:i a', strtotime($_REQUEST['EVT_start_date_filter'])) : ''; $start_date_filter = '<label for="EVT_start_date_filter" class="ee-promotions-filter-lbl">' . __('start date', 'event_espresso') . '</label>'; $start_date_filter .= '<input data-context="start" data-container="scope" data-next-field="#EVT_end_date_filter" type="text" id="EVT_start_date_filter" name="EVT_start_date_filter" class="promotions-date-filter ee-text-inp ee-datepicker" value="' . $existing_start_date . '"><span class="dashicons dashicons-calendar"></span><span class="dashicons dashicons-editor-removeformatting ee-clear-field" data-clearField="#EVT_start_date_filter"></span>'; //end date $existing_end_date = !empty($_REQUEST['EVT_end_date_filter']) ? date('Y-m-d h:i a', strtotime($_REQUEST['EVT_end_date_filter'])) : ''; $end_date_filter = '<label for="EVT_end_date_filter" class="ee-promotions-filter-lbl">' . __('end date', 'event_espresso') . '</label>'; $end_date_filter .= '<input data-context="end" data-container="scope" data-next-field="#EVT_title_filter" type="text" id="EVT_end_date_filter" name="EVT_end_date_filter" class="promotions-date-filter ee-text-inp ee-datepicker" value="' . $existing_end_date . '"><span class="dashicons dashicons-calendar"></span><span class="dashicons dashicons-editor-removeformatting ee-clear-field" data-clearField="#EVT_end_date_filter"></span>'; //event name $existing_name = !empty($_REQUEST['EVT_title_filter']) ? sanitize_title_for_query($_REQUEST['EVT_title_filter']) : ''; $event_title_filter = '<label for="EVT_title_filter" class="ee-promotions-filter-lbl">' . __('event title', 'event_espresso') . '</label>'; $event_title_filter .= '<input type="text" id="EVT_title_filter" name="EVT_title_filter" class="promotions-general-filter ee-text-inp" value="' . $existing_name . '" placeholder="' . __('Event Title Filter', 'event_espresso') . '">'; //include expired events $expired_checked = isset($_REQUEST['include_expired_events_filter']) ? " checked=checked" : ''; $include_expired_filter = '<div class="jst-rght"><label for="include-expired-events-filter" class="ee-promotions-filter-lbl single-line-filter-label">' . __('Include expired events?', 'event_espresso'); $include_expired_filter .= ' <input type="checkbox" id="include-expired-events-filter" name="include_expired_events_filter" class="promotions-general-filter ee-checkbox-inp" value="1"' . $expired_checked . '></label></div>'; return $cat_filter . '<br>' . $start_date_filter . '<br>' . $end_date_filter . '<br>' . $event_title_filter . '<br>' . $include_expired_filter . '<div style="clear: both"></div>'; }
/** * _get_reg_status_selection * * @todo this will need to be adjusted either once MER comes along OR we move default reg status to tickets instead of events. * @access protected * @return void */ protected function _get_reg_status_selection() { //first get all possible statuses $statuses = EEM_Registration::reg_status_array(array(), TRUE); //let's add a "don't change" option. $status_array['NAN'] = __('Leave the Same', 'event_espresso'); $status_array = array_merge($status_array, $statuses); $this->_template_args['status_change_select'] = EEH_Form_Fields::select_input('txn_reg_status_change[reg_status]', $status_array, 'NAN', 'id="txn-admin-payment-reg-status-inp"', 'txn-reg-status-change-reg-status'); $this->_template_args['delete_status_change_select'] = EEH_Form_Fields::select_input('delete_txn_reg_status_change[reg_status]', $status_array, 'NAN', 'delete-txn-admin-payment-reg-status-inp', 'delete-txn-reg-status-change-reg-status'); }