File: /var/www/vhost/disk-apps/demo-sigedo.teky.com.co/resources/views/userdocuments/form.blade.php
@csrf
<div class="card-body">
<div class="form-row">
<div class="form-group col-md-12">
<label for="filetype_id">@lang('filetypes')*</label>
<select class="form-control select2" id="filetype_id" name="filetype_id"
value="{{ $userdocument->filetype_id ?? old('filetype_id') }}">
<option value="0" {{ !isset($userdocument) ? 'selected disabled' : '' }}>@lang('select')</option>
@forelse ($filetypes as $filetype)
<option value="{{ $filetype->id }}" term="{{ $filetype->term }}"
{{ isset($userdocument) && $userdocument->filetype_id == $filetype->id || !isset($userdocument) && $filetype_id == $filetype->id ? 'selected' : '' }}>
@lang($filetype->name)
</option>
@empty
<option value="0" disabled>@lang('no_options')</option>
@endforelse
</select>
</div>
<div class="form-group col-md-12">
<label for="expedition_date">@lang('expedition_date')*</label>
<div class="input-group">
<input id="expedition_date" name="expedition_date" class="form-control datepicker"
placeholder="yyyy-mm-dd" value="{{ $userdocument->expedition_date ?? old('expedition_date') }}">
</div>
</div>
<div class="form-group col-md-12">
<label for="expiration_date">@lang('expiration_date')</label>
<div class="input-group">
@can('user_showInfoRoot')
<input id="expiration_date" name="expiration_date" class="form-control datepicker"
placeholder="yyyy-mm-dd" value="{{ $userdocument->expiration_date ?? old('expiration_date') }}">
@else
<input id="expiration_date" name="expiration_date" class="form-control datepicker" disabled
placeholder="yyyy-mm-dd" value="{{ $userdocument->expiration_date ?? old('expiration_date') }}">
@endcan
</div>
</div>
<div class="form-group col-md-12">
<label class="ul-form__label">@lang('file')</label>
<div class="input-group mb-3">
<div class="custom-file">
<label class="custom-file-label" for="filepath" aria-describedby="inputGroupFileAddon02">@lang('choose_file')</label>
<input type="file" class="custom-file-input" id="filepath" name="filepath" maximum_file_size="{{$maximum_file_size}}">
</div>
</div>
</div>
<div class="form-group col-md-12">
<div class="card-body">
<label class="switch switch-secondary mr-3">
<span>@lang('already_exists_file')</span>
<input type="checkbox" id="already_exists">
<span class="slider"></span>
</label>
</div>
<div class="displayNone form-group col-md-12" id="container_document_upload">
<label for="document_upload_id">@lang('filetypes')*</label>
<select class="form-control select2" id="document_upload_id" name="document_upload_id">
@forelse ($list_documents_upload as $user_document)
<option value="{{ $user_document->id }}">{{ $user_document->filetype->name }}</option>
@empty
<option value="0" disabled>@lang('no_options')</option>
@endforelse
</select>
</div>
</div>
@can('document_access')
<div class="form-group col-md-12">
<label for="filestatus_id">@lang('filestatus')*</label>
<select class="form-control select2" id="filestatus_id" name="filestatus_id"
value="{{ $userdocument->filestatus_id ?? old('filestatus_id') }}">
@forelse ($filestatuses as $filestatus)
<option value="{{ $filestatus->id }}" term="{{ $filestatus->term }}"
{{ isset($userdocument) && $userdocument->filestatus_id == $filestatus->id ? 'selected' : '' }}>
@lang($filestatus->name)
</option>
@empty
<option value="0" disabled>@lang('no_options')</option>
@endforelse
</select>
</div>
<div class="form-group col-md-12 marginTop15 displayNone" id="container_commitment">
<label for="commitment_date">@lang('commitment_date')</label>
<div class="input-group">
<input id="commitment_date" name="commitment_date" class="form-control datepicker"
placeholder="yyyy-mm-dd" value="{{ $userdocument->commitment_date ?? old('commitment_date') }}">
</div>
</div>
<div class="form-group col-md-12 marginTop15">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">@lang('observations')</span>
</div>
<textarea class="form-control" aria-label="@lang('observations')" id="observations" name="observations">{{ $userdocument->observations ?? old('observations') }}</textarea>
</div>
</div>
@endcan
</div>
</div>