| 1 |
<?php |
| 2 |
/** |
| 3 |
* Date custombox |
| 4 |
* |
| 5 |
* @package event-post |
| 6 |
* @version 5.10.1 |
| 7 |
* @since 5.3.1 |
| 8 |
*/ |
| 9 |
?> |
| 10 |
<div class="eventpost-misc-pub-section"> |
| 11 |
<p> |
| 12 |
<label for="<?php esc_attr_e($this->META_STATUS); ?>"> |
| 13 |
<?php esc_attr_e('Status:', 'event-post') ?> |
| 14 |
<select name="<?php esc_attr_e($this->META_STATUS); ?>" id="<?php esc_attr_e($this->META_STATUS); ?>"> |
| 15 |
<option value=""></option> |
| 16 |
<?php foreach ($this->statuses as $status_name => $status_label): ?> |
| 17 |
<option value="<?php esc_attr_e($status_name); ?>" <?php selected($status_name, $event->status, true); ?>><?php esc_attr_e($status_label); ?></option> |
| 18 |
<?php endforeach; ?> |
| 19 |
</select> |
| 20 |
</label> |
| 21 |
</p> |
| 22 |
<p> |
| 23 |
<label> |
| 24 |
<input type="checkbox" id="event-post-date-all-day" <?php checked( $event->time_start && $event->time_end && date('H:i:s', $event->time_start) == '00:00:00' && date('H:i:s', $event->time_end) == '00:00:00', true, true); ?>> |
| 25 |
<?php esc_attr_e('All day event', 'event-post') ?> |
| 26 |
</label> |
| 27 |
</p> |
| 28 |
<p> |
| 29 |
<span class="dashicons dashicons-calendar eventpost-edit-icon"></span> |
| 30 |
<label for="<?php esc_attr_e($this->META_START); ?>_date"> |
| 31 |
<?php esc_attr_e('Begin:', 'event-post') ?> |
| 32 |
<span id="<?php esc_attr_e($this->META_START); ?>_date_human" class="human_date"> |
| 33 |
<?php |
| 34 |
if ($event->time_start != '') { |
| 35 |
esc_attr_e( $this->human_date($event->time_start) . (date('H:i', $event->time_start)=='00:00'?'':date(' H:i', $event->time_start))); |
| 36 |
} |
| 37 |
else{ |
| 38 |
esc_attr_e('Pick a date','event-post'); |
| 39 |
} |
| 40 |
?> |
| 41 |
</span> |
| 42 |
<input type="<?php esc_attr_e($this->settings['datepicker']=='browser'?'datetime':''); ?>" class="eventpost-datepicker-<?php esc_attr_e($this->settings['datepicker']); ?>" data-lang="<?php esc_attr_e($language); ?>" value="<?php esc_attr_e(substr($start_date,0,16)); ?>" name="<?php esc_attr_e($this->META_START); ?>" id="<?php esc_attr_e($this->META_START); ?>_date"/> |
| 43 |
</label> |
| 44 |
</p> |
| 45 |
<p> |
| 46 |
<span class="dashicons dashicons-calendar eventpost-edit-icon"></span> |
| 47 |
<label for="<?php esc_attr_e($this->META_END); ?>_date"> |
| 48 |
<?php esc_attr_e('End:', 'event-post') ?> |
| 49 |
<span id="<?php esc_attr_e($this->META_END); ?>_date_human" class="human_date"> |
| 50 |
<?php |
| 51 |
if ($event->time_start != '') { |
| 52 |
esc_attr_e($this->human_date($event->time_end) . (date('H:i', $event->time_end)=='00:00'?'':date(' H:i', $event->time_end))); |
| 53 |
} |
| 54 |
else{ |
| 55 |
esc_attr_e('Pick a date','event-post'); |
| 56 |
} |
| 57 |
?> |
| 58 |
</span> |
| 59 |
<input type="<?php esc_attr_e($this->settings['datepicker']=='browser'?'datetime':''); ?>" class="eventpost-datepicker-<?php esc_attr_e($this->settings['datepicker']); ?>" data-lang="<?php esc_attr_e($language); ?>" value ="<?php esc_attr_e(substr($end_date,0,16)) ?>" name="<?php esc_attr_e($this->META_END); ?>" id="<?php esc_attr_e($this->META_END); ?>_date"/> |
| 60 |
</label> |
| 61 |
</p> |
| 62 |
<p> |
| 63 |
<label for="<?php esc_attr_e($this->META_ORGANIZATION); ?>"> |
| 64 |
<?php esc_attr_e('Organization:', 'event-post') ?> |
| 65 |
<input type="text" value="<?php esc_attr_e($event->organization); ?>" name="<?php esc_attr_e($this->META_ORGANIZATION); ?>" id="<?php esc_attr_e($this->META_ORGANIZATION); ?>" class="widefat"/> |
| 66 |
</label> |
| 67 |
</p> |
| 68 |
<p> |
| 69 |
<strong> |
| 70 |
<?php esc_attr_e('Offer:', 'event-post') ?> |
| 71 |
</strong> |
| 72 |
<br> |
| 73 |
<label for="<?php esc_attr_e($this->META_OFFER); ?>_url"> |
| 74 |
<?php esc_attr_e('URL:', 'event-post') ?> |
| 75 |
<input type="text" value="<?php esc_attr_e($event->offer['url']); ?>" name="<?php esc_attr_e($this->META_OFFER); ?>_url" id="<?php esc_attr_e($this->META_OFFER); ?>_url" class="widefat"/> |
| 76 |
</label> |
| 77 |
<label for="<?php esc_attr_e($this->META_OFFER); ?>_price"> |
| 78 |
<?php esc_attr_e('Price:', 'event-post') ?> |
| 79 |
</label> |
| 80 |
<span style="display: flex; flex-flow: row;"> |
| 81 |
<input type="number" value="<?php esc_attr_e($event->offer['price']); ?>" name="<?php esc_attr_e($this->META_OFFER); ?>_price" id="<?php esc_attr_e($this->META_OFFER); ?>_price" class="widefat"/> |
| 82 |
<select name="<?php esc_attr_e($this->META_OFFER); ?>_currency" id="<?php esc_attr_e($this->META_OFFER); ?>_currency" style="width: 45px;"> |
| 83 |
<option value=""></option> |
| 84 |
<?php foreach (EventPost()->currencies as $currency=>$symbol): ?> |
| 85 |
<option value="<?php esc_attr_e($currency); ?>" <?php selected($currency, $event->offer['currency'], true); ?>> |
| 86 |
<?php esc_attr_e($currency); ?> |
| 87 |
(<?php esc_attr_e($symbol); ?>) |
| 88 |
</option> |
| 89 |
<?php endforeach; ?> |
| 90 |
</select> |
| 91 |
</span> |
| 92 |
</p> |
| 93 |
</div> |
| 94 |
|
| 95 |
<?php |
| 96 |
$this->icon_color_fields($event->ID, $this->META_COLOR,$eventcolor,$this->META_ICON,$eventicon ); |
| 97 |
?> |
| 98 |
|