Remove inline javascript

This commit is contained in:
Marcus Moore 2024-01-02 18:23:57 -08:00
parent 25cba65c6e
commit f2d34b2c03
No known key found for this signature in database

View file

@ -468,18 +468,6 @@
</option>
@endforeach
</select>
@push('js')
<script>
$('#saved_report_select')
.on('select2:select', function (event) {
window.location.href = '/reports/templates/' + event.params.data.id;
})
.on('select2:clearing', function (event) {
window.location.href = '{{ route('reports/custom') }}';
});
</script>
@endpush
</div>
@endif
@if (request()->routeIs('reports/custom'))
@ -556,6 +544,14 @@
form.attr('action', '{{ route('report-templates.store') }}').submit();
});
$('#saved_report_select')
.on('select2:select', function (event) {
window.location.href = '/reports/templates/' + event.params.data.id;
})
.on('select2:clearing', function (event) {
window.location.href = '{{ route('reports/custom') }}';
});
$('#dataConfirmModal').on('show.bs.modal', function (event) {
var content = $(event.relatedTarget).data('content');
var title = $(event.relatedTarget).data('title');