/**
     * Display form for creating / editing venues
     *
     * @since 1.0.0
     */
    function edit_form($venue = false)
    {
        $tax = get_taxonomy('event-venue');
        $venue = get_term_by('slug', $venue, 'event-venue');
        $term_id = isset($venue->term_id) ? (int) $venue->term_id : 0;
        $do = $this->current_action() == 'edit' ? 'update' : 'add';
        $nonce = $do == 'update' ? 'eventorganiser_update_venue_' . $venue->slug : 'eventorganiser_add_venue';
        if ('edit' == $this->current_action()) {
            ?>
			<h2>
				<?php 
            echo esc_html($tax->labels->edit_item);
            ?>
				<a href="edit.php?post_type=event&page=venues&action=create" class="add-new-h2"><?php 
            echo esc_html($tax->labels->add_new_item);
            ?>
</a>
			</h2>
		<?php 
        } else {
            ?>
			<h2>
				<?php 
            echo esc_html($tax->labels->add_new_item);
            ?>
 
			</h2>
		<?php 
        }
        ?>

		<form name="venuedetails" id="eo_venue_form" method="post" action="<?php 
        echo admin_url('edit.php?post_type=event&page=venues');
        ?>
" <?php 
        do_action('eventorganiser_venue_edit_form_tag', $venue);
        ?>
 >
			<input type="hidden" name="action" value="<?php 
        echo $do;
        ?>
"> 
			<input type="hidden" id="eo_venue_id" name="eo_venue[venue_id]" value="<?php 
        echo $term_id;
        ?>
">  
			<input type="hidden" name="event-venue" value="<?php 
        echo isset($venue->slug) ? $venue->slug : '';
        ?>
">  

			<?php 
        wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false);
        ?>
			<?php 
        wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false);
        ?>
			<?php 
        wp_nonce_field($nonce);
        ?>

			<?php 
        //WP3.3-3.3.1 backwards compabt
        if (version_compare(get_bloginfo('version'), 3.4) < 0) {
            $columns = '1';
        } else {
            $columns = 1 == get_current_screen()->get_columns() ? '1' : '2';
        }
        ?>
			<div id="poststuff">

				<div id="post-body" class="metabox-holder columns-<?php 
        echo $columns;
        ?>
">

					<div id="post-body-content">
						<div id="titlediv"><?php 
        eventorganiser_venue_title($venue);
        ?>
</div>
						<div class="postbox " id="venue_address">
							<div class="handlediv" title="Click to toggle"><br></div>
							<h3 class="hndle"><span><?php 
        echo esc_html($tax->labels->venue_location);
        ?>
</span></h3>
							<div class="inside"><?php 
        eventorganiser_venue_location($venue);
        ?>
</div>
						</div><!-- .postbox -->
						<div id="<?php 
        echo user_can_richedit() ? 'postdivrich' : 'postdiv';
        ?>
" class="venue_description postarea">
							<?php 
        wp_editor(eo_get_venue_meta($term_id, '_description'), 'content', array('textarea_name' => 'eo_venue[description]', 'dfw' => false));
        ?>
						</div>
		 			</div><!-- #post-body-content -->

					<div id="postbox-container-1" class="postbox-container">
						<?php 
        do_meta_boxes('', 'side', $venue);
        ?>
					</div>	

					<div id="postbox-container-2" class="postbox-container">
						<?php 
        do_meta_boxes('', 'normal', $venue);
        ?>
						<?php 
        do_meta_boxes('', 'advanced', $venue);
        ?>
		 			</div>

		 		</div><!-- #post-body -->
				<br class="clear"> 

			</div><!-- #poststuff -->
		</form> 	
	<?php 
    }
    /**
     * Display form for creating / editing venues
     *
     * @since 1.0.0
     */
    function edit_form($venue = false)
    {
        $venue = get_term_by('slug', $venue, 'event-venue');
        $term_id = isset($venue->term_id) ? (int) $venue->term_id : 0;
        $do = $this->current_action() == 'edit' ? 'update' : 'add';
        $nonce = $do == 'update' ? 'eventorganiser_update_venue_' . $venue->slug : 'eventorganiser_add_venue';
        if ($this->current_action() == 'edit') {
            ?>
		<h2>
			<?php 
            _e('Edit Venue', 'eventorganiser');
            ?>
			<a href="edit.php?post_type=event&page=venues&action=create" class="add-new-h2"><?php 
            _ex('Add New', 'post');
            ?>
</a>
		</h2>

	<?php 
        } else {
            ?>
		<h2><?php 
            _e('Add New Venue', 'eventorganiser');
            ?>
 </h2>

	<?php 
        }
        ?>

	<form name="venuedetails" id="eo_venue_form" method="post" action="<?php 
        echo site_url('wp-admin/edit.php?post_type=event&page=venues');
        ?>
">  
		<input type="hidden" name="action" value="<?php 
        echo $do;
        ?>
"> 
		<input type="hidden" name="eo_venue[venue_id]" value="<?php 
        echo $term_id;
        ?>
">  
		<input type="hidden" name="event-venue" value="<?php 
        echo isset($venue->slug) ? $venue->slug : '';
        ?>
">  

		<?php 
        wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false);
        ?>
		<?php 
        wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false);
        ?>
		<?php 
        wp_nonce_field($nonce);
        ?>

		<div id="poststuff" class="metabox-holder has-right-sidebar">
			<?php 
        do_action('add_meta_boxes_event_page_venues', $venue);
        ?>
			<?php 
        do_action('add_meta_boxes', 'event_page_venues', $venue);
        ?>


			<div id="side-info-column" class="inner-sidebar">
				<?php 
        do_meta_boxes('', 'side', $venue);
        ?>
			</div>	

			<div id="post-body">
				<div id="post-body-content">
					<div id="titlediv"><?php 
        eventorganiser_venue_title($venue);
        ?>
</div>

					<div class="postbox " id="venue_address">
						<div class="handlediv" title="Click to toggle"><br></div>
						<h3 class="hndle"><span><?php 
        _e('Venue Location', 'eventorganiser');
        ?>
</span></h3>
						<div class="inside"><?php 
        eventorganiser_venue_location($venue);
        ?>
</div>
					</div><!-- .postbox -->

					<div id="<?php 
        echo user_can_richedit() ? 'postdivrich' : 'postdiv';
        ?>
" class="venue_description postarea">
						<?php 
        wp_editor(eo_get_venue_description($term_id), 'content', array('textarea_name' => 'eo_venue[description]', 'dfw' => false, 'tabindex' => 1));
        ?>
					</div>

					<?php 
        do_meta_boxes('', 'normal', $venue);
        ?>
					<?php 
        do_meta_boxes('', 'advanced', $venue);
        ?>

		 		</div><!-- #post-body-content -->
		 	</div><!-- #post-body -->
		</div><!-- #poststuff -->
	</form> 	
	<?php 
    }