当前位置: 首页>>代码示例>>PHP>>正文


PHP EEH_Form_Fields类代码示例

本文整理汇总了PHP中EEH_Form_Fields的典型用法代码示例。如果您正苦于以下问题:PHP EEH_Form_Fields类的具体用法?PHP EEH_Form_Fields怎么用?PHP EEH_Form_Fields使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了EEH_Form_Fields类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _get_table_filters

 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;
 }
开发者ID:robert-osborne,项目名称:event-espresso-core-1,代码行数:35,代码来源:EE_Event_Registrations_List_Table.class.php

示例2: add_to_featured_image_meta_box

 /**
  * 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;
 }
开发者ID:aaronfrey,项目名称:PepperLillie-GSP,代码行数:12,代码来源:EE_Calendar.class.php

示例3: _get_table_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;
 }
开发者ID:antares-ff,项目名称:ANTARES-Test,代码行数:19,代码来源:EE_Registrations_List_Table.class.php

示例4: _term_object_details_content

 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);
 }
开发者ID:adrianjonmiller,项目名称:hearts-being-healed,代码行数:15,代码来源:People_Admin_Page.core.php

示例5: _e

?>
 <?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>
开发者ID:kaffiemetsuker,项目名称:event-espresso-core,代码行数:30,代码来源:admin-event-list-settings.template.php

示例6: _e

<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>
开发者ID:DavidSteinbauer,项目名称:event-espresso-core,代码行数:30,代码来源:countries_settings.template.php

示例7: form

    /**
     * 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 
    }
开发者ID:aaronfrey,项目名称:PepperLillie-GSP,代码行数:80,代码来源:EEW_Espresso_Calendar.widget.php

示例8: next_decade_two_digit_year_dropdown_options

 /**
  * 	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);
 }
开发者ID:adrianjonmiller,项目名称:hearts-being-healed,代码行数:15,代码来源:EEH_Form_Fields.helper.php

示例9: _e

	<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>
开发者ID:antares-ff,项目名称:ANTARES-Test,代码行数:30,代码来源:your_organization_settings.template.php

示例10: _get_table_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;
 }
开发者ID:DavidSteinbauer,项目名称:event-espresso-core,代码行数:41,代码来源:Messages_Template_List_Table.class.php

示例11: _generate_admin_form_fields

 /**
  * 	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;
 }
开发者ID:robert-osborne,项目名称:event-espresso-core-1,代码行数:16,代码来源:EE_Admin_Page.core.php

示例12: venue_metabox

 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);
 }
开发者ID:DavidSteinbauer,项目名称:event-espresso-core,代码行数:40,代码来源:espresso_events_Venues_Hooks.class.php

示例13: use_venue_and_staff_manager_settings

 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);
 }
开发者ID:DavidSteinbauer,项目名称:event-espresso-core,代码行数:6,代码来源:Extend_General_Settings_Admin_Page.core.php

示例14: _e

<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>
开发者ID:aaronfrey,项目名称:PepperLillie-GSP,代码行数:27,代码来源:payment_settings.template.php

示例15: _e

    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 
开发者ID:DavidSteinbauer,项目名称:event-espresso-core,代码行数:31,代码来源:pricing_details_main_meta_box.template.php


注:本文中的EEH_Form_Fields类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。