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