@extends('layouts.web')

@section('page-title', 'Registro de Autoridad'))

@section('content')
<h1 class="headerSection">Registro de Autoridades <br><small> nuevo</small></h1>
<hr> 
<div class="container bootstrap-iso" style="left: 40; padding:2em;">
    {!! Form::open(['route' => 'autoridades.store', 'files' => true, 'id' => 'autoridades-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, date('Y-m-d'), ['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='name'; $nameObj='Nombre'; ?>
        <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, '', ['id'=>$nameInput,'placeholder'=>$nameObj,'class'=>'form-control' ])}}
            @if($errors->first($nameInput))<div class="new badge red">{{ $errors->first($nameInput) }} </div>@endif
        </div>

        <?php $nameInput='lastname1'; $nameObj='Apellido Paterno'; ?>
        <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, '', ['id'=>$nameInput,'placeholder'=>$nameObj,'class'=>'form-control' ])}}
            @if($errors->first($nameInput))<div class="new badge red">{{ $errors->first($nameInput) }} </div>@endif
        </div>

       <?php $nameInput='lastname2'; $nameObj='Apellido Materno'; ?>
        <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, '', ['id'=>$nameInput,'placeholder'=>$nameObj,'class'=>'form-control' ])}}
            @if($errors->first($nameInput))<div class="new badge red">{{ $errors->first($nameInput) }} </div>@endif
        </div>        

       <?php $nameInput='position'; $nameObj='Cargo'; ?>
        <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, '', ['id'=>$nameInput,'placeholder'=>$nameObj,'class'=>'form-control' ])}}
            @if($errors->first($nameInput))<div class="new badge red">{{ $errors->first($nameInput) }} </div>@endif
        </div>

       <?php $nameInput='community'; $nameObj='Comunidad'; ?>
        <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, '', ['id'=>$nameInput,'placeholder'=>$nameObj,'class'=>'form-control' ])}}
            @if($errors->first($nameInput))<div class="new badge red">{{ $errors->first($nameInput) }} </div>@endif
        </div>

       <?php $nameInput='movil'; $nameObj='Teléfono Celular'; ?>
        <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, '', ['id'=>$nameInput,'placeholder'=>$nameObj,'class'=>'form-control' ])}}
            @if($errors->first($nameInput))<div class="new badge red">{{ $errors->first($nameInput) }} </div>@endif
        </div>

       <?php $nameInput='email'; $nameObj='Correo electrónico'; ?>
        <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, '', ['id'=>$nameInput,'placeholder'=>$nameObj,'class'=>'form-control' ])}}
            @if($errors->first($nameInput))<div class="new badge red">{{ $errors->first($nameInput) }} </div>@endif
        </div>

       <?php $nameInput='fb'; $nameObj='URL Facebook'; ?>
        <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, '', ['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" onClick="capture()" class="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('autoridades.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