{#=== INIT ===========================================================================================================#}

{# Build the select options array #}
{% set options = [] %}
{% for slug, cat in taxonomy.options %}
    {% set options = options|merge([{
        value:     slug,
        text:      cat,
        selected:  context.content.taxonomy.containsKeyValue(taxonomy.slug, slug),
    }]) %}
{% endfor %}

{# BUIC options #}
{% set buic_opt_select = {
    'all':       true,
    'clear':     true,
    'id':        'taxonomy-' ~ taxonomy.slug,
    'multiple':  taxonomy.multiple is defined and taxonomy.multiple == 1,
    'name':      'taxonomy[' ~ taxonomy.slug ~ '][]',
    'options':   options,
} %}

{#=== FIELDSET =======================================================================================================#}

{% extends '@bolt/_base/_fieldset.twig' %}

{% block fieldset_type 'categories' %}
{% block fieldset_widget 'fieldCategories' %}

{% block fieldset_label_text  taxonomy.name %}
{% block fieldset_label_class 'col-sm-3' %}
{% block fieldset_label_for   'taxonomy-' ~ taxonomy.slug %}

{% block fieldset_controls %}
    {% from '@bolt/_buic/_select.twig' import buic_select %}

    <div class="col-sm-9">
        {{ buic_select(buic_opt_select) }}
    </div>
{% endblock fieldset_controls %}

{#=== INIT ===========================================================================================================#}

{# Build the select options array #}
{% set options = [] %}
{% for slug, cat in taxonomy.options %}
    {% set options = options|merge([{
        value:     slug,
        text:      cat,
        selected:  context.content.taxonomy.containsKeyValue(taxonomy.slug, slug),
    }]) %}
{% endfor %}

{# BUIC options #}
{% set buic_opt_select = {
    'all':       taxonomy.multiple|default(false),
    'clear':     true,
    'id':        'taxonomy-' ~ taxonomy.slug,
    'multiple':  taxonomy.multiple is defined and taxonomy.multiple == 1,
    'name':      'taxonomy[' ~ taxonomy.slug ~ '][]',
    'options':   options,
} %}

{#=== FIELDSET =======================================================================================================#}

{% extends '@bolt/_base/_fieldset.twig' %}

{% block fieldset_type 'categories' %}
{% block fieldset_widget 'fieldCategories' %}

{% block fieldset_label_text  taxonomy.name %}
{% block fieldset_label_class 'col-sm-3' %}
{% block fieldset_label_for   'taxonomy-' ~ taxonomy.slug %}

{% block fieldset_controls %}
    {% from '@bolt/_buic/_select.twig' import buic_select %}

    <div class="col-sm-9">
        {{ buic_select(buic_opt_select) }}
    </div>
{% endblock fieldset_controls %}

Add "select all" button only on when multiple selection ois allowed
Add "select all" button only on when multiple selection ois allowed