<?php Fun::lang() ?>
            @php $user_type = @$user->user_type??request('user_type'); @endphp
            <div class="form-group col-sm-12 col-xs-12">
                <div class="col-sm-4 col-xs-12 ">
                    <label class="">{{__('administrator.image')}} </label>
                </div>
                <div class="col-sm-8">
                    <input type="file" class="form-control" name="photo">
                    {!! Form::hidden('photo_text', @$user->photo??null) !!}
                </div>
            </div>
            <div class="form-group col-sm-12 col-xs-12">
                <div class="col-sm-4 col-xs-12 ">
                    <label class="required">{{__('administrator.name')}} </label>
                </div>
                <div class="col-sm-8">
                    {!! Form::text('name', null, array('placeholder' => __('administrator.name'),'class' => 'form-control','required')) !!}
                    {!! Form::hidden('user_type', $user_type , array('placeholder' => __('administrator.name'),'required')) !!}
                </div>
            </div>
            <div class="form-group col-sm-12 col-xs-12">
                <div class="col-sm-4 col-xs-12 ">
                    <label class="required">{{__('administrator.gender')}} </label>
                </div>
                <div class="col-sm-8 col-xs-12">
                    {!! Form::select('gender', [''=>__('administrator.please_select'),'male'=>__('administrator.male'),'female'=>__('administrator.female')],null, array('class' => 'form-control select2','required')) !!}
                </div>
            </div>
            <div class="form-group col-sm-12 col-xs-12">
                <div class="col-sm-4 col-xs-12 ">
                    <label>{{__('administrator.contact')}}</label>
                </div>
                <div class="col-sm-8 col-xs-12">
                    {!! Form::text('phone', null, array('placeholder' => __('administrator.contact'),'class' => 'form-control')) !!}
                </div>
            </div>
            <div class="form-group col-sm-12 col-xs-12">
                <div class="col-sm-4 col-xs-12 ">
                    <label class="required">{{__('administrator.email')}}</label>
                </div>
                <div class="col-sm-8 col-xs-12">
                    {!! Form::email('email', null, array('placeholder' => __('administrator.email'),'class' => 'form-control','required')) !!}
                </div>
            </div>
            @if($user_type==='user')
            <div class="form-group col-sm-12 col-xs-12">
                <div class="col-sm-4 col-xs-12 ">
                    <label class="required">{{__('administrator.roles')}} </label>
                </div>
                <div class="col-sm-8 col-xs-12">
                    {!! Form::select('roles[]', $roles,@$role_val?$role_val->name:'', array('class' => 'form-control select2','required')) !!}
                </div>
            </div>
            @endif
            <div class="form-group col-sm-12 col-xs-12">
                <div class="col-sm-4 col-xs-12 ">
                    <label class="">{{__('administrator.password')}}</label>
                </div>
                <div class="col-sm-8 col-xs-12">
                    {!! Form::password('password', array('placeholder' => __('administrator.password'),'class' => 'form-control')) !!}
                </div>
            </div>
            <div class="form-group col-sm-12 col-xs-12">
                <div class="col-sm-4 col-xs-12 ">
                    <label class="">{{__('administrator.confirm_password')}}</label>
                </div>
                <div class="col-sm-8 col-xs-12">
                    {!! Form::password('confirm_password', array('placeholder' => __('administrator.confirm_password'),'class' => 'form-control')) !!}
                </div>
            </div>
            @if($user_type==='seller')
            <div class="form-group col-sm-12 col-xs-12">
                <div class="col-sm-4 col-xs-12 ">
                    <label class="">{{__('administrator.commission')}} (%)</label>
                </div>
                <div class="col-sm-8 col-xs-12">
                    {!! Form::number('commission',null, array('placeholder' => __('administrator.commission'),'class' => 'form-control')) !!}
                </div>
            </div>
            @endif
{!! Form::submit('Submit', ['class' => 'hidden']) !!}


