Skip to content

Commit

Permalink
refactor: replace form facade on rooms form partial
Browse files Browse the repository at this point in the history
  • Loading branch information
caiquecastro committed May 26, 2024
1 parent 755cf9b commit a2ec01c
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions resources/views/rooms/_form.blade.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
<div class="form-group row">
{!! Form::label('number', 'Número', ['class' => 'col-sm-2 form-control-label']) !!}
<label class="col-sm-2 form-control-label" for="number">Número</label>
<div class="col-sm-5">
{!! Form::text('number', null, ['class' => 'form-control']) !!}
<input type="text" name="number" id="number" class="form-control" value="{{ isset($room) ? $room->number : '' }}" />
</div>
</div>
<div class="form-group row">
{!! Form::label('type_id', 'Tipo', ['class' => 'col-sm-2 form-control-label']) !!}
<label class="col-sm-2 form-control-label" for="type_id">Tipo</label>
<div class="col-sm-5">
{!! Form::select("type_id", $types, null, ['class'=> 'c-select form-control']) !!}
<select name="type_id" id="type_id" class="c-select form-control">
<option value="">Selecione</option>
@foreach ($types as $type)
<option value="{{ $type->id }}">{{ $type->name }}</option>
@endforeach
</select>
</div>
</div>
<div class="form-group row">
{!! Form::label('floor', 'Andar', ['class' => 'col-sm-2 form-control-label']) !!}
<label class="col-sm-2 form-control-label" for="floor">Andar</label>
<div class="col-sm-5">
{!! Form::select("floor", ["ground"=>"Térreo", "first" => "1º Andar", "second" => "2º Andar"], null, ['class'=> 'c-select form-control']) !!}
<select name="floor" id="floor" class="c-select form-control">
<option value="">Selecione</option>
<option value="ground">Térreo</option>
<option value="first">1º Andar</option>
<option value="second">2º Andar</option>
</select>
</div>
</div>

Expand All @@ -37,6 +47,6 @@
</div>
<div class="form-group row">
<div class="col-sm-offset-2 col-sm-10">
{!! Form::submit('Salvar', ['class' => 'btn btn-primary']) !!}
<button type="submit" class="btn btn-primary">Salvar</button>
</div>
</div>
</div>

0 comments on commit a2ec01c

Please # to comment.