
<?php $__env->startSection('title'); ?>
Sửa Ảnh
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<div class="">
  <div class="clearfix"></div>
  <div class="row">
    <div class="col-md-12 col-sm-12 col-xs-12">
      <div class="x_panel">
        <div class="x_content">
          <form class="form-horizontal form-label-left" method="post" enctype="multipart/form-data">
            </p>
            <span class="section">Sửa Ảnh</span>
            <?php echo $__env->make('errors.note', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
            <div class="item form-group">
              <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Tiêu đề</label>
              <div class="col-md-6 col-sm-6 col-xs-12">
                <input id="name" class="form-control col-md-7 col-xs-12 input" data-validate-length-range="6" data-validate-words="2" name="title" type="text" value="<?php echo e($get_old->title); ?>">
              </div>
            </div>
             <?php if($get_old->position != 'product' && $get_old->position != 'gallery' && $get_old->position != 'news'): ?> 
            <div class="item form-group">
              <label class="control-label col-md-3 col-sm-3 col-xs-12" for="category">Vị trí </label>
              <div class="col-md-6 col-sm-6 col-xs-12">
                <select id="position" name="position" class="form-control">
               	  <option value="slide" <?php if($get_old->position == 'slide'): ?> selected <?php endif; ?>>Slide</option>
                   <option value="Partner" <?php if($get_old->position == 'Partner'): ?> selected <?php endif; ?>>Đối tác - khách hàng</option>
                   <option value="Chứng nhận" <?php if($get_old->position == 'Chứng nhận'): ?> selected <?php endif; ?>>Chứng nhận</option>
                  <!--<option value="Banner" <?php if($get_old->position == 'Banner'): ?> selected <?php endif; ?>>Banner</option>-->
                </select>
              </div>
            </div>
            <div class="clear"></div>
             <?php endif; ?>
            <?php if($get_old->position == 'product'): ?>
            <div class="item form-group">
              <label class="control-label col-md-3 col-sm-3 col-xs-12" for="category">Sản phẩm</label>
               <div class=" col-md-6 col-sm-6 col-xs-12">
                 <input class="form-control" name="product_name" value="<?php echo e($product->name); ?>" disabled="" type="text">
                 <input type="hidden" name="id_product" value="<?php echo e($product->id); ?>">
               </div>
            </div>
            <div class="clear"></div>
            <?php endif; ?>
             <?php if($get_old->position == 'gallery'): ?>
            <div class="item form-group">
              <label class="control-label col-md-3 col-sm-3 col-xs-12" for="category">Thư viện dự án</label>
               <div class=" col-md-6 col-sm-6 col-xs-12">
                 <input class="form-control" name="gallery_name" value="<?php echo e($to_gallery->name); ?>" disabled="" type="text">
                 <input type="hidden" name="id_gallery" value="<?php echo e($to_gallery->id); ?>">
               </div>
            </div>
            <div class="clear"></div>
            <?php endif; ?>
             <?php if($get_old->position == 'news'): ?>
            <div class="item form-group">
              <label class="control-label col-md-3 col-sm-3 col-xs-12" for="category">Tên bài viết</label>
               <div class=" col-md-6 col-sm-6 col-xs-12">
                 <input class="form-control" name="news_title" value="<?php echo e($news->title); ?>" disabled="" type="text">
                 <input type="hidden" name="id_news" value="<?php echo e($news->id); ?>">
               </div>
            </div>
            <div class="clear"></div>
            <?php endif; ?>
            <div class="item form-group">
              <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Url </label>
              <div class="col-md-6 col-sm-6 col-xs-12">
                <input id="url" class="form-control col-md-7 col-xs-12 input" name="url" type="text" value="<?php echo e($get_old->url); ?>">
              </div>
            </div>
            <?php if($get_old->position == 'product'): ?>
              <div class="item form-group">
                <label for="password" class="control-label col-md-3">Chọn ảnh</label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                  <input type="file" id="fileUpload" name="image" class="form-control col-md-7 col-xs-12">
                </div>
                <div class="clear"></div>
                <?php if(file_exists($get_old->thumb)): ?><div class="col-md-1 col-sm-1 col-xs-12 show-img col-md-offset-3 col-sm-offset-3" id="image-holder"><img src="<?php echo e(url($get_old->thumb)); ?>" class="img-thumbnail"></div> <?php else: ?> <div class="col-md-1 col-sm-1 col-xs-12 show-img col-md-offset-3 col-sm-offset-3"></div> <?php endif; ?>
              </div>
            <?php elseif($get_old->position == 'gallery'): ?>
             <div class="item form-group">
                <label for="password" class="control-label col-md-3">Chọn ảnh</label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                  <input type="file" id="fileUpload" name="image" class="form-control col-md-7 col-xs-12">
                </div>
                <div class="clear"></div>
                <?php if(file_exists($get_old->thumb)): ?><div class="col-md-1 col-sm-1 col-xs-12 show-img col-md-offset-3 col-sm-offset-3" id="image-holder"><img src="<?php echo e(url($get_old->thumb)); ?>" class="img-thumbnail"></div> <?php else: ?> <div class="col-md-1 col-sm-1 col-xs-12 show-img col-md-offset-3 col-sm-offset-3"></div> <?php endif; ?>
              </div>
            <?php elseif($get_old->position == 'news'): ?>
              <div class="item form-group">
                <label for="password" class="control-label col-md-3">Chọn ảnh</label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                  <input type="file" id="fileUpload" name="image" class="form-control col-md-7 col-xs-12">
                </div>
                <div class="clear"></div>
                <?php if(file_exists($get_old->thumb)): ?><div class="col-md-1 col-sm-1 col-xs-12 show-img col-md-offset-3 col-sm-offset-3" id="image-holder"><img src="<?php echo e(url($get_old->thumb)); ?>" class="img-thumbnail"></div> <?php else: ?> <div class="col-md-1 col-sm-1 col-xs-12 show-img col-md-offset-3 col-sm-offset-3"></div> <?php endif; ?>
              </div>
            <?php else: ?>
            <div class="item form-group">
              <label for="password" class="control-label col-md-3">Chọn ảnh</label>
              <div class="col-md-6 col-sm-6 col-xs-12">
                <input type="file" id="fileUpload" name="image" class="form-control col-md-7 col-xs-12">
              </div>
              <div class="col-md-1 col-xs-12 col-sm-1 loading" style="display: none;"><img src="<?php echo e(url('public/images/loading.gif')); ?>" style="width:100%;"></div>
              <?php if(file_exists($get_old->thumb)): ?><div class="col-md-1 col-sm-1 col-xs-12 show-img" id="image-holder"><img src="<?php echo e(url($get_old->thumb)); ?>" class="img-thumbnail"></div> <?php else: ?> <div class="col-md-1 col-sm-1 col-xs-12 show-img" id="image-holder"></div> <?php endif; ?>
            </div>
            <?php endif; ?>
            <div class="item form-group">
              <label for="password" class="control-label col-md-3">Mô tả</label>
              <div class="col-md-6 col-sm-6 col-xs-12">
                <textarea name="description" id="description" class="form-control"><?php echo e($get_old->description); ?></textarea>
              </div>
            </div>
            <div class="ln_solid"></div>
            <div class="form-group">
              <div class="col-md-6 col-md-offset-3">
                <button type="submit" class="btn btn-primary">Cancel</button>
                <input id="submit" name="submit" type="submit" class="btn btn-success" value="Sửa" />
              </div>
            </div>
            <?php echo e(csrf_field()); ?>

          </form>
        </div>
      </div>
    </div>
  </div>
</div>
<script type="text/javascript">
  
</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layout.layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>