phpvms/resources/views/admin/pireps/field_values.blade.php

37 lines
1.1 KiB
PHP
Raw Normal View History

<table class="table table-responsive table-hover" id="flight-fields-table">
2018-08-20 22:20:03 +08:00
@if(count($pirep->fields))
2017-07-14 11:09:38 +08:00
<thead>
<th></th>
2017-07-14 11:09:38 +08:00
<th>Value</th>
<th>Source</th>
</thead>
2018-08-20 22:20:03 +08:00
@endif
2017-07-14 11:09:38 +08:00
<tbody>
@foreach($pirep->fields as $field)
<tr>
<td>
{{ $field->name }}
@if($field->required === true)
<span class="text-danger">*</span>
@endif
2017-07-14 11:09:38 +08:00
</td>
<td>
<div class="form-group">
@if(!$field->read_only)
{{ Form::text($field->slug, $field->value, [
'class' => 'form-control'
]) }}
@else
<p>{{ $field->value }}</p>
@endif
2017-07-14 11:09:38 +08:00
</div>
<p class="text-danger">{{ $errors->first($field->slug) }}</p>
</td>
<td>
{{ PirepSource::label($field->source) }}
2017-07-14 11:09:38 +08:00
</td>
</tr>
@endforeach
</tbody>
</table>