<%page args="element, eaiAttributes, widgetstyle" />
<%namespace file="../_helpers.html" import="wireElementEvents"/>
<div id="item-${element['elementName'] | h}" class="checkboxWidget ${element['class'] if 'class' in element else '' | h} widget" ${widgetstyle}>
    <div>
        % if 'topLabel' in element:
            <span class="orphanLabel">${_(element['topLabel']) | h}</span><br />
        % endif
        <div class="widgeterror"><form:error name="${element["elementName"]}"/></div>
        <input id="${element['elementName'] | h}_id" type="checkbox"
               class="checkbox proxiable ${element['class'] if 'class' in element else '' | h}"
               name="${element["elementName"] | h}"
               value="1"
               ${'readonly="readonly"' if element.get('readonly') else ''}
               ${'disabled="disabled"' if element.get('disabled') else ''}
               ${wireElementEvents(element)}/>
        % if 'label' in element:
            <label for="${element['elementName'] | h}_id" class="${'disabledLabel ' if element.get('disabled') else ''}">${_(element['label'])}</label>
        % endif
        % if 'exampleText' in element:
            <p class="exampleText"><em>${_(element['exampleText']) | extract_help_links }</em></p>
        % endif
    </div>
</div>
