<?php 

function register_new_candidate_cb() {
	global $post_meta;
	$post = new post;
	$classes = select_options_from_classes_of_admission();
	?>
    <form id="form" method="post" action="contents/plugins/admission/ajax.php" data-clearform="true">
	<div class="col-md-12">
        <div class="card">
            <div class="card-header">
                <strong class="card-title">Candidate Registration Form</strong>
            </div>
            <div class="card-body">
            	<div class="col-md-6">
	                <?php 
                        do_action('add_candidate_left_col_before');
	                	input(['label' => 'Surname', 'id' => 'surname', 'required' => 'required']);
	                	input(['label' => 'Other Names', 'id' => 'other_names', 'required' => 'required']);
	                	input(['label' => 'Date of Birth', 'id' => 'dob', 'type' => 'date', 'required' => 'required']);
	                	select(['label' => 'Gender', 'id' => 'gender', 'required' => 'required'], ['Male' => 'Male', 'Female' => 'Female'], 'Male');
	                	select(['label' => 'Class of Admission', 'id' => 'class_of_admission', 'required' => 'required'], $classes);
	                	textarea(['label' => 'Residential Address', 'id' => 'address', 'required' => 'required']);
	                	input(['label' => 'State of Origin', 'id' => 'state', 'required' => 'required']);
                		input(['label' => 'LGA', 'id' => 'lga', 'required' => 'required']);
                        do_action('add_candidate_left_col_after');
	                 ?>
                </div>
                <div class="col-md-6">
                	<?php 
                		label('Parents/Guardian/Sponsor', 'h4');
                		input(['label' => 'Fullname', 'id' => 'n1_fullname', 'required' => 'required']);
                		input(['label' => 'Relationship', 'id' => 'n1_relationship', 'required' => 'required']);
                		input(['label' => 'Phone', 'id' => 'n1_phone', 'type' => 'text', 'required' => 'required', 'placeholder' => 'Seperate multiple numbers with commas']);
                        input(['label' => 'Email', 'id' => 'n1_email', 'type' => 'email']);
                        input(['label' => 'Religion', 'id' => 'religion']);
                		input(['label' => 'Religion Denomination', 'id' => 'religion_denomination']);
                		do_action('croppie_api', ['width' => 150, 'height' => 150, 'boundaryheight' => 210, 'boundarywidth' => 210, 'url' => 'app/images/default-user.png', 'image-name' => 'profile_picture']);
                	 ?>
                </div>
                <div class="col-md-12">
                    <?php alert(); do_action('add_candidate_submit_btn_before'); submit_btn('add_candidate', 'Add Candidate'); do_action('add_candidate_submit_btn_after'); ?>
                </div>
            </div>
        </div>
    </div>
    </form>
    <?php
    add_page_javascript('app/assets/js/page-scripts/submit.js');
}