{% load i18n %}

    <div class="form-group" ng-if="question.widget_type === 'radio'">
        {% include 'projects/project_questions_question_label.html' %}
        {% include 'projects/project_questions_question_help.html' %}
        {% include 'projects/project_questions_question_warning.html' %}

        <div ng-if="question.is_collection">
            {% include 'projects/project_questions_add_field_help.html' %}
        </div>

        <div ng-repeat="value in service.values[question.attribute][valueset.set_prefix][valueset.set_index] track by $index">
            <div class="collection" ng-hide="value.removed">
                <div class="radio-control">
                    <div class="options">
                        {% include 'projects/project_questions_default.html' %}
                        {% include 'projects/project_questions_erase_field.html' %}
                        {% include 'projects/project_questions_remove_field.html' %}
                    </div>

                    <div class="radio" ng-repeat="option in question.options" ng-hide="valueset.hidden.optionsets[option.optionset]">
                        <label>
                            <input type="radio" value="{$ option.id $}"
                                ng-model="value.selected"
                                ng-disabled="service.project.read_only"
                                ng-change="service.changed(value, true)"
                                ng-class="{'default-value': service.isDefaultValue(question, value) &&
                                                            option.id.toString() == value.selected}"/>

                            <span>{$ option.text $}</span><span ng-show="option.additional_input">:</span>

                            <input class="form-control input-sm" type="text"
                                ng-show="option.additional_input"
                                ng-model="value.additional_input[option.id]"
                                ng-change="value.selected = option.id.toString(); service.changed(value, true)"
                                ng-focus="value.selected = option.id.toString()"
                                ng-disabled="service.project.read_only" />
                        </label>
                    </div>

                    <div class="text-muted" ng-show="question.options.length == 0">
                        {% trans 'No options are available.' %}
                    </div>
                </div>
            </div>
        </div>

        <div ng-if="question.is_collection">
            {% include 'projects/project_questions_add_field_button.html' %}
        </div>
    </div>
