File manager - Edit - /var/www/html/portalHomolog/resources/views/admin/validacaoDocumentos/edit.blade.php
Back
@extends('layouts.admin.theme') @section("title", env("APP_NAME") . " :: Editar Documento") @section('content') <form action="{{ route('admin.validacaoDocumentos.update', $documento->id) }}" method="post" enctype="multipart/form-data"> <div class="container mt-4"> <div class="row"> <div class="col-12"> <div class="card shadow"> <div class="card-header bg-primary text-white d-flex justify-content-between align-items-center mb-3"> <h5 class="mb-0">Novo Documento</h5> </div> <div class="card-body"> @csrf @method('patch') @include("errors.messageFlash") <div class="mb-3"> <label for="categoria" class="form-label text-bold">Categoria: <span class="span-admin-create">*</span></label> <input type="hidden" class="form-control @error('user_id') is-invalid @enderror" name="user_id" id="user_id" value="{{ old('user_id') }}"> <select class="form-control @error('categoria') is-invalid @enderror" name="categoria" id="categoria" required="true"> @foreach(App\Enums\StatusTipoDocumentoEnum::cases() as $status) <option value="{{ $status->name }}" {{ old('categoria', $documento->categoria) == $status->name ? 'selected' : '' }}>{{ $status->value }}</option> @endforeach </select> @error('categoria') <small class="text-danger text-bold">{{ $message }}</small> @enderror </div> <div class="mb-3 text-wrap"> <label for="resumo" class="form-label text-bold">Resumo: <span class="span-admin-create">*</span></label> <textarea class="form-control textarea-comments @error('resumo') is-invalid @enderror" style="height: 200px" name="resumo" id="resumo">{{ old('resumo', $documento->resumo ) }}</textarea> @error('resumo') <small class="text-danger text-bold">{{ $message }}</small> @enderror </div> <div class="mb-3"> <div class="list-group mb-3"> <a class="list-group-item list-group-item-action active" aria-current="true"> <h5 class="mb-1">Solicitante</h5> <small class="text-warning" style="cursor: pointer">* Preencha todos os campos</small> </a> <div class="list-group-item list-group-item-action"> <div class="mb-1"> <div class="mb-3 mt-4 alert alert-info d-none" id="mensagemDocumento"></div> <div class="mb-3"> <label for="type" class="form-label text-bold">CPF: <span class="span-admin-create">*</span></label> <input type="text" class="form-control @error('cpf') is-invalid @enderror bg-light" name="cpf" id="cpf" autocomplete="off" value="{{ old('cpf', $documento->user->cpf) }}" oninput="javascript:aplicarMascaraCPF(this)" autocomplete="off" required="true" readonly="true"> @error('cpf') <small class="text-danger text-bold">{{ $message }}</small> @enderror </div> <div class="mb-3"> <label for="matriculation" class="form-label text-bold">Matrícula:</label> <input type="text" class="form-control @error('matriculation') is-invalid @enderror" name="matriculation" id="matriculation" autocomplete="off" value="{{ old('matriculation', $documento->user->matriculation) }}"> @error('matriculation') <small class="text-danger text-bold">{{ $message }}</small> @enderror </div> <div class="mb-3"> <label for="nome" class="form-label text-bold">Nome completo: <span class="span-admin-create">*</span></label> <input type="text" class="form-control @error('nome') is-invalid @enderror" name="nome" id="nome" autocomplete="off" value="{{ old('nome', $documento->user->firstName ." ". $documento->user->lastName) }}" required="true"> @error('nome') <small class="text-danger text-bold">{{ $message }}</small> @enderror </div> <div class="mb-3"> <label for="telefone" class="form-label text-bold">Telefone: <span class="span-admin-create">*</span></label> <input type="text" class="form-control @error('telefone') is-invalid @enderror" name="telefone" id="telefone" autocomplete="off" value="{{ old('telefone', $documento->user->phoneNumber) }}" required="true"> @error('telefone') <small class="text-danger text-bold">{{ $message }}</small> @enderror </div> <div class="mb-3"> <label for="email" class="form-label text-bold">Email: <span class="span-admin-create">*</span></label> <input type="email" class="form-control @error('email') is-invalid @enderror bg-light" name="email" id="email" autocomplete="off" value="{{ old('email', $documento->user->email) }}" required="true" readonly="true"> @error('email') <small class="text-danger text-bold">{{ $message }}</small> @enderror </div> <div class="mb-3"> <label for="nacimento_at" class="form-label">Data de Nascimento: <span class="span-admin-create">*</span></label> <input type="date" class="form-control @error('nacimento_at') is-invalid @enderror" name="nacimento_at" id="nacimento_at" value="{{ old('nacimento_at', $documento->user->pessoa->nacimento_at) }}" required="true"> @error('nacimento_at') <small class="text-danger">{{ $message }}</small> @enderror </div> <div class="mb-3"> <div class="form-check"> <input class="form-check-input" type="checkbox" name="isServidorPublico" id="isServidorPublico" {{ old('isServidorPublico', $documento->isServidorPublico ?? false) ? 'checked' : '' }}> <label class="form-check-label" for="flexCheckDefault"> Selecione esta opação caso esta pessoa seja funcionário público. </label> </div> </div> </div> </div> </div> </div> <div class="mb-3"> @php $extensoesImagem = ['jpg', 'jpeg', 'png', 'gif']; $extensao = pathinfo($documento->documento, PATHINFO_EXTENSION); @endphp @if (in_array(strtolower($extensao), $extensoesImagem)) <img src="{{ asset($documento->documento) }}" alt="Comprovante" class="img-fluid rounded-2" width="250px"> @elseif (strtolower($extensao) === 'pdf') <a href="{{ asset($documento->documento) }}" class="text-primary" target="_blank" download><i class="fa-solid fa-download"></i> Baixar PDF</a> @else <span class="text-muted">Arquivo não suportado</span> @endif </div> <div class="mb-3"> <label for="documento" class="form-label text-bold">Selecione um documento: <span class="span-admin-create">*</span></label> <input type="file" class="form-control" name="documento" id="documento" accept="image/jpeg,image/jpg,image/png,image/gif,.pdf" /> @error('documento') <small class="text-danger">{{ $message }}</small> @enderror </div> <div class="mb-3"> <label for="status" class="form-label text-bold">Status: <span class="span-admin-create">*</span></label> <select class="form-control @error('status') is-invalid @enderror" name="status" id="status"> @foreach(App\Enums\StatusEnum::cases() as $status) <option value="{{ $status->name }}">{{ $status->value }}</option> @endforeach </select> @error('status') <small class="text-danger text-bold">{{ $message }}</small> @enderror </div> @include('components.buttons._backAndSend', [ 'textBack' => 'Voltar', 'textSend' => 'Cadastrar', 'routeBack' => 'admin.validacaoDocumentos.index' ] ) </div> </div> </div> </div> </div> </form> @endsection
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings