@extends('layouts.default')
@extends('content_wrappers.md-8')

@section('title', '| Add User')
@section('heading', 'Edit User')

@section('content')
    {{ Form::open(array('url' => 'users')) }}

    <div class="form-group">
        {{ Form::label('name', 'Name') }}
        {{ Form::text('name', '', array('class' => 'form-control')) }}
    </div>

    <div class="form-group">
        {{ Form::label('email', 'Email') }}
        {{ Form::email('email', '', array('class' => 'form-control')) }}
    </div>

    <div class="form-group">
        {{ Form::label('password', 'Password') }}<br>
        {{ Form::password('password', array('class' => 'form-control')) }}
    </div>

    <div class="form-group">
        {{ Form::label('password', 'Confirm Password') }}<br>
        {{ Form::password('password_confirmation', array('class' => 'form-control')) }}
    </div>

    @if(in_array('AssignRole',$allperms))
      <h1>Roles</h1>
      @foreach ($roles as $role)
        <div class='col-md-6'>
          <div class='form-group'>
            {{ Form::checkbox('r_'.$role->id,$role->id)}}
            {{ Form::label('name', $role->name) }}
          </div>
        </div>
      @endforeach
    @endif

    {{ Form::submit('Add', array('class' => 'btn btn-primary')) }}

    {{ Form::close() }}
@endsection