/** * 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); }
<?php $values = EEH_Form_Fields::prep_answer_options(array(array('id' => 1, 'text' => __('Yes', 'event_espresso')), array('id' => 0, 'text' => __('No', 'event_espresso')))); $description = EEH_Form_Fields::prep_answer_options(array(array('id' => 0, 'text' => __('none', 'event_espresso')), array('id' => 1, 'text' => __('excerpt (short desc)', 'event_espresso')), array('id' => 2, 'text' => __('full description', 'event_espresso')))); add_filter('FHEE__EEH_Form_Fields__label_html', '__return_empty_string'); EE_Registry::instance()->load_helper('Event_View'); EE_Registry::instance()->load_helper('Form_Fields'); ?> <!--************************* Event Listings ****************************--> <h2 class="ee-admin-settings-hdr"> <?php _e('Event List Pages', 'event_espresso'); ?> <?php //echo EEH_Template::get_help_tab_link('event_list_settings_info'); ?> </h2> <table class="form-table"> <tbody> <tr> <th> <label for="event_listings_url"> <?php _e('Event Listings URL', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('event_listings_url_info'); ?>
<?php add_filter('FHEE__EEH_Form_Fields__label_html', '__return_empty_string'); $values = EEH_Form_Fields::prep_answer_options(array(array('id' => 1, 'text' => __('Yes', 'event_espresso')), array('id' => 0, 'text' => __('No', 'event_espresso')))); ?> <!--************************* Event Single ****************************--> <h2 class="ee-admin-settings-hdr"> <?php _e('Single Event Pages', 'event_espresso'); ?> <?php //echo EEH_Template::get_help_tab_link('event_single_settings_info'); ?> </h2> <table class="form-table"> <tbody> <tr> <th> <label for="display_status_banner_single"> <?php _e('Display Status Banner', 'event_espresso'); ?> </label> </th> <td> <?php echo EEH_Form_Fields::select('display_status_banner_single', $display_status_banner_single, $values, 'display_status_banner_single', 'display_status_banner_single'); ?> <p class="description"><?php