Add the acars and manual payrates in the rank/subfleet forms
This commit is contained in:
@@ -1,7 +1,26 @@
|
||||
@section('scripts')
|
||||
<script>
|
||||
function setEditable() {
|
||||
$('#subfleets-table a').editable({
|
||||
type: 'text',
|
||||
mode: 'inline',
|
||||
emptytext: 'inherited',
|
||||
url: '{!! url('/admin/ranks/'.$rank->id.'/subfleets') !!}',
|
||||
title: 'Enter override value',
|
||||
ajaxOptions: {'type': 'put'},
|
||||
params: function (params) {
|
||||
return {
|
||||
subfleet_id: params.pk,
|
||||
name: params.name,
|
||||
value: params.value
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
$(".select2").select2();
|
||||
|
||||
setEditable();
|
||||
|
||||
$(document).on('submit', 'form.pjax_form', function (event) {
|
||||
event.preventDefault();
|
||||
@@ -10,6 +29,7 @@ $(document).ready(function () {
|
||||
|
||||
$(document).on('pjax:complete', function () {
|
||||
$(".select2").select2();
|
||||
setEditable();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user