<?php

if ( ! defined( 'ABSPATH' ) ) { exit; }

// Leaven empty tag to let automation add the path disclosure line
?>
<p>
	<b><?php esc_html_e( 'Choose an existing page', 'wc4bp' ); ?></b>
	<br>
	<?php wp_dropdown_pages( $args ); ?>
	<input id='wc4bp_children' name='wc4bp_children' type='checkbox' value='1' <?php checked( $children, 1 ); ?> />&nbsp;
	<b><?php esc_html_e( 'Include Children?', 'wc4bp' ); ?></b>
</p>
<p>
	<b><?php esc_html_e( 'Tab Name', 'wc4bp' ); ?></b>
	<i><?php esc_html_e( 'If empty same as Pagename', 'wc4bp' ); ?></i>
	<br>
	<input id='wc4bp_tab_name' name='wc4bp_tab_name' type='text' value='<?php echo esc_attr( $tab_name ); ?>'/>
</p>
<p>
	<b><?php esc_html_e( 'Position', 'wc4bp' ); ?></b>
	<br>
	<small><i><?php esc_html_e( 'Just enter a number like 1, 2, 3..', 'wc4bp' ); ?></i></small>
	<br>
	<input id='wc4bp_position' name='wc4bp_position' type='text' value='<?php echo esc_attr( $position ); ?>'/>
</p>
<?php
if ( isset( $wc4bp_tab_slug ) ) {
	echo '<input type="hidden" id="wc4bp_tab_slug" value="' . esc_attr( $tab_slug ) . '" />';
}
?>
<input type="hidden" id="wc4bp_page_id" value="<?php echo esc_attr( $page_id ); ?>" />;
<input type="hidden" id="wc4bp_old_page_id" value="<?php echo esc_attr( $page_id ); ?>" />;
<div class="parent_div">
	<input type="button" value="<?php esc_html_e( 'Save', 'wc4bp' ); ?>" name="add_cpt4bp_page" class="button add_cpt4bp_page btn">
</div>
<div id="LoadingImageinModal" class="child_div" style="display: none">
	<img class="lds-spinner" src="/wp-admin/images/wpspin_light.gif" />
</div>
