@include('errors.flash')
@if (isset($staff)) {!! Form::model($staff, array('url' => $type . '/' . $staff->id, 'method' => 'put', 'files'=> true)) !!} @else {!! Form::open(array('url' => $type, 'method' => 'post', 'files'=> true)) !!} @endif
{!! Form::label('first_name', trans('staff.first_name'), array('class' => 'control-label required')) !!}
{!! Form::text('first_name', null, array('class' => 'form-control')) !!} {{ $errors->first('first_name', ':message') }}
{!! Form::label('last_name', trans('staff.last_name'), array('class' => 'control-label required')) !!}
{!! Form::text('last_name', null, array('class' => 'form-control')) !!} {{ $errors->first('last_name', ':message') }}
{!! Form::label('phone_number', trans('staff.phone_number'), array('class' => 'control-label required')) !!}
{!! Form::text('phone_number', null, array('class' => 'form-control','data-fv-integer' => 'true')) !!} {{ $errors->first('phone_number', ':message') }}
{!! Form::label('email', trans('staff.email'), array('class' => 'control-label required')) !!}
{!! Form::email('email', null, array('class' => 'form-control')) !!} {{ $errors->first('email', ':message') }}
{!! Form::label('user_group_id', trans('staff.user_group'), array('class' => 'control-label required')) !!}
{!! Form::select('user_group_id', $user_groups, (isset($staff)?$staff->user_group_id:null), array('class' => 'form-control')) !!} {{ $errors->first('user_group_id', ':message') }}
{{-- Role --}}
{!! Form::label('password', trans('staff.password'), array('class' => 'control-label required')) !!}
{!! Form::password('password', array('class' => 'form-control')) !!} {{ $errors->first('password', ':message') }}
{!! Form::label('password_confirmation', trans('staff.password_confirmation'), array('class' => 'control-label required')) !!}
{!! Form::password('password_confirmation', array('class' => 'form-control')) !!} {{ $errors->first('password_confirmation', ':message') }}
{!! Form::label('user_avatar_file', trans('staff.user_avatar'), array('class' => 'control-label')) !!}
@if(isset($staff->user_avatar))
User Image
@endif
{{trans('dashboard.select_image')}} {{trans('dashboard.change')}} {{trans('dashboard.remove')}}
{{ $errors->first('user_avatar_file', ':message') }}
{{trans('table.back')}}
{!! Form::close() !!}
@section('scripts') @stop