<div class="row"
     metal:define-macro="sort_edit"
     tal:define="criterionid criterion/getId | here/getId;"
           i18n:domain="plone">

    <div class="label">
        <input class="noborder"
               type="checkbox" 
               value="" 
               name="criterion_ids:list" 
               id=""
               tal:attributes="value criterionid; 
                               id string:cb_${criterionid}" 
               />

        <label for=""
               tal:attributes="for string:cb_${criterionid}">
            <span tal:content="criterion/Field | here/Field">Field</span>
            is
        </label>

        <div id="" 
             i18n:translate=""
             class="formHelp" 
             style="visibility:hidden"
             tal:content="criterion/Description | here/Description"
             tal:attributes="id string:${criterionid}_help;"
             >
        List
        </div>

        <input type="hidden" 
               name="criteria.id:records" 
               value="" 
               tal:attributes="value criterionid" />
        
    </div>
    
    <div class="field"
         tal:define="creversed criterion/reversed | here/reversed;"
         >
        
        <input type="hidden" 
               name="criteria.reversed::int:default:records" 
               value="0"
               />
        
        <input class="noborder"
               type="radio" 
               name="criteria.reversed:records" 
               value=""
               tal:attributes="checked not:creversed;
                               id string:${criterionid}_ascending;
                               tabindex tabindex/next|nothing;"
               />
               
        <label for=""
               tal:attributes="for string:${criterionid}_ascending;">
            Sorted in ascending order
        </label>
        
        <br />
        
        <input class="noborder"
               type="radio" 
               name="criteria.reversed:records" 
               value="1"
               tal:attributes="checked creversed;
                               id string:${criterionid}_descending;
                               tabindex tabindex/next|nothing;"
               />

        <label for=""
               tal:attributes="for string:${criterionid}_descending;">
            Sorted in descending order
        </label>

    </div>

</div>
        
