<div class="form-group">
    <label  class="col-lg-2 col-sm-2 control-label">{{ trans('ui.user.firstname') }}</label>
    <div class="col-lg-8">

        {!! Form::text('firstname', null, ['class' => 'form-control']) !!}

    </div>
</div>

<div class="form-group">
    <label  class="col-lg-2 col-sm-2 control-label">{{ trans('ui.user.lastname') }}</label>
    <div class="col-lg-8">

        {!! Form::text('lastname', null, ['class' => 'form-control']) !!}

    </div>
</div>

<div class="form-group">
    <label  class="col-lg-2 col-sm-2 control-label">{{ trans('ui.user.username') }}</label>
    <div class="col-lg-8">

        {!! Form::text('username', null, ['class' => 'form-control']) !!}

    </div>
</div>

<div class="form-group">
    <label  class="col-lg-2 col-sm-2 control-label">{{ trans('ui.user.email') }}</label>
    <div class="col-lg-8">

        {!! Form::text('email', null, ['class' => 'form-control']) !!}

    </div>
</div>

<div class="form-group">
    <label  class="col-lg-2 col-sm-2 control-label">{{ trans('ui.user.password') }}</label>
    <div class="col-lg-8">

        {!! Form::password('password', ['class' => 'form-control']) !!}

    </div>
</div>

<div class="form-group">
    <label class="col-lg-2 col-sm-2 control-label">{{ trans('ui.user.password_confirmation') }}</label>
    <div class="col-lg-8">

        {!! Form::password('password_confirmation', ['class' => 'form-control']) !!}

    </div>
</div>

@if(Auth::user() -> can('manage-promotoria'))
<div class="form-group">
    <label  class="col-lg-2 col-sm-2 control-label">{{ trans('ui.promotoria.names') }}</label>
    <div class="col-lg-8">
        {!!  Form::select('promotoria_id', $promotorias ,isset($user -> promotoria_id) ? $user -> promotoria_id : null, array('id' => 'promotoria_id_select','class' => 'form-control'))  !!}
    </div>
</div>
@endif

<div class="form-group">
    <label  class="col-lg-2 col-sm-2 control-label">Sucursal</label>
    <div class="col-lg-8">
        {!!  Form::select('sucursal_id', $sucursales ,isset($user -> sucursal_id) ? $user -> sucursal_id : null, array('id' => 'sucursal_id_select','class' => 'form-control'))  !!}
    </div>
</div>



<div class="form-group">
    <label  class="col-lg-2 col-sm-2 control-label"> Rol</label>
    <div class="col-lg-8">
        {!! Form::select('role_id', $roles, isset($roles_user) ? $roles_user : null, array(
        'id' => 'roleSelect','class'=>'form-control')) !!}
    </div>
</div>

<div class="form-group">
    <div class="col-lg-offset-2 col-lg-8">

        {!! Form::submit($button, ['class' => 'btn btn-primary']) !!}
        <a href = "{{URL::to('auth/user')}}" class = 'btn btn-danger'>Regresar</a>


    </div>
</div>