From 8c18220c679d9e8c486fb8663f05e59810cf9a8c Mon Sep 17 00:00:00 2001 From: Bob den Otter Date: Mon, 12 Oct 2020 20:54:15 +0200 Subject: [PATCH] Fix url for 'bulk' operations on Listing screen, for sites with modified Backend URL --- assets/js/app/listing/Components/SelectBox.vue | 3 ++- templates/content/listing.html.twig | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/js/app/listing/Components/SelectBox.vue b/assets/js/app/listing/Components/SelectBox.vue index e9c1284a4..47b89640e 100644 --- a/assets/js/app/listing/Components/SelectBox.vue +++ b/assets/js/app/listing/Components/SelectBox.vue @@ -57,6 +57,7 @@ export default { plural: String, labels: Object, csrftoken: String, + backendPrefix: RegExp, }, data() { return { @@ -92,7 +93,7 @@ export default { computed: { postUrl() { if (this.selectedAction) { - return '/bolt/bulk/' + this.selectedAction.key; + return this.backendPrefix + 'bulk/' + this.selectedAction.key; } return ''; diff --git a/templates/content/listing.html.twig b/templates/content/listing.html.twig index 2c82374f6..377b9a91e 100644 --- a/templates/content/listing.html.twig +++ b/templates/content/listing.html.twig @@ -39,6 +39,7 @@ 'update_all': 'action.update_all'|trans, }|json_encode }}" :csrftoken="{{ csrf_token('batch')|json_encode }}" + :backend-prefix="{{ path('bolt_dashboard') }}" > {% set filterOptions = {