Skip to content

A free open source IT asset/license management system

Remove inline javascript

Marcus Mooref2d34b2c03d6
diff --git a/resources/views/reports/custom.blade.php b/resources/views/reports/custom.blade.php
index c0c65d8727..ed27c98609 100644
--- a/resources/views/reports/custom.blade.php
+++ b/resources/views/reports/custom.blade.php
@@ -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');