<?php $__env->startSection('content'); ?>
<h3 class="card-title">Editar informações de <?php echo e($building->name); ?></h3>

<form id="needs-validation" action="<?php echo e(action('BuildingsController@update', ['id' => $building->id])); ?>" method="POST">
    <?php echo e(csrf_field()); ?>

    <div class="form-row">
        <div class="form-group col-sm-12 col-md-2 col-lg-2">
            <label for="building-status">Status</label>
            <select name="status" id="building-status" class="form-control">
                <option value=1 <?php if($building->status): ?> selected <?php endif; ?>>Ativo</option>
                <option value=0 <?php if(!$building->status): ?> selected <?php endif; ?>>Inativo</option>
            </select>
        </div>
    </div>
    <div class="form-row">
        <div class="form-group col-sm-12 col-md-4 col-lg-4">
            <label for="building-name">Nome</label>
            <input type="text" class="form-control" id="building-name" name="name" placeholder="Nome da Unidade" value="<?php echo e($building->name); ?>" required>
        </div>
        <div class="form-group col-sm-12 col-md-8 col-lg-8">
            <label for="building-address">Endereço</label>
            <input type="text" class="form-control" id="building-address" name="address" placeholder="rua numero bairro" value="<?php echo e($building->address); ?>" required>
        </div>
    </div>
    <div class="form-row">
        <div class="form-group col-sm-12 col-md-12 col-lg-12">
            <label for="building-description">Descrição</label>
            <textarea class="form-control" id="building-description" name="description" placeholder="Digite alguma descrição sobre a unidade"><?php echo e($building->description); ?></textarea>
        </div>
    </div>

    <a class="btn btn-danger" role="button" href="<?php echo e(action('BuildingsController@index')); ?>">Cancelar</a>
    <button type="submit" class="btn btn-success">Editar informações</button>    
</form>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.base', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>