<?php require_once('includes/check-login.php'); ?>
<?php require_once('includes/header.php'); ?>
    <?php require_once('includes/menu.php');
    require_once('includes/config.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="new-desc-map.php"><i class="fa fa-plus"></i> New Mapping</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">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">    
                        <!-- Table -->
                        <table id='descriptions-title-map' class='display dataTable table table-bordered table-hover'>
                            <thead>
                            <tr>
                                <th>Desc Title</th>
                                <th>Description</th>
                                <th>Sort Order</th>
                                <th>Active</th>
                                <th>Edit</th>                               
                                <th>Delete</th>
                            </tr>
                            </thead>                
                        </table>
                    </div>
                    <!-- /.box-footer-->                    
                </div>
                <!-- /.box -->
            </section>
            <!-- /.content -->                                        
        </div>
  <div class="modal fade" id="descriptionEditModal" role="dialog">
    <div class="modal-dialog">
    
      <!-- Modal content-->
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal">&times;</button>
          <h4 class="modal-title">Edit Description</h4>
        </div>
        <div class="modal-body">
          <!-- edit content start -->
            <form id="editDescription">
                <center><div class="message"></div></center>
                <div class="col-md-12xfnxn">
                    <div class="form-group">
                        <label>Description</label><br/>                        
                        <textarea id="description" name="description" rows="4" cols="50" class="form-control tinymce"></textarea>
                    </div>
                </div>
                <div class="col-md-12">
                    <div class="form-group">
                        <label>Sort Order</label>
                        <input type="text" id="sort_order" name="sort_order" class="form-control">
                    </div>
                </div>

                <div class="col-md-12">
                    <div class="form-group">
                        <label>Status</label>
                        <select class="form-control" name="status" id="status">
                            <option value="-1">---Select---</option>
                            <option value="1">Active</option>
                            <option value="0">In-active</option>
                        </select> 
                    </div>
                </div>
                <div class="metaInfo">
                    <input type="hidden" id="description_id" name = "description_id" value = "" />
                    <input type="hidden" id ="identifier" name = "identifier" value = ""/>
                    <input type="hidden" id ="table" name = "table" value = ""/>
                    <input type="hidden" id ="call_back" name = "call_back" value = ""/>
                    <input type="hidden" id ="extension" name = "extension" value = ""/>
                </div>
                <div class="col-xs-12">
                    <button type="button"  name="edit_description" id="edit_description" value="Update" class="btn btn-primary updateDescription">Save</button>
                    <button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
                </div>                
            </form> 
      
          <!-- edit content end -->
        </div>
        <br />
        <div class="modal-footer">
          
        </div>
      </div>
      
    </div>
  </div>        
        <!-- /.content-wrapper -->   
<script src="js/tinymce/tinymce.min.js"></script>              
<script src="js/common.js"></script>     
<script src="js/desc-map/script.js"></script> 
<?php require_once('includes/footer.php'); ?>