<script src="https://cdn.ckeditor.com/4.7.1/standard/ckeditor.js"></script>
<section class="content-header">
  <h1>Blog Category</h1>
  <ol class="breadcrumb">
    <li><a href="<?php echo base_url().'admin';?>"><i class="fa fa-dashboard"></i> Home</a></li>
    <li><a href="<?php echo base_url('admin/blog_article/category_list');?>">Blog Category</a></li>
    <li class="active">Edit</li>
  </ol>
</section>
<section class="content">
  <div class="row">
    <?php echo $this->utility->showMsg();?>
    <div class="col-md-12">
      <div class="loader" style="display:none;"><img src='<?php echo base_url();?>assets/images/loading.gif' alt='loading' /></div>
      <div class="box box-info">
        <div class="box-header with-border">
          <h3 class="box-title">Edit </h3>
        </div>
        <form id="edit_cat_add" name="edit_cat_add" class="form-horizontal" method="post" action="" enctype="multipart/form-data">
          <?php if(!empty($language)){ 
                  foreach ($language as $lang) { ?>
		      <div class="box-body">
            <div class="form-group">
              <label class="col-sm-2 control-label">Category Name [<?php echo $lang['name']; ?>]</label>
              <div class="col-sm-6">
              <?php $title = getValue('b_category_lang_values',array('lang_id'=>$lang['id'],'cat_id'=>$categoryDetails['cat_id'])); ?>
                <input type="text" class="form-control required" required id="cat_name_<?php echo $lang['id']; ?>" name="cat_name_<?php echo $lang['id']; ?>" value="<?php if(!empty($title['cat_name'])){ echo $title['cat_name']; } else { echo $categoryDetails['cat_name']; }?>" placeholder="Please enter category name">
              </div>
            </div>
          </div>
        <?php } } ?>    
          <div class="box-footer">
            <button type="button" onclick="return_back()"class="btn btn-default  margin-left  " >Cancel</button>
            <input type="submit" class="btn btn-info " value="Update" id="add">
          </div>
        </form>
      </div>
    </div>
  </div>
</section>
 <script type='text/javascript'>
  $("#edit_cat_add").validate();
</script>
 <script type="text/javascript">
  function return_back(){
    var back_url='<?php echo base_url()?>admin/blog_article/category_list';
    window.location=back_url;
  }
 </script>