<?php $__env->startSection('page-title', "Agregar archivo"); ?>

<?php $__env->startSection('content'); ?>

<section class="page-header">
  <div class="page-header__bg" style="background-image: url(<?php echo e(asset('assets/images/header.jpg')); ?>);"></div>
  <div class="container">
    <h2>Agregar archivos</h2>
    <ul class="thm-breadcrumb list-unstyled">
        <li class="text-white"><a href="<?php echo e(url('/')); ?>">Inicio</a></li>
    </ul>
  </div>
</section>

<div class="container" style="left: 40; padding:2em;">

  <h3>
    <?php echo e($content->title); ?> <br>
    <small>
      Formatos admitidos: Imágenes( JPG, PNG, BMP), Archivos (PDF, Excel).
    </small>
  </h3>

  <div class="panel panel-primary">
    <div class="panel-heading">
      <div class="panel-body dz-text-color">
        <?php /* <?php echo Form::open(['url' => route('archivos.store'), 'files'=>true, 'id'=>'user-form']); ?> */ ?>
        <?php echo Form::open(['route' => 'archivos.store', 'files' => true, 'id' => 'user-form']); ?>

          <?php echo e(Form::hidden('id', $content->id)); ?>


          <?php $nameInput='name'; $nameObj='Nombre de Archivo'; ?>
          <div class="form-group col-xs-12 list-group-item <?php if($errors->first($nameInput)): ?> has-error <?php endif; ?>  ">
            <?php echo e(Form::label($nameInput, $nameObj,['class'=>'control-label'])); ?>

            <?php echo e(Form::text($nameInput, $content->title, ['id'=>$nameInput,'placeholder'=>$nameObj,'class'=>'form-control'])); ?>

            <?php if($errors->first($nameInput)): ?><div class="label label-danger"><?php echo e($errors->first($nameInput)); ?> </div><?php endif; ?>
          </div>

          <?php $nameInput='description'; $nameObj='Descripción del Archivo'; ?>
          <div class="form-group col-xs-12 list-group-item <?php if($errors->first($nameInput)): ?> has-error <?php endif; ?>  ">
            <?php echo e(Form::label($nameInput, $nameObj,['class'=>'control-label'])); ?>

            <?php echo e(Form::textarea($nameInput, '', ['id'=>$nameInput,'placeholder'=>$nameObj,'class'=>'form-control file-path validate materialize-textarea'])); ?>

            <?php if($errors->first($nameInput)): ?><div class="label label-danger"><?php echo e($errors->first($nameInput)); ?> </div><?php endif; ?>
          </div>

          <?php $nameInput='files'; $nameObj='Adjuntar Archivo'; ?>
          <div class="form-group col-xs-12 list-group-item file-field input-field <?php if($errors->first($nameInput)): ?> has-error <?php endif; ?>  ">
            <div class="file-field input-field">
              <div class="btn">
                <span><?php echo e($nameObj); ?></span>
                <?php echo e(Form::file($nameInput , ['id'=>$nameInput,'placeholder'=>$nameObj,'class'=>'form-control'])); ?>

              </div>
              <div class="file-path-wrapper">
                <input class="file-path validate" type="text" placeholder="Seleccionar archivo">
              </div>
            </div>
            <?php if($errors->first($nameInput)): ?><div class="label label-danger"><?php echo e($errors->first($nameInput)); ?> </div><?php endif; ?>
          </div>

          <div class="row">
            <div class="col-md-12">
              <button type="submit" class="btn btn-primary btn-lg btn-block waves-effect waves-light">
                <i class="fa fa-save"></i> Guardar Archivo Sellecionado
              </button>
            </div>
          </div>

        <?php echo (Form::close());; ?>

      </div>
    </div>
  </div>

</div>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>

<?php $__env->stopSection(); ?>

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