Merge pull request #16436 from marcusmoore/fixes/report-template-link
Fixed linking in saved report template dropdown
This commit is contained in:
@@ -627,7 +627,11 @@
|
||||
>
|
||||
<option></option>
|
||||
@foreach($report_templates as $savedTemplate)
|
||||
<option value="{{ $savedTemplate->id }}" @selected($savedTemplate->is(request()->route()->parameter('reportTemplate')))>
|
||||
<option
|
||||
value="{{ $savedTemplate->id }}"
|
||||
data-route="{{ route('report-templates.show', $savedTemplate->id) }}"
|
||||
@selected($savedTemplate->is(request()->route()->parameter('reportTemplate')))
|
||||
>
|
||||
{{ $savedTemplate->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
@@ -774,7 +778,7 @@
|
||||
|
||||
$('#saved_report_select')
|
||||
.on('select2:select', function (event) {
|
||||
window.location.href = '/reports/templates/' + event.params.data.id;
|
||||
window.location.href = event.params.data.element.dataset.route;
|
||||
});
|
||||
|
||||
$('#dataConfirmModal').on('show.bs.modal', function (event) {
|
||||
|
||||
Reference in New Issue
Block a user