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;
 }
 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;
 }
echo $fields['QST_required']->get_nicename();
?>
</label> <?php 
echo EEH_Template::get_help_tab_link('required_question_info');
?>
				</th>
				<td>
					<?php 
$system_required = array('fname', 'email');
$disabled = in_array($QST_system, $system_required) ? ' disabled="disabled"' : '';
$required_on = $question->get('QST_admin_only');
$show_required_msg = $required_on ? '' : ' display:none;';
$disabled = $required_on || !empty($disabled) ? ' disabled="disabled"' : '';
$id = !empty($disabled) && in_array($QST_system, $system_required) ? '_disabled' : '';
$requiredOptions = array(array('text' => 'Optional', 'id' => 0), array('text' => 'Required', 'id' => 1));
echo EEH_Form_Fields::select_input('QST_required' . $id, $requiredOptions, $question->required(), 'id="QST_required' . $id . '"' . $disabled);
?>
						<p><span id="required_toggled_on" class="description" style="color:#D54E21;<?php 
echo $show_required_msg;
?>
">
						<?php 
_e('Required is set to optional, and this field is disabled, because the question is Admin-Only.', 'event_espresso');
?>
						</span></p>
						<p><span id="required_toggled_off" class="description" style="color:#D54E21; display: none;">
							<?php 
_e('Required option field is no longer disabled because the question is not Admin-Only', 'event_espresso');
?>
						</span></p>
					<?php 
 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);
 }
 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);
 }
	<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>
 /**
  * _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');
 }
 /**
  * @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_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;
 }
    protected function _display_settings()
    {
        ?>
		<tr>
			<th>
				<label><strong style="color:#F00"><?php 
        _e('Please Note', 'event_espresso');
        ?>
</strong></label>
			</th>
			<td>
				<?php 
        _e('You will need a PayPal Premier or Business account for the PayPal IPN to work correctly.', 'event_espresso');
        ?>
			</td>
		</tr>

		<tr>
			<th><label for="paypal_id">
					<?php 
        _e('PayPal Email', 'event_espresso');
        ?>
				</label></th>
			<td><input class="regular-text" type="text" name="paypal_id" size="35" id="paypal_id" value="<?php 
        echo $this->_payment_settings['paypal_id'];
        ?>
">
				<br />
				<span class="description">
					<?php 
        _e('Typically payment@yourdomain.com', 'event_espresso');
        ?>
				</span></td>
		</tr>

		<tr>
			<th><label for="currency_format">
					<?php 
        _e('Country Currency', 'event_espresso');
        ?>
					<?php 
        echo EEH_Template::get_help_tab_link('payment_methods_overview_paypalstandard_help_tab');
        ?>
				</label></th>
			<td><select name="currency_format" data-placeholder="Choose a currency...">
				<?php 
        $currency = $this->_payment_settings['currency_format'];
        ?>
					<option value="USD" <?php 
        echo $currency == "USD" ? 'selected="selected"' : '';
        ?>
>
						<?php 
        _e('U.S. Dollars ($)', 'event_espresso');
        ?>
					</option>
					<option value="GBP" <?php 
        echo $currency == "GBP" ? 'selected="selected"' : '';
        ?>
>
						<?php 
        _e('Pounds Sterling (&pound;)', 'event_espresso');
        ?>
					</option>
					<option value="CAD" <?php 
        echo $currency == "CAD" ? 'selected="selected"' : '';
        ?>
>
						<?php 
        _e('Canadian Dollars (C $)', 'event_espresso');
        ?>
					</option>
					<option value="AUD" <?php 
        echo $currency == "AUD" ? 'selected="selected"' : '';
        ?>
>
						<?php 
        _e('Australian Dollars (A $)', 'event_espresso');
        ?>
					</option>
					<option value="BRL" <?php 
        echo $currency == "BRL" ? 'selected="selected"' : '';
        ?>
>
						<?php 
        _e('Brazilian Real (only for Brazilian users)', 'event_espresso');
        ?>
					</option>
					<option value="CHF" <?php 
        echo $currency == "CHF" ? 'selected="selected"' : '';
        ?>
>
						<?php 
        _e('Swiss Franc', 'event_espresso');
        ?>
					</option>
					<option value="CZK" <?php 
        echo $currency == "CZK" ? 'selected="selected"' : '';
        ?>
>
						<?php 
        _e('Czech Koruna', 'event_espresso');
        ?>
					</option>
					<option value="DKK" <?php 
        echo $currency == "DKK" ? 'selected="selected"' : '';
        ?>
>
						<?php 
        _e('Danish Krone', 'event_espresso');
        ?>
					</option>
					<option value="EUR" <?php 
        echo $currency == "EUR" ? 'selected="selected"' : '';
        ?>
>
						<?php 
        _e('Euros (&#8364;)', 'event_espresso');
        ?>
					</option>
					<option value="HKD" <?php 
        echo $currency == "HKD" ? 'selected="selected"' : '';
        ?>
>
						<?php 
        _e('Hong Kong Dollar ($)', 'event_espresso');
        ?>
					</option>
					<option value="HUF" <?php 
        echo $currency == "HUF" ? 'selected="selected"' : '';
        ?>
>
						<?php 
        _e('Hungarian Forint', 'event_espresso');
        ?>
					</option>
					<option value="ILS" <?php 
        echo $currency == "ILS" ? 'selected="selected"' : '';
        ?>
>
						<?php 
        _e('Israeli Shekel', 'event_espresso');
        ?>
					</option>
					<option value="JPY" <?php 
        echo $currency == "JPY" ? 'selected="selected"' : '';
        ?>
>
						<?php 
        _e('Yen (&yen;)', 'event_espresso');
        ?>
					</option>
					<option value="MXN" <?php 
        echo $currency == "MXN" ? 'selected="selected"' : '';
        ?>
>
						<?php 
        _e('Mexican Peso', 'event_espresso');
        ?>
					</option>
					<option value="MYR" <?php 
        echo $currency == "MYR" ? 'selected="selected"' : '';
        ?>
>
						<?php 
        _e('Malaysian Ringgits (only for Malaysian users)', 'event_espresso');
        ?>
					</option>
					<option value="NOK" <?php 
        echo $currency == "NOK" ? 'selected="selected"' : '';
        ?>
>
						<?php 
        _e('Norwegian Krone', 'event_espresso');
        ?>
					</option>
					<option value="NZD" <?php 
        echo $currency == "NZD" ? 'selected="selected"' : '';
        ?>
>
						<?php 
        _e('New Zealand Dollar ($)', 'event_espresso');
        ?>
					</option>
					<option value="PHP" <?php 
        echo $currency == "PHP" ? 'selected="selected"' : '';
        ?>
>
						<?php 
        _e('Philippine Pesos', 'event_espresso');
        ?>
					</option>
					<option value="PLN" <?php 
        echo $currency == "PLN" ? 'selected="selected"' : '';
        ?>
>
						<?php 
        _e('Polish Zloty', 'event_espresso');
        ?>
					</option>
					<option value="SEK" <?php 
        echo $currency == "SEK" ? 'selected="selected"' : '';
        ?>
>
						<?php 
        _e('Swedish Krona', 'event_espresso');
        ?>
					</option>
					<option value="SGD" <?php 
        echo $currency == "SGD" ? 'selected="selected"' : '';
        ?>
>
						<?php 
        _e('Singapore Dollar ($)', 'event_espresso');
        ?>
					</option>
					<option value="THB" <?php 
        echo $currency == "THB" ? 'selected="selected"' : '';
        ?>
>
						<?php 
        _e('Thai Baht', 'event_espresso');
        ?>
					</option>
					<option value="TRY" <?php 
        echo $currency == "TRY" ? 'selected="selected"' : '';
        ?>
>
						<?php 
        _e('Turkish Lira (only for Turkish users)', 'event_espresso');
        ?>
					</option>
					<option value="TWD" <?php 
        echo $currency == "TWD" ? 'selected="selected"' : '';
        ?>
>
						<?php 
        _e('Taiwan New Dollars', 'event_espresso');
        ?>
					</option>
				</select></td>
		</tr>

		<tr>
			<th>
				<label for="pp_image_url">
					<?php 
        _e('Image URL', 'event_espresso');
        ?>
					<?php 
        echo EEH_Template::get_help_tab_link('payment_methods_overview_paypalstandard_help_tab');
        ?>
				</label>
			</th>
			<td>
				<span class='ee_media_uploader_area'>
					<img class="ee_media_image" src="<?php 
        echo $this->_payment_settings['image_url'];
        ?>
" />
					<input class="ee_media_url" type="text" name="image_url" size='34' value="<?php 
        echo $this->_payment_settings['image_url'];
        ?>
">
					<a href="#" class="ee_media_upload"><img src="images/media-button-image.gif" alt="Add an Image"></a>
				</span><br/>
				<span class="description">
					<?php 
        _e('Used for your business/personal logo on the PayPal page', 'event_espresso');
        ?>
				</span>
			</td>
		</tr>

		<tr>
			<th><label for="use_sandbox">
					<?php 
        _e('Use the Debugging Feature and the PayPal Sandbox', 'event_espresso');
        ?>
					<?php 
        echo EEH_Template::get_help_tab_link('payment_methods_overview_paypalstandard_help_tab');
        ?>
				</label></th>
			<td><?php 
        echo EEH_Form_Fields::select_input('use_sandbox', $this->_yes_no_options, $this->_payment_settings['use_sandbox']);
        ?>
</td>
		</tr>

		<tr>
			<th>
				<label for="no_shipping">
					<?php 
        _e('Shipping Address Options', 'event_espresso');
        ?>
					<?php 
        echo EEH_Template::get_help_tab_link('payment_methods_overview_paypalstandard_help_tab');
        ?>
				</label>
			</th>
			<td>
			<?php 
        $shipping_values = array(array('id' => '1', 'text' => __('Do not prompt for an address', 'event_espresso')), array('id' => '0', 'text' => __('Prompt for an address, but do not require one', 'event_espresso')), array('id' => '2', 'text' => __('Prompt for an address, and require one', 'event_espresso')));
        echo EEH_Form_Fields::select_input('no_shipping', $shipping_values, $this->_payment_settings['no_shipping']);
        ?>
			</td>
		</tr>
		<?php 
    }
Пример #11
0
    protected function _display_settings()
    {
        require_once 'lib/invoice_functions.php';
        $themes = espresso_invoice_template_files($this->_path);
        //		$this->_payment_settings['pdf_title'] = isset( $this->_payment_settings['pdf_title'] ) ? $this->_payment_settings['pdf_title'] : '';
        //		$this->_payment_settings['pdf_instructions'] = isset( $this->_payment_settings['pdf_instructions'] ) ? $this->_payment_settings['pdf_instructions'] : '';
        //		$this->_payment_settings['page_instructions'] = isset( $this->_payment_settings['page_instructions'] ) ? $this->_payment_settings['page_instructions'] : '';
        //		$this->_payment_settings['payable_to'] = isset( $this->_payment_settings['payable_to'] ) ? $this->_payment_settings['payable_to'] : '';
        //		$this->_payment_settings['payment_address'] = isset( $this->_payment_settings['payment_address'] ) ? $this->_payment_settings['payment_address'] : '';
        //		$this->_payment_settings['invoice_logo_url'] = isset( $this->_payment_settings['invoice_logo_url'] ) ? $this->_payment_settings['invoice_logo_url'] : '';
        //		$this->_payment_settings['show'] = isset( $this->_payment_settings['show'] ) ? $this->_payment_settings['show'] : '';
        //		$this->_payment_settings['invoice_css'] = isset( $this->_payment_settings['invoice_css'] ) ? $this->_payment_settings['invoice_css'] : '';
        //		$this->_payment_settings['button_url'] = isset( $this->_payment_settings['button_url'] ) ? $this->_payment_settings['button_url'] : '';
        ?>
				<tr>
					<th><h4 style="margin:.75em 0 1em;"><?php 
        _e('Invoice Display Settings', 'event_espresso');
        ?>
</h4></th>
					<td>
						<span class="description"><?php 
        _e('The following settings affect the content and/or appearance of the downloadable PDF invoice.', 'event_espresso');
        ?>
</span>
					</td>
				</tr>

				<tr>
					<th>
						<label for="base-invoice-select"><?php 
        _e('Select Stylesheet', 'event_espresso');
        ?>
</label>
					</th>
					<td>
						<select id="base-invoice-select" name="invoice_css">
						<?php 
        $this->_payment_settings['invoice_css'] = !empty($this->_payment_settings['invoice_css']) ? $this->_payment_settings['invoice_css'] : 'simple.css';
        foreach ($themes as $theme) {
            $selected = $theme == $this->_payment_settings['invoice_css'] ? 'selected="selected"' : '';
            ?>
							<option value="<?php 
            echo $theme;
            ?>
" <?php 
            echo $selected;
            ?>
><?php 
            echo $theme;
            ?>
</option>
						<?php 
        }
        ?>
						</select>
						<span class="description"><?php 
        _e('Load a custom/pre-made style sheet <br />to change the look of your invoices.', 'event_espresso');
        ?>
</span>
					</td>
				</tr>

				<tr>
					<th>
						<label for="pdf_instructions"><?php 
        _e('Instructions', 'event_espresso');
        ?>
</label>
					</th>
					<td>
						<textarea name="pdf_instructions" cols="50" rows="5"><?php 
        echo stripslashes_deep($this->_payment_settings['pdf_instructions']);
        ?>
</textarea>
					</td>
				</tr>

				<tr>
					<th>
						<label for="invoice_logo_url"><?php 
        _e('Logo Image', 'event_espresso');
        ?>
</label>
					</th>
					<td>
						<p id="invoice-logo-image">
							<span class='ee_media_uploader_area'>
								<img class="ee_media_image" src="<?php 
        echo $this->_payment_settings['invoice_logo_url'];
        ?>
" />
								<input class="ee_media_url" type="text" name="invoice_logo_url" size='34' value="<?php 
        echo $this->_payment_settings['invoice_logo_url'];
        ?>
">
								<a href="#" class="ee_media_upload"><img src="images/media-button-image.gif" alt="Add an Image"></a>
							</span><br/>

							<span class="description"><?php 
        _e('(Logo for the top left of the invoice)', 'event_espresso');
        ?>
</span>
						</p>
					</td>
				</tr>

				<tr>
					<th><h4 style="margin:.75em 0 1em;"><?php 
        _e('Invoice Gateway Settings', 'event_espresso');
        ?>
</h4></th>
					<td>
						<span class="description"><?php 
        _e('The following settings affect the functioning of the Invoice gateway.', 'event_espresso');
        ?>
</span>
					</td>
				</tr>

			<tr>
					<th>
						<label for="show"><?php 
        _e('Show as an option on the payment page?', 'event_espresso');
        ?>
</label>
					</th>
					<td>
						<?php 
        echo EEH_Form_Fields::select_input('show', $this->_yes_no_options, $this->_payment_settings['show']);
        ?>
<br />
						<span class="description"><?php 
        _e('Will display invoices as a payment option <br />	on your payment page. (Default: Yes)', 'event_espresso');
        ?>
</span>
					</td>
				</tr>

				<tr>
					<th>
						<label for="pdf_title"><?php 
        _e('Invoice Title', 'event_espresso');
        ?>
</label>
					</th>
					<td>
						<input class="regular-text" type="text" name="pdf_title" id="pdf_title" size="30" value="<?php 
        echo stripslashes_deep($this->_payment_settings['pdf_title']);
        ?>
" />
					</td>
				</tr>

				<tr>
					<th>
						<label for="page_instructions"><?php 
        _e('Invoice Instructions', 'event_espresso');
        ?>
</label>
					</th>
					<td>
						<textarea name="page_instructions" cols="50" rows="5"><?php 
        echo trim(stripslashes_deep($this->_payment_settings['page_instructions']));
        ?>
</textarea>
					</td>
				</tr>

				<tr>
					<th>
						<label for="payable_to"><?php 
        _e('Payable To', 'event_espresso');
        ?>
</label>
					</th>
					<td>
						<input class="regular-text" type="text" name="payable_to" id="payable_to" size="30" value="<?php 
        echo trim(stripslashes_deep($this->_payment_settings['payable_to']));
        ?>
" />
					</td>
				</tr>

				<tr>
					<th>
						<label for="payment_address"><?php 
        _e('Address to Send Payment', 'event_espresso');
        ?>
</label>
					</th>
					<td>
						<textarea name="payment_address" cols="50" rows="5"><?php 
        echo trim($this->_payment_settings['payment_address']);
        ?>
</textarea>
					</td>
				</tr>
		<?php 
    }
 public function newsletter_send_form_skeleton()
 {
     $list_table = $this->_list_table_object;
     $codes = array();
     //need to templates for the newsletter message type for the template selector.
     $values[] = array('text' => __('Select Template to Use', 'event_espresso'), 'id' => 0);
     $mtps = EEM_Message_Template_Group::instance()->get_all(array(array('MTP_message_type' => 'newsletter', 'MTP_messenger' => 'email')));
     foreach ($mtps as $mtp) {
         $name = $mtp->name();
         $values[] = array('text' => empty($name) ? __('Global', 'event_espresso') : $name, 'id' => $mtp->ID());
     }
     //need to get a list of shortcodes that are available for the newsletter message type.
     $shortcodes = EEH_MSG_Template::get_shortcodes('newsletter', 'email', array(), 'attendee', FALSE);
     foreach ($shortcodes as $field => $shortcode_array) {
         $codes[$field] = implode(', ', array_keys($shortcode_array));
     }
     $shortcodes = $codes;
     $form_template = REG_CAF_TEMPLATE_PATH . 'newsletter-send-form.template.php';
     $form_template_args = array('form_action' => admin_url('admin.php?page=espresso_registrations'), 'form_route' => 'newsletter_selected_send', 'form_nonce_name' => 'newsletter_selected_send_nonce', 'form_nonce' => wp_create_nonce('newsletter_selected_send_nonce'), 'redirect_back_to' => $this->_req_action, 'ajax_nonce' => wp_create_nonce('get_newsletter_form_content_nonce'), 'template_selector' => EEH_Form_Fields::select_input('newsletter_mtp_selected', $values), 'shortcodes' => $shortcodes, 'id_type' => $list_table instanceof EE_Attendee_Contact_List_Table ? 'contact' : 'registration');
     EEH_Template::display_template($form_template, $form_template_args);
 }
echo EEH_Form_Fields::select_input('event_list_display_nav', $values, $map_settings->event_list_display_nav, 'id="event_list_display_nav"');
?>
				</td>
			</tr>

			<tr>
				<th>
					<label for="event_list_nav_size">
						<?php 
_e('Keep Map Navigation Small', 'event_espresso');
?>
					</label>
				</th>
				<td>
					<?php 
echo EEH_Form_Fields::select_input('event_list_nav_size', $values, $map_settings->event_list_nav_size, 'id="event_list_nav_size"');
?>
				</td>
			</tr>

			<tr>
				<th>
					<?php 
_e('Set Map Type Control', 'event_espresso');
?>
				</th>
				<td>
					<label for="event_list_control_type-default" class="ee-admin-radio-lbl">
						<?php 
$checked = $map_settings->event_list_control_type == 'default' ? 'checked="checked"' : '';
?>
    /**
     * _get_table_filters
     * @return array
     */
    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');
        $payment_methods = EEM_Payment_Method::instance()->get_all();
        $payment_method_names = array(array('id' => 'all', 'text' => __("All", 'event_espresso')), array('id' => '0', 'text' => __("Unknown Payment Method", 'event_espresso')));
        foreach ($payment_methods as $payment_method) {
            $payment_method_names[] = array('id' => $payment_method->ID(), 'text' => $payment_method->admin_name());
        }
        $filters[] = EEH_Form_Fields::select_input('_payment_method', $payment_method_names, isset($this->_req_data['_payment_method']) ? $this->_req_data['_payment_method'] : 'all');
        $start_date = isset($this->_req_data['payment-filter-start-date']) ? wp_strip_all_tags($this->_req_data['payment-filter-start-date']) : date('m/d/Y', strtotime('-6 months'));
        $end_date = isset($this->_req_data['payment-filter-end-date']) ? wp_strip_all_tags($this->_req_data['payment-filter-end-date']) : date('m/d/Y');
        ob_start();
        ?>
		<label for="txn-filter-start-date"><?php 
        _e('Display Transactions from ', 'event_espresso');
        ?>
</label>
		<input id="payment-filter-start-date" class="datepicker" type="text" value="<?php 
        echo $start_date;
        ?>
" name="payment-filter-start-date" size="15"/>
		<label for="txn-filter-end-date"><?php 
        _e(' until ', 'event_espresso');
        ?>
</label>
		<input id="payment-filter-end-date" class="datepicker" type="text" value="<?php 
        echo $end_date;
        ?>
" name="payment-filter-end-date" size="15"/>
		<?php 
        $filters[] = ob_get_clean();
        return $filters;
    }
 /**
  * returns a list of "active" statuses on the event
  * @param  string $current_value whatever the ucrrent active status is
  * @return string                html dropdown.
  */
 public function active_status_dropdown($current_value = '')
 {
     $select_name = 'active_status';
     $values = array('none' => __('Show Active/Inactive', 'event_espresso'), 'active' => __('Active', 'event_espresso'), 'upcoming' => __('Upcoming', 'event_espresso'), 'expired' => __('Expired', 'event_espresso'), 'inactive' => __('Inactive', 'event_espresso'));
     $id = 'id="espresso-active-status-dropdown-filter"';
     $class = 'wide';
     echo EEH_Form_Fields::select_input($select_name, $values, $current_value, $id, $class);
 }
 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);
 }
echo EEH_Form_Fields::select_input('display_status_banner_single', $values, $display_status_banner_single, 'id="display_status_banner_single"');
?>
					<p class="description"><?php 
_e('Selecting "Yes" will inject an Event Status banner with the title whenever Events are displaying on the single event page.', 'event_espresso');
?>
</p>
				</td>
			</tr>

			<tr>
				<th>
					<label for="display_venue">
						<?php 
_e('Display Venue Details', 'event_espresso');
echo EEH_Template::get_help_tab_link('display_addresses_in_reg_form_info');
?>
					</label>
				</th>
				<td>
					<?php 
echo EEH_Form_Fields::select_input('display_venue', $values, $display_venue, 'id="display_venue"');
?>
					<p class="description"><?php 
_e('Do not use this if you are using the venue shortcodes in your event description.', 'event_espresso');
?>
</p>
				</td>
			</tr>

		</tbody>
	</table>
 /**
  * metabox content for all template pack and variation selection.
  *
  * @since 4.5.0
  *
  * @return string
  */
 public function template_pack_meta_box()
 {
     $this->_set_message_template_group();
     //setup template pack select values.
     $template_packs = EED_Messages::get_template_packs();
     $tp_select_values = array();
     foreach ($template_packs as $tp) {
         //only include template packs that support this messenger and message type!
         $supports = $tp->get_supports();
         if (!isset($supports[$this->_message_template_group->messenger()]) || !in_array($this->_message_template_group->message_type(), $supports[$this->_message_template_group->messenger()])) {
             //not supported
             continue;
         }
         $tp_select_values[] = array('text' => $tp->label, 'id' => $tp->dbref);
     }
     //if empty $tp_select_values then we make sure default is set because EVERY message type should be supported by the default template pack.  This still allows for the odd template pack to override.
     if (empty($tp_select_values)) {
         $tp_select_values[] = array('text' => __('Default', 'event_espresso'), 'id' => 'default');
     }
     //setup variation select values for the currently selected template.
     $variations = $this->_message_template_group->get_template_pack()->get_variations($this->_message_template_group->messenger(), $this->_message_template_group->message_type());
     $variations_select_values = array();
     foreach ($variations as $variation => $label) {
         $variations_select_values[] = array('text' => $label, 'id' => $variation);
     }
     $template_pack_labels = $this->_message_template_group->messenger_obj()->get_supports_labels();
     $template_args['template_packs_selector'] = EEH_Form_Fields::select_input('MTP_template_pack', $tp_select_values, $this->_message_template_group->get_template_pack_name());
     $template_args['variations_selector'] = EEH_Form_Fields::select_input('MTP_template_variation', $variations_select_values, $this->_message_template_group->get_template_pack_variation());
     $template_args['template_pack_label'] = $template_pack_labels->template_pack;
     $template_args['template_variation_label'] = $template_pack_labels->template_variation;
     $template_args['template_pack_description'] = $template_pack_labels->template_pack_description;
     $template_args['template_variation_description'] = $template_pack_labels->template_variation_description;
     $template = EE_MSG_TEMPLATE_PATH . 'template_pack_and_variations_metabox.template.php';
     EEH_Template::display_template($template, $template_args);
 }
 /**
  * _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;
 }
			</td>
		</tr>

		<tr>
			<th>
				<?php 
_e('Enable Remote Logging', 'event_espresso');
?>
				<?php 
echo EEH_Template::get_help_tab_link('remote_logging_info');
?>
			</th>
			<td>
				<?php 
echo EEH_Form_Fields::select_input('use_remote_logging', $values, $use_remote_logging);
?>
				<p class="description">
					<?php 
_e('Send debugging data to the remote URL below.', 'event_espresso');
?>
				</p>
			</td>
		</tr>

		<tr>
			<th>
				<?php 
_e('Remote Logging URL', 'event_espresso');
?>
				<?php 
 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);
 }
 /**
  * 		_edit_price_type_details
  *		@access protected
  *		@return void
  */
 protected function _edit_price_type_details()
 {
     do_action('AHEE_log', __FILE__, __FUNCTION__, '');
     // grab price type ID
     $PRT_ID = isset($this->_req_data['id']) && !empty($this->_req_data['id']) ? absint($this->_req_data['id']) : FALSE;
     // change page title based on request action
     $this->_admin_page_title = ucwords(str_replace('_', ' ', $this->_req_action));
     // add PRT_ID to title if editing
     $this->_admin_page_title = $PRT_ID ? $this->_admin_page_title . ' # ' . $PRT_ID : $this->_admin_page_title;
     //		require_once(EE_MODELS . 'EEM_Price_Type.model.php');
     if ($PRT_ID) {
         $price_type = EEM_Price_Type::instance()->get_one_by_ID($PRT_ID);
         $additional_hidden_fields = array('PRT_ID' => array('type' => 'hidden', 'value' => $PRT_ID));
         $this->_set_add_edit_form_tags('update_price_type', $additional_hidden_fields);
     } else {
         $price_type = EEM_Price_Type::instance()->get_new_price_type();
         $this->_set_add_edit_form_tags('insert_price_type');
     }
     $this->_template_args['PRT_ID'] = $PRT_ID;
     $this->_template_args['price_type'] = $price_type;
     $base_types = EEM_Price_Type::instance()->get_base_types();
     $select_values = array();
     foreach ($base_types as $ref => $text) {
         if ($ref == EEM_Price_Type::base_type_base_price) {
             //do not allow creation of base_type_base_prices because that's a system only base type.
             continue;
         }
         $values[] = array('id' => $ref, 'text' => $text);
     }
     $this->_template_args['base_type_select'] = EEH_Form_Fields::select_input('base_type', $values, $price_type->base_type(), 'id="price-type-base-type-slct"');
     $this->_template_args['learn_more_about_pricing_link'] = $this->_learn_more_about_pricing_link();
     $redirect_URL = add_query_arg(array('action' => 'price_types'), $this->_admin_base_url);
     $this->_set_publish_post_box_vars('id', $PRT_ID, FALSE, $redirect_URL);
     // the details template wrapper
     $this->display_admin_page_with_sidebar();
 }
_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>
    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 
			<?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;
<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>
 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);
 }
 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);
 }
 /**
  * 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>';
 }
			<tr>
				<th>
					<label>
						<?php 
_e(' Show Description', 'event_espresso');
?>
 <?php 
echo EEH_Template::get_help_tab_link('show_group_description_info');
?>
					</label>
				</th>
				<td>
                    <label for="QSG_show_group_order">
                        <?php 
echo EEH_Form_Fields::select_input('QSG_show_group_desc', $values, $question_group->show_group_desc());
?>
                        <p class="description"><?php 
_e(' Show Group Description on Registration Page?', 'event_espresso');
?>
</p>
					</label>
                    <input type="hidden" name="QSG_system" value="<?php 
echo $question_group->system_group();
?>
">
                </td>
			</tr>

		</tbody>
	</table>