@extends('layouts.web')

@section('page-title', 'Edición de Album')

@section('content')
<h1 class="headerSection">Edición de Album <br><small> editar</small></h1>
<hr> 
 
<div class="container bootstrap-iso" style="left: 40; padding:2em;"> 
    {!! Form::open(['method'=>'PUT','route' => array('albums.update',$album->id), 'files' => true, 'id' => 'documento-form']) !!} 
  
       
        
        <?php $nameInput='publish_up'; $nameObj='Fecha de Publicación'; ?>
        <div class="form-group col-xs-12 list-group-item @if($errors->first($nameInput)) has-error @endif  ">
            {{Form::label($nameInput, $nameObj,['class'=>'control-label datepicker','data-provide'=>'datepicker'])}}
            {{Form::text($nameInput, $album->publish_up, ['id'=>$nameInput,'placeholder'=>$nameObj,'class'=>'form-control datepicker', 'required' => 'required'])}}
            @if($errors->first($nameInput))<div class="new badge red">{{ $errors->first($nameInput) }} </div>@endif
        </div>

        <?php $nameInput='album'; $nameObj='Título'; ?>
        <div class="form-group col-xs-12 list-group-item @if($errors->first($nameInput)) has-error @endif  ">
            {{Form::label($nameInput, $nameObj,['class'=>'control-label'])}}
            {{Form::text($nameInput, $album->album, ['id'=>$nameInput,'placeholder'=>$nameObj,'class'=>'form-control' ])}}
            @if($errors->first($nameInput))<div class="new badge red">{{ $errors->first($nameInput) }} </div>@endif
        </div> 

       <?php $nameInput='description'; $nameObj='Descripción del recurso'; ?>
        <div class="form-group col-xs-12 list-group-item @if($errors->first($nameInput)) has-error @endif  ">
            {{Form::label($nameInput, $nameObj,['class'=>'control-label'])}}
            {{Form::text($nameInput, $album->description, ['id'=>$nameInput,'placeholder'=>$nameObj,'class'=>'form-control' ])}}
            @if($errors->first($nameInput))<div class="new badge red">{{ $errors->first($nameInput) }} </div>@endif
        </div>   
      
      <hr>
      <div class="row">
            <div class="col-md-12">
                    <button type="submit" id="send" class="send btn btn-primary btn-lg btn-block waves-effect waves-light">
                            <i class="fa fa-save"></i> Guardar Datos
                    </button>
            </div>
      </div>
      <div class="row">
            <div class="col-md-12">
                    <a class="btn btn-danger btn-lg btn-block waves-effect waves-light" href="{{route('albums.index')}}">
                            <i class="fa fa-close"></i> Cancelar
                    </a>
            </div>
      </div>
      <hr>
    {!! Form::close() !!}
</div>

  @include('partials.modal')

@stop

@section('scripts')

    @include('partials.tinymce')
    @include('partials.scripts')
     
@stop