@extends('adminlte::page') @section('title', 'Edit User') @section('content_header')

Edit User

@endsection @section('content') @php use App\Models\User; @endphp
{!! html()->modelForm($user, 'PUT', route('users.update', $user->id))->id('editUserForm')->open() !!}

General

{{-- Full Name and Alias --}}
{!! html()->label('Full Name *', 'full_name')->toHtml() !!} {!! html()->text('full_name')->class('form-control')->placeholder('Enter Full Name') !!}
{!! html()->label('Alias *', 'alias')->toHtml() !!} {!! html()->text('alias')->class('form-control')->placeholder('Enter Alias') !!}
{{-- Email and Username --}}
{!! html()->label('Email Address *', 'email')->toHtml() !!} {!! html()->email('email')->class('form-control')->placeholder('Enter Email Address')->attribute('readonly', true) !!}
{!! html()->label('Username *', 'username')->toHtml() !!} {!! html()->text('username')->class('form-control')->placeholder('Enter Username')->attribute('readonly', true) !!}
{{-- Role and Site --}}
{!! html()->label('Role *', 'role')->toHtml() !!} {!! html()->select('role', ['' => 'Select Role'] + User::$user_types_names)->class('form-control') !!}
{{-- Site Selection --}} {!! html()->label('Site *', 'site')->toHtml() !!} {!! html()->multiselect('site[]', $masterSites->toArray())->value($selectedSiteId)->class('form-control select2')->id('sel2Category')->attribute('multiple') !!}
{{-- Status --}}
{!! html()->label('Status *', 'is_active')->toHtml() !!} {!! html()->select('is_active', [ '' => 'Select Status', '1' => 'Active', '0' => 'Inactive', ])->class('form-control') !!}
{!! html()->label('Enable Add/Edit Opportunities', 'is_able_opportunities')->toHtml() !!}
{!! html()->checkbox('is_able_opportunities')->id('is_able_opportunities')->class('form-check-input') !!}
{{-- Created By and Created Date --}}
{!! html()->label('Created By', 'created_by')->toHtml() !!} {!! html()->select('created_by', $userList, $user->created_by)->class('form-control custom-select')->placeholder('Created By')->attribute('disabled', true) !!}
{!! html()->label('Created Date', 'created_at')->toHtml() !!} {!! html()->text('created_at')->class('form-control')->placeholder('Created Date')->value(optional($user->created_at)->format('d-m-Y'))->attribute('disabled', true) !!}
{{-- Action Buttons --}}
Cancel
{!! html()->form()->close() !!}
@endsection @push('js') @endpush