#48 add custom fields/values to flights
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
@section('content')
|
||||
<section class="content-header">
|
||||
<h1>Edit {!! $flight->airline->name !!}{!! $flight->number !!}</h1>
|
||||
<h1>Edit {!! $flight->airline->code !!}{!! $flight->flight_number !!}</h1>
|
||||
</section>
|
||||
<div class="content">
|
||||
@include('adminlte-templates::common.errors')
|
||||
@@ -17,6 +17,20 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h3>custom fields</h3>
|
||||
<div class="box-body">
|
||||
@include('admin.flights.flight_fields')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
@@ -33,17 +47,33 @@
|
||||
@endsection
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$(".select2_dropdown").select2();
|
||||
$(document).ready(function () {
|
||||
|
||||
$(document).on('submit', 'form.pjax_form', function (event) {
|
||||
event.preventDefault();
|
||||
$.pjax.submit(event, '#subfleet_flight_wrapper', {push: false});
|
||||
});
|
||||
|
||||
$(document).on('pjax:complete', function() {
|
||||
$(".select2_dropdown").select2();
|
||||
});
|
||||
$('#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
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(".select2_dropdown").select2();
|
||||
|
||||
$(document).on('submit', 'form.pjax_form', function (event) {
|
||||
event.preventDefault();
|
||||
$.pjax.submit(event, '#flight_fields_wrapper', {push: false});
|
||||
});
|
||||
|
||||
$(document).on('pjax:complete', function() {
|
||||
$(".select2_dropdown").select2();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user