<?php $this->load->view('admin/header'); ?>
<div class="wrapper">
<?php $this->load->view('admin/top'); ?>
<?php $this->load->view('admin/side'); ?>
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        <?php echo $page_title; ?>
      </h1>
    </section>

    <!-- Main content -->
    <section class="content">

      <!-- Default box -->
      <div class="box">
		<?php echo form_open('studio/src_news_edit', array('class'=>'form-horizontal'));?>
        <div class="box-header with-border">
          <h3 class="box-title"><?php echo $page_title; ?> Form</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="col-md-12">
					<!-- form start -->
						<?php 
						$this->db->select('*');
						$this->db->from('news');
						$this->db->where('news_id',$news_id);
						$this->db->where('status','yes');
						$news_list = $this->db->get();
						if($news_list->num_rows()>0){
							foreach($news_list->result() as $row){
								$news_id = $row->news_id;
								$news = $row->news;
							}
						}
						?>
					  <div class="box-body">
						<div class="form-group">
						  <label for="inputEmail3" class="col-sm-2 control-label">News<span style='color:red;'>*</span></label>
						  <div class="col-sm-10">
							<input type="hidden" class="form-control" id="inputEmail3" placeholder="" name="news_id" value="<?php echo $news_id; ?>" required >
							<!--<input type="text" class="form-control" id="star_name" placeholder="News" name="news" value="<?php echo $news; ?>">-->
							<textarea class="form-control" id="news" placeholder="News" name="news" required ><?php echo $news; ?></textarea>
							<br><p><b>Note :</b> Not need tamil language convert please press Ctrl+g key.</p>
						  </div>
						</div>
						<div class="form-group">
						  <label for="inputPassword3" class="col-sm-2 control-label"></label>
						  <div class="col-sm-6"><?php echo $message; ?></div>
						</div>
					  </div>
					  <!-- /.box-body -->
					  
					 
			</div>
        </div>
        <!-- /.box-body -->
        <div class="box-footer">
          <a href="<?php echo base_url(); ?>studio/news_list" class="btn btn-primary">Back</a>
		  <button type="submit" class="btn btn-info pull-right">Submit</button>
        </div>
		<?php echo form_close();?>
        <!-- /.box-footer-->
      </div>
      <!-- /.box -->

    </section>
    <!-- /.content -->
  </div>
 <?php $this->load->view('admin/footer'); ?>
 <script>
	function OnLoad() {                
		var options = {
			sourceLanguage:
			google.elements.transliteration.LanguageCode.ENGLISH,
			destinationLanguage:
			[google.elements.transliteration.LanguageCode.TAMIL],
			shortcutKey: 'ctrl+g',
			transliterationEnabled: true
		};

		var control = new
		google.elements.transliteration.TransliterationControl(options);
		control.makeTransliteratable(["news"]);
		} //end onLoad function

	google.setOnLoadCallback(OnLoad);

	</script>