AthensFramework/core

View on GitHub
templates/field/choice-radios.twig

Summary

Maintainability
Test Coverage
<span class="choice-field {{ classes|join(' ') }}" {{ data|writedata|raw }}>
    {% for choiceSlug, choice in choices %}
    <span class="choice">
        <input type="radio" name="{{ slug }}" value="{{ choiceSlug }}" {% if choice.getValue == initial %}checked{% endif %}>
        <label class="radio-label" data-name-for="{{ slug }}" data-value-for="{{ choiceSlug }}">{{ choice.getValue }}</label>
    </span>
    {% endfor %}
</span>
{% include "field/errors.twig" %}