{{ if (field.containerClass) { }}<!-- Radio -->
<div class="{{= field.containerClass }}">
    <div class="form-group{{ if(field.required) { }} required-control{{ } }}">{{ if(field.inline) { }}<div class="inline-control inline-control-radio{{ if(field.disabled) { }} disabled{{ } }}">{{ } }} {{ if (field.label) { }}
        <label {{ if (field.labelClass) { }} class="{{= field.labelClass }}"{{ } }} for="{{= field.id }}">{{= field.label }}</label>{{ } }}{{ if (field.helpText && field.helpTextPlacement === "above") { }}
        <p class="help-block">{{= field.helpText }}</p>{{ } }}{{ _.each(field.radios, function(radio, i){ var items = radio.split("|"); var last = items[items.length-1]; var checked = (last==="selected"||last==="select"|last==="check"); var radio = items[0]; var value = ((items.length >= 3) || (items.length == 2 && !checked)) ? items[1] : items[0]; var figure = ((items.length >= 4) || (items.length == 3 && !checked)) ? items[2] : false; }}{{ if (!field.inline) { }}
        <div class="radio {{ if(field.disabled) { }}disabled{{ } }}">{{ } }}
            <input type="radio" name="{{= field.id }}" id="{{= field.id+'_'+i }}" value="{{- value.replace(/(<([^>]+)>)/ig,'') }}" data-alias="{{= field.alias }}"{{ if(field.required){ }}required{{ } }}{{ if(field.readOnly) { }}readOnly {{ } }}{{ if(field.disabled) {}}disabled {{ } }} {{ if(checked) { }}checked {{ } }}{{ _.each(field.customAttributes, function(attribute, i){ var attrs = attribute.split("|"); var attr = attrs[0]; var value = (attrs.length > 1) ? attrs[1] : attrs[0]; }}{{ if (attr) { }} {{- attr }}="{{- value }}"{{ } }}{{ }) }}><label for="{{= field.id+'_'+i }}"{{ if (field.cssClass) { }} class="{{= field.cssClass }}"{{ } }}>{{ if(figure) { }}
                <span class="figure">{{ if (figure.indexOf("http") == 0) { }}<img src="{{= figure }}" />{{ } else { }}<span class="{{= figure }}"> </span>{{ } }}</span>{{ } }}
                {{= radio }} </label>{{ if (!field.inline) { }}
        </div>{{ } }}{{ }); }} {{ if(field.inline) { }}</div>{{ } }}
        <span id="{{= field.id }}"></span>
        {{ if (field.helpText && field.helpTextPlacement === "below") { }}<p class="help-block">{{= field.helpText }}</p>{{ } }}
    </div>
</div>
{{ } else { }}<!-- Radio -->
<div class="form-group{{ if(field.required) { }} required-control{{ } }}">{{ if(field.inline) { }}<div class="inline-control inline-control-radio{{ if(field.disabled) { }} disabled{{ } }}">{{ } }} {{ if (field.label) { }}
    <label {{ if (field.labelClass) { }} class="{{= field.labelClass }}"{{ } }} for="{{= field.id }}">{{= field.label }}</label>{{ } }}{{ if (field.helpText && field.helpTextPlacement === "above") { }}
    <p class="help-block">{{= field.helpText }}</p>{{ } }}{{ _.each(field.radios, function(radio, i){ var items = radio.split("|"); var last = items[items.length-1]; var checked = (last==="selected"||last==="select"|last==="check"); var radio = items[0]; var value = ((items.length >= 3) || (items.length == 2) && !checked) ? items[1] : items[0]; var figure = ((items.length >= 4) || (items.length == 3 && !checked)) ? items[2] : false; }}{{ if (!field.inline) { }}
    <div class="radio {{ if(field.disabled) { }}disabled{{ } }}">{{ } }}
        <input type="radio" name="{{= field.id }}" id="{{= field.id+'_'+i }}" value="{{- value.replace(/(<([^>]+)>)/ig,'') }}" data-alias="{{= field.alias }}"{{ if(field.required){ }}required{{ } }}{{ if(field.readOnly) { }}readOnly {{ } }}{{ if(field.disabled) {}}disabled {{ } }} {{ if(checked) { }}checked {{ } }}{{ _.each(field.customAttributes, function(attribute, i){ var attrs = attribute.split("|"); var attr = attrs[0]; var value = (attrs.length > 1) ? attrs[1] : attrs[0]; }}{{ if (attr) { }} {{- attr }}="{{- value }}"{{ } }}{{ }) }}><label for="{{= field.id+'_'+i }}"{{ if (field.cssClass) { }} class="{{= field.cssClass }}"{{ } }}>{{ if(figure) { }}
            <span class="figure">{{ if (figure.indexOf("http") == 0) { }}<img src="{{= figure }}" />{{ } else { }}<span class="{{= figure }}"> </span>{{ } }}</span>{{ } }}
            {{= radio }} </label>{{ if (!field.inline) { }}
    </div>{{ } }}{{ }); }}{{ if(field.inline) { }}</div>{{ } }}
    <span id="{{= field.id }}"></span>
    {{ if (field.helpText && field.helpTextPlacement === "below") { }}<p class="help-block">{{= field.helpText }}</p>{{ } }}
</div>
{{ } }}