From e48d3f740e680847b49b89b6e613d557f78611fd Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Tue, 6 Feb 2024 19:57:24 +0100 Subject: [PATCH] mvc - minor modification in for processing for multiselect tokenizers, when style contains "tokenize" as part of a list of styles, copy/paste buttons won't show. Unfortunately volt templates don't support an inline "split" operator, which means we need to embed php code to split the styles. --- .../mvc/app/views/layout_partials/form_input_tr.volt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/opnsense/mvc/app/views/layout_partials/form_input_tr.volt b/src/opnsense/mvc/app/views/layout_partials/form_input_tr.volt index 2662aa44c..87a86a634 100644 --- a/src/opnsense/mvc/app/views/layout_partials/form_input_tr.volt +++ b/src/opnsense/mvc/app/views/layout_partials/form_input_tr.volt @@ -86,9 +86,10 @@ {% if separator|default(false) %}data-separator="{{separator}}"{% endif %} > {% if type == 'select_multiple' %} - {% if style|default('selectpicker') != "tokenize" %}
{% endif %} - {{ lang._('Clear All') }} - {% if style|default('selectpicker') == "tokenize" %}   {{ lang._('Copy') }} + + {% if "tokenize" not in this_style %}
{% endif %} + {{ lang._('Clear All') }} + {% if "tokenize" in this_style %}   {{ lang._('Copy') }}    {% endif %} {% endif %}