КОНТРОЛЫ/checkbox.md


Исходный код

Twig код

<label class="control-checkbox {{class_name}} {% if small %}control-checkbox_small{% endif %} {% if checked %}is-checked{% endif %}">
  {% if name_is_array == 'yes'%}
    {% set arr = '[]' %}
  {% else %}
    {% set arr = '' %}
  {% endif %}

  <div class="control-checkbox__body">
    <input type="checkbox" class="{{input_class_name}}" name="{{name ~ arr}}" {% if id %}id="{{id}}"{% endif %}{% if checked %} checked="checked"{% endif %}{% if disabled %} disabled{% endif %} value="{{value}}" {% if fieldId %} data-field-id="{{fieldId}}" {% endif %} data-value="{{ dataValue|default(value) }}" {{ additional_data|raw }}/>

    <span class="control-checkbox__helper {% if checked_minus %}control-checkbox__helper_minus{% endif %}"></span>
  </div>

  {% if text|length %}
    <div class="control-checkbox__text element__text {{text_class_name}}" title="{{ should_be_raw ? text|striptags : text }}">
      {% if note_text %}
        <span class="control-checkbox__main-text">
          {% if should_be_raw %}
            {{ text|raw }}
          {% else %}
            {{ text }}
          {% endif %}
        </span> <span class="control-checkbox__note-text">{{note_text}}</span>
      {% else %}
        {% if should_be_raw %}
          {{ text|raw }}
        {% else %}
          {{ text }}
        {% endif %}
      {% endif %}
    </div>
  {% elseif note_text %}
    <div class="control-checkbox__text element__text {{text_class_name}}" title="{{ note_text }}">
      <span class="control-checkbox__note-text">{{ note_text }}</span>
    </div>
  {% elseif text_custom %}
    <div class="control-checkbox__text element__text {{ text_class_name }}">
      {{text_custom}}
    </div>
  {% endif %}
</label>

<<<<<<< HEAD

=======

8a9b9a61bce51dcda342f912ece8fdd4754ac6f5

Ссылка на вики репозиторий