BBnepal-Accounts/application/views/admin/create-section.php
Sampanna Rimal 9cd05ef3cb commitall
2024-07-10 18:28:19 +05:45

75 lines
1.6 KiB
PHP

<style>
.error {
color : red;
}
</style>
<main class="wrapper responsive-width" id="main">
<!----admin template section---->
<div class="admin_tempblock">
<div class="admin_tempsec">
<div class="admin_sec">
<?php if($this->session->flashdata('failed')) { ?>
<div class="mt-3 mb-3 text-center p-2 bg-danger text-white">
<p><?php echo $this->session->flashdata('failed') ?></p>
</div>
<?php } ?>
<form action="<?php echo base_url() ?>Admin/insertSection" method="post" id="sectionForm">
<div class="subsec_sec">
<div class="subject_l">
<div class="subject_lsec">
<div class="subject_lhead">Create Section</div>
<div class="subject_lformarea">
<div class="form-group">
<label for="">Section Name</label>
<input type="text" name="section_name" class="form-control" placeholder="Name of your course">
</div>
<input type="submit" class="subject_addbtn" value="Submit">
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!----admin template section end---->
</main>
<!--End right-top side-->
<script>
$(document).ready(function(){
$("#sectionForm").validate({
rules: {
section_name: {
required: true,
minlength: 5
}
},
// Specify validation error messages
messages: {
section_name: {
required: "Please provide a section name",
minlength : "Please enter more than 4 Characters"
},
},
submitHandler: function(form) {
form.submit();
}
});
});
</script>