<?php require_once('includes/check-login.php'); ?>
<?php require_once('includes/header.php'); ?>
    <?php require_once('includes/menu.php'); ?>
        <!-- Datatable CSS -->
        <link href='data_tables/datatables.min.css' rel='stylesheet' type='text/css' />        
        <!-- Content Wrapper. Contains page content -->
        <div class="content-wrapper">
            <!-- Content Header (Page header) -->
            <section class="content-header">    
                <small><a href="descriptions-map.php"><i class="fa fa-arrow-left"></i> Back</a></small>
                <ol class="breadcrumb">
                    <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>                    
                    <li class="active"><a href="descriptions-map.php">Description Mapping</a></li>           
                </ol>                
            </section>
            <!-- Main content -->
            <section class="content">                
                <!-- Default box -->
            <div class="box box-form">
                    <div class="box-header with-border">
                        <h3 class="box-title">New Description Mapping</h3>
                        <div class="box-tools pull-right">
                            <button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
                                <i class="fa fa-minus"></i></button>
                            <button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
                                <i class="fa fa-times"></i></button>
                        </div>
                    </div>
                    <div class="box-body">
                        <div class="row">
                            <div class="col-lg-12 message"></div>
                            <form role="form" id="categoryDescForm">                                
                                <div class="col-md-12">

                                    <div class="form-group">
                                        <label>Cervice Name</label>
                                        <br>
                                        <?php 
                                            require_once('includes/config.php');
                                            $psql = "SELECT id, service_name FROM services WHERE active = 1";
                                            $pexe = mysqli_query( $con, $psql );
                                            ?>
                                        <select id="service_id" name="service_id" class="form-control">
                                            <option value="-1">---Select---</option>
                                            <?php while( $prows = mysqli_fetch_assoc( $pexe ) ) { ?>
                                                <option value="<?php echo $prows['id']; ?>"><?php echo $prows['service_name']; ?></option>
                                            <?php } ?>
                                        </select>
                                    </div>
                                    <div class="form-group">
                                        <label>Category Description Title</label>
                                        <br>
                                        <input type="hidden" id="category_desc_title_id" name="category_desc_title_id" value="" />
                                        <input type="text" class="form-control" id="category_desc_title" name="category_desc_title" placeholder="Search Title here.." value="" />
                                        <div id="suggesstion-box"></div>
                                    </div>                                    
                                    <div class="form-group">
                                        <label>Sort Order</label>
                                        <br>
                                        <input type="text" class="form-control" id="sort_order" name="sort_order" placeholder="Sort Order" value="" />
                                    </div>                                    
                                    <div class="form-group">
                                        <label>Descriptions<small class="error"> ( * Press enter key inside the editor to seperate each points )</small></label>
                                        <br>
                                        <textarea class="form-control tinymce" id="descriptions" name="descriptions"></textarea>
                                    </div>
                                    <div class="form-group">
                                        <label>Active</label>
                                        <br>
                                        <select id="active" name="active" class="form-control">
                                            <option value="-1">-- Active --</option>
                                            <option value="1" selected="selected">Active</option>
                                            <option value="0">Inactive</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="col-xs-12">
                                    <button type="button" class="btn btn-primary" id="CategoryDescBtn">Save</button>
                                    <button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
</section>
            <!-- /.content -->                                        
        </div>
        <!-- /.content-wrapper --> 
<script src="js/tinymce/tinymce.min.js"></script> 
<script>
    tinymce.init({ 
        selector:'.tinymce',
        branding: false 
    });
</script>       
<script src="js/common.js"></script>     
<script src="js/desc-map/script.js"></script>     
<?php require_once('includes/footer.php'); ?>        