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


Исходный код

Twig код

{% if prefix is not defined %}
  {% set prefix = id %}
{% endif %}

<label for="{{prefix}}" class="control-radio__label {{class_name}} {% if disabled %}control-radio__label_disabled{% endif %}" {% if not noTitle %} title="{{label}}" {% endif %} {{ additional_data|raw }} {% if color %} style="overflow: visible;" {% endif %}>
  <div class="control-radio {{ selected ? 'icon-radio-checked' : '' }}">
    <input type="radio" class="{{ input_class_name }}" name="{{name}}" {% if prefix %}id="{{prefix}}"{% endif %} value="{{value}}" {{ selected ? 'checked' : '' }} {% if disabled %} disabled{% endif %} {% if fieldId %} data-field-id="{{fieldId}}" {% endif %} data-value="{{dataValue or value}}" {% if color %} data-color="{{color}}" {% endif %}>
    <div class="control-radio__helper {% if disabled %} control-radio__helper-disabled {% endif %}"></div>
  </div><!--
  --><span class="control-radio-label-text element__text {{text_class_name}}" {% if color %} style="background: {{color}}; padding: 2px 6px; border-radius: 3px;" {% endif %}>
    {{ should_be_raw ? label|raw : label }}
  </span>
</label>
Ссылка на вики репозиторий