added settings page in admin #93
This commit is contained in:
30
resources/views/admin/settings/script.blade.php
Normal file
30
resources/views/admin/settings/script.blade.php
Normal file
@@ -0,0 +1,30 @@
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#settings a').editable({
|
||||
type: 'text',
|
||||
mode: 'inline',
|
||||
emptytext: 'default',
|
||||
url: '/admin/settings/update',
|
||||
title: 'Enter override value',
|
||||
ajaxOptions: { 'type': 'put'},
|
||||
params: function(params) {
|
||||
return {
|
||||
fare_id: params.pk,
|
||||
name: params.name,
|
||||
value: params.value
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('submit', 'form.rm_fare', function(event) {
|
||||
event.preventDefault();
|
||||
$.pjax.submit(event, '#aircraft_fares_wrapper', {push: false});
|
||||
});
|
||||
|
||||
$(document).on('pjax:complete', function() {
|
||||
$(".select2").select2();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user