@php $authDesignation = $letterPad->employee_designation_id ?? (auth()->user()->employeeMaster->employee_designation_id ?? null); $authSignatureName = $letterPad->signature_name ?? (auth()->user()->name ?? null); @endphp @extends('admin.layouts.layouts') @section('title', 'Edit | Letter Pad') @section('page-css') @endsection @section('content')
{!! Form::model($letterPad, [ 'route' => ['letter-pad.update', $letterPad->id], 'method' => 'PUT', 'id' => 'update-form', 'enctype' => 'multipart/form-data', 'autocomplete' => 'off', ]) !!} @csrf
Edit Letter Pad
{!! Form::label('location', 'Location', ['class' => 'form-label']) !!} * {!! Form::select('location', $locations, $letterPad->location_id, [ 'class' => 'form-control select2', 'placeholder' => 'Select Location', 'data-parsley-required' => true, 'data-parsley-required-message' => 'Please select location.', 'data-parsley-errors-container' => '#location_error', ]) !!}
{!! Form::label('subject', 'Subject', ['class' => 'form-label']) !!} * {!! Form::text('subject', null, [ 'class' => 'form-control', 'placeholder' => 'Enter Subject', 'data-parsley-required' => true, 'data-parsley-required-message' => 'Please enter subject.', 'data-parsley-errors-container' => '#subject_error', ]) !!}
{!! Form::label('', 'Header', ['class' => 'form-label']) !!} *
{!! Form::label('from', 'From', ['class' => 'form-label']) !!}
@foreach (['Yes', 'No'] as $option)
@endforeach
{!! Form::label('to', 'To', ['class' => 'form-label']) !!} * {!! Form::textarea('to', null, [ 'rows' => 3, 'class' => 'form-control', 'placeholder' => 'Enter Recipient Name', 'data-parsley-required' => true, 'data-parsley-required-message' => 'Please enter recipient name.', 'data-parsley-errors-container' => '#to_error', ]) !!}
{!! Form::label('description', 'Description', ['class' => 'form-label']) !!} * {!! Form::textarea('description', null, [ 'class' => 'form-control', 'rows' => 4, 'placeholder' => 'Enter Description', 'data-parsley-required' => true, 'data-parsley-required-message' => 'Please enter description.', 'data-parsley-errors-container' => '#description_error', ]) !!}
{!! Form::label('file', 'Upload File', ['class' => 'form-label']) !!} *
{!! Form::file('file', [ 'class' => 'form-control', 'accept' => '.jpg,.jpeg,.png,.pdf', 'data-parsley-filetype' => 'jpg,jpeg,png,pdf', 'data-parsley-errors-container' => '#file_error', ]) !!} @if (!empty($letterPad->file))
@endif
{!! Form::label('', 'Signature', ['class' => 'form-label']) !!} *
{!! Form::label('signature_name', 'Signature Name', ['class' => 'form-label']) !!} * {!! Form::text('signature_name', $authSignatureName, [ 'class' => 'form-control', 'placeholder' => 'Enter Signature Name', 'data-parsley-required' => true, 'data-parsley-required-message' => 'Please enter signature name.', 'data-parsley-errors-container' => '#signature_name_error', 'readonly' => !in_array(auth()->user()->email, [ 'nikhil@aaryagroup.us', 'nikhil@aaryagroup.com', 'jigarpatel.vhits@yopmail.com', 'jigarpatel.vhits@gmail.com', ]), ]) !!}
{!! Form::close() !!}
@endsection @section('page-js') @endsection