<!-- Checkbox -->
<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(checkboxes, function(checkbox, i){ var items = checkbox.split("|"); var last = items[items.length-1]; var checked = last==="check"; checkbox = 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="checkbox">{{ } }}
        <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="checkbox" name="{{= id }}[]" id="{{= id+'_'+i }}" value="{{= value }}"{{ if(required){ }}data-required="true" {{ } }}{{ if(readOnly) { }}readOnly {{ } }}{{ if(disabled) {}}disabled {{ } }} {{ if(checked) { }}checked {{ } }}> {{= checkbox }} </label>{{ if (!inline) { }}
    </div>{{ } }}{{ }); }}
    <span id="{{= id }}"></span>{{ if (helpText) { }}
    <p class="help-block">{{= helpText }}</p>{{ } }}
</div>
