jQuery(document).ready(function() { var mec_fes_form_ajax = false; jQuery("#mec_fes_form").on("submit", function(event) { event.preventDefault(); var $form = jQuery("#mec_fes_form"); // Hide the message jQuery("#mec_fes_form_message").removeClass("mec-success").removeClass("mec-success").html("").hide(); // Add loading Class to the form $form.addClass("mec-fes-loading"); jQuery(".mec-fes-form-cntt").hide(); jQuery(".mec-fes-form-sdbr").hide(); jQuery(".mec-fes-submit-wide").hide(); // Fix WordPress editor issue jQuery("#mec_fes_content-html").click(); jQuery("#mec_fes_content-tmce").click(); // Abort previous request if(mec_fes_form_ajax) mec_fes_form_ajax.abort(); var data = $form.serialize(); mec_fes_form_ajax = jQuery.ajax( { type: "POST", url: "'.admin_url('admin-ajax.php', NULL).'", data: data, dataType: "JSON", success: function(response) { // Remove the loading Class from the form jQuery("#mec_fes_form").removeClass("mec-fes-loading"); jQuery(".mec-fes-form-cntt").show(); jQuery(".mec-fes-form-sdbr").show(); jQuery(".mec-fes-submit-wide").show(); if(response.success == "1") { // Show the message jQuery("#mec_fes_form_message").removeClass("mec-success").addClass("mec-success").html(response.message).css("display","inline-block"); // Set the event id jQuery(".mec-fes-post-id").val(response.data.post_id); // Redirect Currnet Page if(response.data.redirect_to !== "") { setTimeout(function() { window.location.href = response.data.redirect_to; },' . ((isset($this->settings['fes_thankyou_page_time']) and trim($this->settings['fes_thankyou_page_time']) != '') ? (int) $this->settings['fes_thankyou_page_time'] : 2000) . '); } } else { // Show the message jQuery("#mec_fes_form_message").removeClass("mec-error").addClass("mec-error").html(response.message).css("display","inline-block"); } }, error: function(jqXHR, textStatus, errorThrown) { // Remove the loading Class from the form jQuery("#mec_fes_form").removeClass("loading"); } }); }); }); function mec_fes_upload_featured_image() { var fd = new FormData(); fd.append("action", "mec_fes_upload_featured_image"); fd.append("_wpnonce", "'.wp_create_nonce('mec_fes_upload_featured_image').'"); fd.append("file", jQuery("#mec_featured_image_file").prop("files")[0]); jQuery("#mec_fes_thumbnail_error").html("").addClass("mec-util-hidden"); jQuery.ajax( { url: "'.admin_url('admin-ajax.php', NULL).'", type: "POST", data: fd, dataType: "json", processData: false, contentType: false }) .done(function(data) { if(data.success) { jQuery("#mec_fes_thumbnail").val(data.data.url); jQuery("#mec_featured_image_file").val(""); jQuery("#mec_fes_thumbnail_img").html(""); jQuery("#mec_fes_remove_image_button").removeClass("mec-util-hidden"); } else { jQuery("#mec_fes_thumbnail_error").html(data.message).removeClass("mec-util-hidden"); } }); return false; } function mec_fes_upload_location_thumbnail() { var fd = new FormData(); fd.append("action", "mec_fes_upload_featured_image"); fd.append("_wpnonce", "'.wp_create_nonce('mec_fes_upload_featured_image').'"); fd.append("file", jQuery("#mec_fes_location_thumbnail_file").prop("files")[0]); jQuery.ajax( { url: "'.admin_url('admin-ajax.php', NULL).'", type: "POST", data: fd, dataType: "json", processData: false, contentType: false }) .done(function(data) { jQuery("#mec_fes_location_thumbnail").val(data.data.url); jQuery("#mec_fes_location_thumbnail_file").val(""); jQuery("#mec_fes_location_thumbnail_img").html(""); jQuery("#mec_fes_location_remove_image_button").removeClass("mec-util-hidden"); }); return false; } function mec_fes_upload_organizer_thumbnail() { var fd = new FormData(); fd.append("action", "mec_fes_upload_featured_image"); fd.append("_wpnonce", "'.wp_create_nonce('mec_fes_upload_featured_image').'"); fd.append("file", jQuery("#mec_fes_organizer_thumbnail_file").prop("files")[0]); jQuery.ajax( { url: "'.admin_url('admin-ajax.php', NULL).'", type: "POST", data: fd, dataType: "json", processData: false, contentType: false }) .done(function(data) { jQuery("#mec_fes_organizer_thumbnail").val(data.data.url); jQuery("#mec_fes_organizer_thumbnail_file").val(""); jQuery("#mec_fes_organizer_thumbnail_img").html(""); jQuery("#mec_fes_organizer_remove_image_button").removeClass("mec-util-hidden"); }); return false; } '; // Include javascript code into the footer $this->factory->params('footer', $javascript); ?>
main->get_event_label_status(get_post_status($post_id)); ?>
ID, 'mec_advanced_days', true ); $advanced_days = (is_array($advanced_days)) ? $advanced_days : array(); $advanced_str = (count($advanced_days)) ? implode('-', $advanced_days) : ''; $start_time_hour = get_post_meta($post_id, 'mec_start_time_hour', true); if(trim($start_time_hour) == '') $start_time_hour = 8; $start_time_minutes = get_post_meta($post_id, 'mec_start_time_minutes', true); if(trim($start_time_minutes) == '') $start_time_minutes = 0; $start_time_ampm = get_post_meta($post_id, 'mec_start_time_ampm', true); if(trim($start_time_ampm) == '') $start_time_ampm = 'AM'; $end_date = get_post_meta($post_id, 'mec_end_date', true); $end_time_hour = get_post_meta($post_id, 'mec_end_time_hour', true); if(trim($end_time_hour) == '') $end_time_hour = 6; $end_time_minutes = get_post_meta($post_id, 'mec_end_time_minutes', true); if(trim($end_time_minutes) == '') $end_time_minutes = 0; $end_time_ampm = get_post_meta($post_id, 'mec_end_time_ampm', true); if(trim($end_time_ampm) == '') $end_time_ampm = 'PM'; $repeat_status = get_post_meta($post_id, 'mec_repeat_status', true); $repeat_type = get_post_meta($post_id, 'mec_repeat_type', true); if(trim($repeat_type) == '') $repeat_type = 'daily'; $repeat_interval = get_post_meta($post_id, 'mec_repeat_interval', true); if(trim($repeat_interval) == '' and in_array($repeat_type, array('daily', 'weekly'))) $repeat_interval = 1; $certain_weekdays = get_post_meta($post_id, 'mec_certain_weekdays', true); if($repeat_type != 'certain_weekdays') $certain_weekdays = array(); $in_days_str = get_post_meta($post_id, 'mec_in_days', true); $in_days = trim($in_days_str) ? explode(',', $in_days_str) : array(); $mec_repeat_end = get_post_meta($post_id, 'mec_repeat_end', true); if(trim($mec_repeat_end) == '') $mec_repeat_end = 'never'; $repeat_end_at_occurrences = get_post_meta($post_id, 'mec_repeat_end_at_occurrences', true); if(trim($repeat_end_at_occurrences) == '') $repeat_end_at_occurrences = 9; $repeat_end_at_date = get_post_meta($post_id, 'mec_repeat_end_at_date', true); // This date format used for datepicker $datepicker_format = (isset($this->settings['datepicker_format']) and trim($this->settings['datepicker_format'])) ? $this->settings['datepicker_format'] : 'Y-m-d'; $imported_from_google = get_post_meta($post_id, 'mec_imported_from_google', true); $event_timezone = get_post_meta($post->ID, 'mec_timezone', true); if(trim($event_timezone) == '') $event_timezone = 'global'; $countdown_method = get_post_meta($post->ID, 'mec_countdown_method', true); if(trim($countdown_method) == '') $countdown_method = 'global'; // Public Event $public = get_post_meta($post->ID, 'mec_public', true); if(trim($public) === '') $public = 1; ?>
post_content) ? $post->post_content : ''), 'mec_fes_content', array('textarea_name'=>'mec[content]')); ?>
settings['fes_section_excerpt']) && $this->settings['fes_section_excerpt']): ?>

settings['fes_required_excerpt']) and $this->settings['fes_required_excerpt']) ? '*' : ''); ?>

main->timepicker(array( 'method' => (isset($this->settings['time_format']) ? $this->settings['time_format'] : 12), 'time_hour' => $start_time_hour, 'time_minutes' => $start_time_minutes, 'time_ampm' => $start_time_ampm, 'name' => 'mec[date][start]', 'id_key' => 'start_', 'include_h0' => true, )); ?>
main->timepicker(array( 'method' => (isset($this->settings['time_format']) ? $this->settings['time_format'] : 12), 'time_hour' => $end_time_hour, 'time_minutes' => $end_time_minutes, 'time_ampm' => $end_time_ampm, 'name' => 'mec[date][end]', 'id_key' => 'end_', )); ?>
type="checkbox" name="mec[date][allday]" id="mec_allday" value="1" onchange="jQuery('.mec-time-picker').toggle();" />
type="checkbox" name="mec[date][hide_time]" id="mec_hide_time" value="1" />
type="checkbox" name="mec[date][hide_end_time]" id="mec_hide_end_time" value="1" />

settings['tz_per_event']) and $this->settings['tz_per_event']): ?>
settings['countdown_status']) and $this->settings['countdown_status'] and (!isset($this->settings['fes_section_countdown_method']) or (isset($this->settings['fes_section_countdown_method']) and $this->settings['fes_section_countdown_method']))): ?>

settings['fes_section_shortcode_visibility']) or (isset($this->settings['fes_section_shortcode_visibility']) and $this->settings['fes_section_shortcode_visibility'])): ?>

type="checkbox" name="mec[date][repeat][status]" id="mec_repeat" value="1" />
main->timepicker(array( 'method' => (isset($this->settings['time_format']) ? $this->settings['time_format'] : 12), 'time_hour' => $start_time_hour, 'time_minutes' => $start_time_minutes, 'time_ampm' => $start_time_ampm, 'name' => 'mec[exceptionsdays][start]', 'id_key' => 'exceptions_in_days_start_', 'include_h0' => true, )); ?>
main->timepicker(array( 'method' => (isset($this->settings['time_format']) ? $this->settings['time_format'] : 12), 'time_hour' => $end_time_hour, 'time_minutes' => $end_time_minutes, 'time_ampm' => $end_time_ampm, 'name' => 'mec[exceptionsdays][end]', 'id_key' => 'exceptions_in_days_end_', )); ?>

main->standardize_format($in_day[0], $datepicker_format); $second_date = $this->main->standardize_format($in_day[1], $datepicker_format); $in_day_start_time = ''; $in_day_start_time_label = ''; $in_day_end_time = ''; $in_day_end_time_label = ''; if(isset($in_day[2]) and isset($in_day[3])) { $in_day_start_time = $in_day[2]; $in_day_end_time = $in_day[3]; // If 24 hours format is enabled then convert it back to 12 hours if(isset($this->settings['time_format']) and $this->settings['time_format'] == 24) { $in_day_ex_start = explode('-', $in_day_start_time); $in_day_ex_end = explode('-', $in_day_end_time); $in_day_start_time_label = $this->main->to_24hours($in_day_ex_start[0], $in_day_ex_start[2]).':'.$in_day_ex_start[1]; $in_day_end_time_label = $this->main->to_24hours($in_day_ex_end[0], $in_day_ex_end[2]).':'.$in_day_ex_end[1]; } else { $pos = strpos($in_day_start_time, '-'); if($pos !== false) $in_day_start_time_label = substr_replace($in_day_start_time, ':', $pos, 1); $pos = strpos($in_day_end_time, '-'); if($pos !== false) $in_day_end_time_label = substr_replace($in_day_end_time, ':', $pos, 1); $in_day_start_time_label = str_replace('-', ' ', $in_day_start_time_label); $in_day_end_time_label = str_replace('-', ' ', $in_day_end_time_label); } } $in_day = $first_date . ':' . $second_date.(trim($in_day_start_time) ? ':'.$in_day_start_time : '').(trim($in_day_end_time) ? ':'.$in_day_end_time : ''); $in_day_label = $first_date. (trim($in_day_start_time_label) ? ' '.$in_day_start_time_label : '') . ' - ' . $second_date. (trim($in_day_end_time_label) ? ' '.$in_day_end_time_label : ''); ?>
x
:label: x
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 1); ?>
    • "> .1-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 2); ?>
    • "> .1-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 3); ?>
    • "> .1-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 4); ?>
    • "> .1-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 5); ?>
    • "> .1-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 6); ?>
    • "> .1-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 7); ?>
    • "> .1-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 1); ?>
    • "> .2-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 2); ?>
    • "> .2-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 3); ?>
    • "> .2-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 4); ?>
    • "> .2-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 5); ?>
    • "> .2-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 6); ?>
    • "> .2-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 7); ?>
    • "> .2-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 1); ?>
    • "> .3-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 2); ?>
    • "> .3-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 3); ?>
    • "> .3-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 4); ?>
    • "> .3-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 5); ?>
    • "> .3-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 6); ?>
    • "> .3-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 7); ?>
    • "> .3-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 1); ?>
    • "> .4-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 2); ?>
    • "> .4-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 3); ?>
    • "> .4-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 4); ?>
    • "> .4-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 5); ?>
    • "> .4-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 6); ?>
    • "> .4-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 7); ?>
    • "> .4-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 1); ?>
    • "> .l-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 2); ?>
    • "> .l-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 3); ?>
    • "> .l-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 4); ?>
    • "> .l-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 5); ?>
    • "> .l-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 6); ?>
    • "> .l-
    • main->advanced_repeating_sort_day($this->main->get_first_day_of_week(), 7); ?>
    • "> .l-
type="radio" value="never" name="mec[date][repeat][end]" id="mec_repeat_ends_never" />
type="radio" value="date" name="mec[date][repeat][end]" id="mec_repeat_ends_date" />
type="radio" value="occurrences" name="mec[date][repeat][end]" id="mec_repeat_ends_occurrences" />

type="checkbox" name="mec[date][one_occurrence]" id="mec-one-occurrence" value="1"/>
main->is_note_visible(get_post_status($post_id))): $note = get_post_meta($post_id, 'mec_note', true); ?>

settings['fes_guest_name_email']) and $this->settings['fes_guest_name_email']): ?> settings['fes_section_event_links']) or (isset($this->settings['fes_section_event_links']) and $this->settings['fes_section_event_links'])): ?> settings['fes_section_cost']) or (isset($this->settings['fes_section_cost']) and $this->settings['fes_section_cost'])): ?> settings['single_cost_type']) and trim($this->settings['single_cost_type'])) ? $this->settings['single_cost_type'] : 'numeric'); $cost_auto_calculate = get_post_meta($post_id, 'mec_cost_auto_calculate', true); $currency = get_post_meta($post_id, 'mec_currency', true); if(!is_array($currency)) $currency = array(); $currency_per_event = ((isset($this->settings['currency_per_event']) and trim($this->settings['currency_per_event'])) ? $this->settings['currency_per_event'] : 0); $currencies = $this->main->get_currencies(); $current_currency = (isset($currency['currency']) ? $currency['currency'] : (isset($this->settings['currency']) ? $this->settings['currency'] : NULL)); ?>

main->m('event_cost', __('Event Cost', 'modern-events-calendar-lite')); ?> settings['fes_required_cost']) and $this->settings['fes_required_cost']) ? '*' : ''); ?>

class="mec-col-3" name="mec[cost]" id="mec_cost" value="" placeholder="" settings['fes_required_cost']) and $this->settings['fes_required_cost']) ? 'required' : ''); ?> />

settings['fes_section_featured_image']) or (isset($this->settings['fes_section_featured_image']) and $this->settings['fes_section_featured_image'])): ?> settings['fes_section_categories']) or (isset($this->settings['fes_section_categories']) and $this->settings['fes_section_categories'])): ?>

main->m('taxonomy_categories', __('Categories', 'modern-events-calendar-lite')); ?> settings['fes_required_category']) and $this->settings['fes_required_category']) ? '*' : ''); ?>

'mec_category', 'hide_empty' => false, 'title_li' => '', 'walker' => new FES_Custom_Walker($post_id), )); ?>
settings['fes_section_labels']) or (isset($this->settings['fes_section_labels']) and $this->settings['fes_section_labels'])): ?> term_id; $label_terms = get_terms(array('taxonomy'=>'mec_label', 'hide_empty'=>false)); ?>

main->m('taxonomy_labels', __('Labels', 'modern-events-calendar-lite')); ?> settings['fes_required_label']) and $this->settings['fes_required_label']) ? '*' : ''); ?>

settings['fes_section_event_color']) or (isset($this->settings['fes_section_event_color']) and $this->settings['fes_section_event_color'])): ?> main->get_available_colors(); if(!trim($color)) $color = $available_colors[0]; ?>

settings['fes_section_tags']) or (isset($this->settings['fes_section_tags']) and $this->settings['fes_section_tags'])): ?> name.','; ?>

settings['speakers_status']) and $this->settings['speakers_status']) and isset($this->settings['fes_section_speaker']) and $this->settings['fes_section_speaker']): ?> term_id)) continue; $speakers[] = $post_speaker->term_id; } $speaker_terms = get_terms(array('taxonomy'=>'mec_speaker', 'hide_empty'=>false)); ?>

main->m('taxonomy_speakers', __('Speakers', 'modern-events-calendar-lite')); ?>

settings['fes_section_virtual_events']) && $this->settings['fes_section_virtual_events']) { if($post->ID != -1 && $post == "") $post = get_post_meta($post->ID, 'meta_box_virtual', true); do_action('mec_virtual_event_form', $post); } ?> settings['fes_section_zoom_integration']) && $this->settings['fes_section_zoom_integration']) { if($post->ID != -1 && $post == "") $post = get_post_meta($post->ID, 'meta_box_virtual', true); do_action('mec_zoom_event_form', $post); } ?>
settings['fes_agreement']) and $this->settings['fes_agreement']): ?> main->get_recaptcha_status('fes')): ?>