
<?php $__env->startSection('content'); ?>
<div class="row match-height">
    <div class="col-md-12 col-12">
        <div class="card">
            <div class="card-header">
                <h4 class="card-title text-primary">Editando Arquivo</h4>
                <p class="text-muted">Editando Arquivo ou Documento do Sistema</p>
                <a class="btn btn-outline-primary w-100" type="button" href="<?php echo e(route('arquivos.index')); ?>" role="button">Ver
                    todos</a>
            </div>

            <div class="card">
                <div class="card-body">
                    <form action="<?php echo e(route('arquivos.update', $arquivo->id)); ?>" method="POST" class="form-horizontal"
                        enctype="multipart/form-data">
                        <?php echo method_field('PUT'); ?>
                        <?php echo csrf_field(); ?>
                        <div class="box box-info">

                            <div class="form-group">
                                <label class="col-form-label">Título do arquivo</label>
                                <input type="text" name="titulo" value="<?php echo e($arquivo->titulo); ?>"
                                    class="form-control <?php $__errorArgs = ['titulo'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                            </div>

                            <div class="form-group">
                                <label class="control-label">Tipo <span>*</span></label>
                                <select class="form-control select2" name="tipo">
                                    <?php $__currentLoopData = $arquivostipo; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tipo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($tipo->tipo_nome); ?>"
                                            <?php if($arquivo->tipo == $tipo->tipo_nome): ?> selected <?php endif; ?>><?php echo e($tipo->tipo_nome); ?>

                                        </option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                            </div>

                            <div class="form-row">
                                <div class="form-group col-md-6">
                                    <label class="col-form-label">Data do arquivo</label>
                                    <input type="date" name="data" value="<?php echo e($arquivo->data); ?>"
                                        class="form-control <?php $__errorArgs = ['data'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                                </div>

                                <div class="form-group col-md-6">
                                    <label class="col-form-label">Data da publicação</label>
                                    <input type="date" name="publicacao" value="<?php echo e($arquivo->publicacao); ?>"
                                        class="form-control <?php $__errorArgs = ['publicacao'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-form-label">Arquivo já publicado</label>
                                <br>
                                <object data="<?php echo e(url('assets/site/uploads/dom/' . $arquivo->nome)); ?>"
                                    height="100"></object>
                                <br>
                                <div class="form-row">
                                    <div class="form-group col-md-10">
                                        <label class="col-form-label">Novo arquivo</label>
                                        <input type="file" name="nome"
                                            class="form-control <?php $__errorArgs = ['nome'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                                    </div>
                                    <div class="form-group col-md-2">
                                        <label class="control-label">Covid?</label>
                                        <select class="form-control" name="covid" value="<?php echo e($arquivo['covid']); ?>">
                                            <option value="N" <?php if($arquivo['covid'] == 'N'): ?> selected <?php endif; ?>>Não
                                            </option>
                                            <option value="S" <?php if($arquivo['covid'] == 'S'): ?> selected <?php endif; ?>>Sim
                                            </option>
                                        </select>
                                    </div>
                                    <div class="form-group col-md-2">
                                        <label class="control-label">Concurso?</label>
                                        <select class="form-control" name="concurso" value="<?php echo e($arquivo['concurso']); ?>">
                                            <option value="N" <?php if($arquivo['concurso'] == 'N'): ?> selected <?php endif; ?>>Não
                                            </option>
                                            <option value="S" <?php if($arquivo['concurso'] == 'S'): ?> selected <?php endif; ?>>Sim
                                            </option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <br>
                        <div class="form-group">
                            <input type="submit" value="Gravar" class="btn btn-sm btn-outline-success w-100">
                        </div>
                </div>

            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\laragon\www\portalmunicipal\resources\views/admin/arquivos/edit.blade.php ENDPATH**/ ?>