<commit_before>{#=== OPTIONS ========================================================================================================#}

{% set option = {
    uses:  field.uses|default([]) is iterable ? field.uses|default([]) : [field.uses],
    viewless: context.content.contenttype.viewless|default(false)
} %}

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

{% set attributes = {
    slug: {
        class:  'form-control',
        id:    key,
        name:  name,
        type:  'hidden',
        value: context.content.get(key),
    }
} %}

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

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

{% set fieldset_conf = {
    contentId: context.content.id,
    isEmpty:   (context.content.get(contentkey) == ''),
    key:       key,
    slug:      context.content.contenttype.slug,
    uses:      option.uses,
}%}

{% block fieldset_type 'slug' %}
{% block fieldset_widget 'fieldSlug' %}

{% block fieldset_label_text option.viewless ? __('Unique Alias') : __('field.slug.permalink') %}
{% block fieldset_label_class 'col-sm-12' %}

{% block fieldset_controls %}
    <div class="col-sm-12">
        <div class="input-group locked">
            <span class="input-group-addon"><span class="prefix">/{{ context.content.contenttype }}/</span><em>{{ context.content.get(contentkey) }}</em></span>
            <input{{ macro.attr(attributes.slug) }}>
            <div class="input-group-btn">
                <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                    <span class="caret"></span>
                </button>
                <ul class="dropdown-menu dropdown-menu-right">
                    <li class="copy">
                        <a href="#"><i class="fa fa-fw fa-copy"></i> {{ __('field.slug.button.copy') }}</a>
                    </li>
                    <li class="lock">
                        <a href="#"><i class="fa fa-fw fa-lock"></i> {{ __('field.slug.button.lock') }}</a>
                    </li>
                    <li class="unlock">
                        <a href="#"><i class="fa fa-fw fa-unlock-alt"></i> {{ __('field.slug.button.unlock') }}</a>
                    </li>
                    <li class="edit">
                        <a href="#"><i class="fa fa-fw fa-pencil"></i> {{ __('field.slug.button.edit') }}</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
{% endblock fieldset_controls %}<commit_msg>Add indication that menu ulock/edit open a dialog<commit_after>{#=== OPTIONS ========================================================================================================#}

{% set option = {
    uses:  field.uses|default([]) is iterable ? field.uses|default([]) : [field.uses],
    viewless: context.content.contenttype.viewless|default(false)
} %}

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

{% set attributes = {
    slug: {
        class:  'form-control',
        id:    key,
        name:  name,
        type:  'hidden',
        value: context.content.get(key),
    }
} %}

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

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

{% set fieldset_conf = {
    contentId: context.content.id,
    isEmpty:   (context.content.get(contentkey) == ''),
    key:       key,
    slug:      context.content.contenttype.slug,
    uses:      option.uses,
}%}

{% block fieldset_type 'slug' %}
{% block fieldset_widget 'fieldSlug' %}

{% block fieldset_label_text option.viewless ? __('Unique Alias') : __('field.slug.permalink') %}
{% block fieldset_label_class 'col-sm-12' %}

{% block fieldset_controls %}
    <div class="col-sm-12">
        <div class="input-group locked">
            <span class="input-group-addon"><span class="prefix">/{{ context.content.contenttype }}/</span><em>{{ context.content.get(contentkey) }}</em></span>
            <input{{ macro.attr(attributes.slug) }}>
            <div class="input-group-btn">
                <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                    <span class="caret"></span>
                </button>
                <ul class="dropdown-menu dropdown-menu-right">
                    <li class="copy">
                        <a href="#"><i class="fa fa-fw fa-copy"></i> {{ __('field.slug.button.copy') }}</a>
                    </li>
                    <li class="lock">
                        <a href="#"><i class="fa fa-fw fa-lock"></i> {{ __('field.slug.button.lock') }}</a>
                    </li>
                    <li class="unlock">
                        <a href="#"><i class="fa fa-fw fa-unlock-alt"></i> {{ __('field.slug.button.unlock') }} …</a>
                    </li>
                    <li class="edit">
                        <a href="#"><i class="fa fa-fw fa-pencil"></i> {{ __('field.slug.button.edit') }} …</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
{% endblock fieldset_controls %}
{'fraction_non_alphanumeric': 0.2840951319212189, 'fraction_numerical': 0.0014864362690449647, 'mean_word_length': 2.379158819836786, 'pattern_counts': {'":': 0, '<': 89, '<?xml version=': 0, '>': 89, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6949507', 'n_tokens_mistral': 1593, 'n_tokens_neox': 1488, 'n_words': 275}