Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <tr class="venue">
- <td><?php _e('Country:','tribe-events-calendar'); ?></td>
- <td>
- <?php
- $countries = TribeEventsViewHelpers::constructCountries( $postId );
- $defaultCountry = tribe_get_option('defaultCountry');
- if (isset($_VenueCountry) && $_VenueCountry) {
- $current = $_VenueCountry;
- } elseif (isset($defaultCountry[1]) && tribe_get_option('defaultValueReplace')) {
- $current = $defaultCountry[1];
- } else {
- $current = null;
- }
- ?>
- <select class="chosen" tabindex="<?php $this->tabIndex(); ?>" name='venue[Country]' id="EventCountry">
- <?php
- foreach ($countries as $abbr => $fullname) {
- if ( $abbr == '' ) {
- echo '<option value="">' . esc_html( $fullname ) . '</option>';
- } else {
- echo '<option value="' . esc_attr($fullname) . '" ';
- selected(($current == $fullname));
- echo '>' . esc_html($fullname) . '</option>';
- }
- }
- ?>
- </select>
- </td>
- </tr>
- <tr class="venue">
- <?php if(!isset($_VenueStateProvince) || $_VenueStateProvince == "") $_VenueStateProvince = -1; ?>
- <td><?php _e('State or Province:','tribe-events-calendar'); ?></td>
- <td><input tabindex="<?php $this->tabIndex(); ?>" id="StateProvinceText" name="venue[Province]" type='text' name='' size='25' value='<?php echo ( isset($_VenueStateProvince) && $_VenueStateProvince != '' && $_VenueStateProvince != -1 ) ? esc_attr($_VenueProvince) : esc_attr(''); ?>' />
- <select class="chosen" tabindex="<?php $this->tabIndex(); ?>" id="StateProvinceSelect" name="venue[State]">
- <option value=""><?php _e('Select a State:','tribe-events-calendar'); ?></option>
- <?php
- foreach (TribeEventsViewHelpers::loadStates() as $abbr => $fullname) {
- echo '<option value="'.$abbr.'"';
- if( $_VenueStateProvince != -1 ){
- selected((( $_VenueStateProvince != -1 ? $_VenueStateProvince : $_VenueState) == $abbr));
- }
- echo '>' . esc_html($fullname) . '</option>';
- }
- ?>
- </select>
- </td>
- </tr>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement