2017-06-18 06:25:36 +08:00
|
|
|
@extends('admin.app')
|
|
|
|
|
2017-11-01 23:08:36 +08:00
|
|
|
@section('title', 'Edit Flight')
|
2017-06-18 06:25:36 +08:00
|
|
|
@section('content')
|
2017-11-23 10:03:49 +08:00
|
|
|
<div class="card border-blue-bottom">
|
2017-12-31 02:23:30 +08:00
|
|
|
@include('admin.flash.message')
|
2017-06-18 06:25:36 +08:00
|
|
|
<div class="content">
|
2017-11-01 23:08:36 +08:00
|
|
|
{!! Form::model($flight, ['route' => ['admin.flights.update', $flight->id], 'method' => 'patch']) !!}
|
|
|
|
@include('admin.flights.fields')
|
|
|
|
{!! Form::close() !!}
|
2017-06-18 06:25:36 +08:00
|
|
|
</div>
|
2017-11-01 23:08:36 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<h3>custom fields</h3>
|
2017-11-23 10:03:49 +08:00
|
|
|
<div class="card border-blue-bottom">
|
2017-11-01 23:08:36 +08:00
|
|
|
<div class="content">
|
|
|
|
@include('admin.flights.flight_fields')
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<h3>assigned subfleets</h3>
|
2017-11-23 10:03:49 +08:00
|
|
|
<div class="card border-blue-bottom">
|
2017-11-01 23:08:36 +08:00
|
|
|
<div class="content">
|
|
|
|
@include('admin.flights.subfleets')
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-06-18 06:25:36 +08:00
|
|
|
@endsection
|
2017-07-02 10:06:55 +08:00
|
|
|
@section('scripts')
|
|
|
|
<script>
|
2017-07-12 06:44:12 +08:00
|
|
|
$(document).ready(function () {
|
2017-07-02 10:06:55 +08:00
|
|
|
|
2017-07-12 06:44:12 +08:00
|
|
|
$('#flight_fields_wrapper a.inline').editable({
|
|
|
|
type: 'text',
|
|
|
|
mode: 'inline',
|
|
|
|
emptytext: '0',
|
|
|
|
url: '/admin/flights/{!! $flight->id !!}/fields',
|
|
|
|
ajaxOptions: {'type': 'put'},
|
|
|
|
params: function(params) {
|
|
|
|
return {
|
|
|
|
field_id: params.pk,
|
|
|
|
name: params.name,
|
|
|
|
value: params.value
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
2017-07-02 10:06:55 +08:00
|
|
|
|
2017-07-12 06:44:12 +08:00
|
|
|
$(document).on('submit', 'form.pjax_form', function (event) {
|
|
|
|
event.preventDefault();
|
|
|
|
$.pjax.submit(event, '#flight_fields_wrapper', {push: false});
|
|
|
|
});
|
|
|
|
|
|
|
|
$(document).on('pjax:complete', function() {
|
2017-11-01 23:08:36 +08:00
|
|
|
$(".select2").select2();
|
2017-07-02 10:06:55 +08:00
|
|
|
});
|
2017-07-12 06:44:12 +08:00
|
|
|
});
|
2017-07-02 10:06:55 +08:00
|
|
|
</script>
|
|
|
|
@endsection
|