<?php 

function sfm_edit_fee_description_cb() {
	global $post_meta;
	if(!isset($_GET['id'])) return_method();
	$post = new post;
	$desc = $post->get_post_meta($_GET['id']);
	?>
	<div class="row">
		<div class="col-md-5">
			<div class="card card-primary">
				<div class="card-header">
					<h3 class="card-title">Edit Fee</h3>
				</div>
				<div class="card-body">
					<form method="post" action="contents/plugins/school_fees_manager/ajax.php" id="add_fee_description_form" data-callback="sfm_get_fee_description" data-callbackid="#display">
						<input type="hidden" name="id" value="<?php echo $desc['id'] ?>">
						<?php  
							textarea(['label' => 'Description', 'id' => 'description', 'required' => 'required', 'value' => $desc['description']]);
							alert(); submit_btn('edit_fee_description', 'Save');
						?>
					</form>
				</div>
			</div>
		</div>
		<div class="col-md-7">
			<div class="card card-primary">
				<div class="card-header">
					<h3 class="card-title">Fees</h3>
				</div>
				<div class="card-body">
					<div id="display"></div>
				</div>
			</div>
		</div>
	</div>

	<?php
	add_page_javascript('contents/plugins/school_fees_manager/js/js-functions.js');
	add_page_javascript('app/assets/js/page-scripts/submit.js');
}