@extends('layouts.app') @section('title', __( 'user.edit_user' )) @section('content') @lang( 'user.edit_user' ) {!! Form::open(['url' => action('ManageUserController@update', [$user->id]), 'method' => 'PUT', 'id' => 'user_edit_form' ]) !!} @component('components.widget', ['class' => 'box-primary']) {!! Form::label('surname', __( 'business.prefix' ) . ':') !!} {!! Form::text('surname', $user->surname, ['class' => 'form-control', 'placeholder' => __( 'business.prefix_placeholder' ) ]); !!} {!! Form::label('first_name', __( 'business.first_name' ) . ':*') !!} {!! Form::text('first_name', $user->first_name, ['class' => 'form-control', 'required', 'placeholder' => __( 'business.first_name' ) ]); !!} {!! Form::label('last_name', __( 'business.last_name' ) . ':') !!} {!! Form::text('last_name', $user->last_name, ['class' => 'form-control', 'placeholder' => __( 'business.last_name' ) ]); !!} {!! Form::label('email', __( 'business.email' ) . ':*') !!} {!! Form::text('email', $user->email, ['class' => 'form-control', 'required', 'placeholder' => __( 'business.email' ) ]); !!} {!! Form::checkbox('is_active', $user->status, $is_checked_checkbox, ['class' => 'input-icheck status']); !!} {{ __('lang_v1.status_for_user') }} @show_tooltip(__('lang_v1.tooltip_enable_user_active')) @endcomponent @component('components.widget', ['title' => __('lang_v1.roles_and_permissions')]) {!! Form::checkbox('allow_login', 1, !empty($user->allow_login), [ 'class' => 'input-icheck', 'id' => 'allow_login']); !!} {{ __( 'lang_v1.allow_login' ) }} @if(empty($user->allow_login)) {!! Form::label('username', __( 'business.username' ) . ':') !!} @if(!empty($username_ext)) {!! Form::text('username', null, ['class' => 'form-control', 'placeholder' => __( 'business.username' ) ]); !!} {{$username_ext}} @else {!! Form::text('username', null, ['class' => 'form-control', 'placeholder' => __( 'business.username' ) ]); !!} @endif @lang('lang_v1.username_help') @endif {!! Form::label('password', __( 'business.password' ) . ':') !!} {!! Form::password('password', ['class' => 'form-control', 'placeholder' => __( 'business.password'), 'required' => empty($user->allow_login) ? true : false ]); !!} @lang('user.leave_password_blank') {!! Form::label('confirm_password', __( 'business.confirm_password' ) . ':') !!} {!! Form::password('confirm_password', ['class' => 'form-control', 'placeholder' => __( 'business.confirm_password' ), 'required' => empty($user->allow_login) ? true : false ]); !!} {!! Form::label('role', __( 'user.role' ) . ':*') !!} @show_tooltip(__('lang_v1.admin_role_location_permission_help')) {!! Form::select('role', $roles, !empty($user->roles->first()->id) ? $user->roles->first()->id : null, ['class' => 'form-control select2', 'style' => 'width: 100%;']); !!} @lang( 'role.access_locations' ) @show_tooltip(__('tooltip.access_locations_permission')) {!! Form::checkbox('access_all_locations', 'access_all_locations', !is_array($permitted_locations) && $permitted_locations == 'all', [ 'class' => 'input-icheck']); !!} {{ __( 'role.all_locations' ) }} @show_tooltip(__('tooltip.all_location_permission')) @foreach($locations as $location) {!! Form::checkbox('location_permissions[]', 'location.' . $location->id, is_array($permitted_locations) && in_array($location->id, $permitted_locations), [ 'class' => 'input-icheck']); !!} {{ $location->name }} @endforeach @endcomponent @component('components.widget', ['title' => __('sale.sells')]) {!! Form::label('cmmsn_percent', __( 'lang_v1.cmmsn_percent' ) . ':') !!} @show_tooltip(__('lang_v1.commsn_percent_help')) {!! Form::text('cmmsn_percent', !empty($user->cmmsn_percent) ? @num_format($user->cmmsn_percent) : 0, ['class' => 'form-control input_number', 'placeholder' => __( 'lang_v1.cmmsn_percent' )]); !!} {!! Form::label('max_sales_discount_percent', __( 'lang_v1.max_sales_discount_percent' ) . ':') !!} @show_tooltip(__('lang_v1.max_sales_discount_percent_help')) {!! Form::text('max_sales_discount_percent', !is_null($user->max_sales_discount_percent) ? @num_format($user->max_sales_discount_percent) : null, ['class' => 'form-control input_number', 'placeholder' => __( 'lang_v1.max_sales_discount_percent' ) ]); !!} {!! Form::checkbox('selected_contacts', 1, $user->selected_contacts, [ 'class' => 'input-icheck', 'id' => 'selected_contacts']); !!} {{ __( 'lang_v1.allow_selected_contacts' ) }} @show_tooltip(__('lang_v1.allow_selected_contacts_tooltip')) {!! Form::label('selected_contacts', __('lang_v1.selected_contacts') . ':') !!} {!! Form::select('selected_contact_ids[]', $contacts, $contact_access, ['class' => 'form-control select2', 'multiple', 'style' => 'width: 100%;' ]); !!} @endcomponent @include('user.edit_profile_form_part', ['bank_details' => !empty($user->bank_details) ? json_decode($user->bank_details, true) : null]) @if(!empty($form_partials)) @foreach($form_partials as $partial) {!! $partial !!} @endforeach @endif @lang( 'messages.update' ) {!! Form::close() !!} @stop @section('javascript') @endsection
@lang('lang_v1.username_help')
@lang('user.leave_password_blank')