<script type="text/javascript">
function validate_language(){
    if($("#language_name").val()==''){
        $("#language_name").addClass('error');
        $("#language_name").focus();
        $("#msg_language_name").html('Please enter name').show();
        return false;
    }else{
        $("#language_name").removeClass('error');
        $("#msg_language_name").hide();
    }
}

</script>

<div class="breadcrumb">
    <h1>language</h1>
    <ul>
        <li><a href="<?php echo SITE_URL.ADMIN_DIR ?>">Dashboard</a></li>
        <li>Add New language</li>
    </ul>
</div>
<div class="separator-breadcrumb border-top"></div>
<div class="row">
    <div class="col-md-12">
        <div class="card mb-4">
            <div class="card-body">
                <div class="card-title mb-3">Add New language</div>
                <form action="" method="post" onsubmit="return validate_language();" enctype="multipart/form-data">
                    <?php if(isset($languageDetail->language_id) && $languageDetail->language_id!=0) { ?>
                    <input type="hidden" id="language_id" name="language_id" value="<?php echo $languageDetail->language_id ?>" />
                    <?php } ?>
                    <div class="row">
                        <div class="col-md-6 form-group mb-3">
                            <label for="language_name">Name <span class="asterisk">*</span></label>
                            <input type="text" class="form-control" id="language_name" name="language_name" value="<?php echo $languageDetail->language_name; ?>" placeholder="Enter language name">
                            <div class="invalid-tooltip" id="msg_language_name"></div>
                        </div>
                        
                        
                        <div class="col-md-12">
                            <button class="btn btn-primary" id="submit" name="submit">Submit</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>