@extends('flatlab::layout')

@section('header_title')
Crear Usuario
@endsection

@section('main-content')
<div class='col-lg-6 col-lg-offset-3'>
    <div class="panel">
        <div class="panel-heading">
            <h3><i class='fa fa-user-plus'></i> Crear un Usuario Nuevo</h3>
        </div>
        <div class="panel-body">
            {{ Form::open(['route' => 'users.store']) }}
                <div class="form-group">
                    {{ Form::label('name', 'Nombre') }}
                    {{ Form::text('name', '', array('class' => 'form-control')) }}
                </div>
                <div class="form-group">
                    {{ Form::label('email', 'Email') }}
                    {{ Form::email('email', '', array('class' => 'form-control')) }}
                </div>
                @foreach ($roles as $role)
                {{ Form::checkbox('roles[]',  $role->id ) }}
                {{ Form::label($role->name, ucfirst($role->name)) }}<br>
                @endforeach
                <div class="form-group">
                    {{ Form::label('password', 'Contraseña') }}<br>
                    {{ Form::password('password', array('class' => 'form-control')) }}
                </div>
                <div class="form-group">
                    {{ Form::label('password', 'Confirmar Contraseña') }}<br>
                    {{ Form::password('password_confirmation', array('class' => 'form-control')) }}
                </div>
                {{ Form::hidden('settings' , '[]') }}
                {{ Form::submit('Crear', array('class' => 'btn btn-primary')) }}
            {{ Form::close() }}
            <hr>
            @include('flatlab::errors.list') 
        </div>
    </div>
</div>


@endsection

@push('extra_css')
    <!-- Enviar un css a la vista principal-->
@endpush

@push('plugins_js')
    <!-- Enviar un plugin a la vista principal-->
@endpush

@push('extra_scripts')
    <!-- Enviar un script a la vista principal-->
@endpush
