@extends('layouts.app') @section('content')

@lang('global.users.title')

{!! Form::open(['method' => 'POST', 'route' => ['admin.users.store', $contact_id],'class'=>'formvalidation' ]) !!}
@lang('global.app_create')
{!! Form::label('name', trans('global.users.fields.name').'*', ['class' => 'control-label form-label']) !!}
{!! Form::text('name', old('name', $contact->name), ['class' => 'form-control', 'placeholder' => 'Name', 'required' => '', 'readonly' => true]) !!}

@if($errors->has('name'))

{{ $errors->first('name') }}

@endif
{!! Form::label('email', trans('global.users.fields.email').'*', ['class' => 'control-label form-label']) !!}
{!! Form::email('email', old('email', $contact->email), ['class' => 'form-control', 'placeholder' => 'Email', 'required' => '', 'readonly' => true]) !!}

@if($errors->has('email'))

{{ $errors->first('email') }}

@endif
{!! Form::label('password', trans('global.users.fields.password').'', ['class' => 'control-label form-label']) !!}{!! digi_get_help( trans( 'global.users.password_help' ) ) !!}
{!! Form::password('password', ['class' => 'form-control', 'placeholder' => 'Password']) !!}

@if($errors->has('password'))

{{ $errors->first('password') }}

@endif
{!! Form::label('role', trans('global.users.fields.role').'*', ['class' => 'control-label']) !!} {!! Form::select('role[]', $roles, old('role', $role_ids), ['class' => 'form-control select2', 'multiple' => 'multiple', 'id' => 'selectall-role' , 'required' => '']) !!}

@if($errors->has('role'))

{{ $errors->first('role') }}

@endif
{!! Form::label('department_id', trans('global.users.fields.department').'', ['class' => 'control-label']) !!} @if ( Gate::allows('department_create')) @if( 'button' === $addnew_type )   @else   @endif @endif {!! Form::select('department_id', $departments, old('department_id'), ['class' => 'form-control select2']) !!}

@if($errors->has('department_id'))

{{ $errors->first('department_id') }}

@endif