<div class="row"
     metal:define-macro="friendlydatec_editform"
     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="label_date"
             class="formHelp" 
             style="visibility:hidden"
             tal:content="criterion/Description | here/Description"
             tal:attributes="id string:${criterionid}_help;"
             >
        Date
        </div>
            
           
        <input type="hidden" 
               name="criteria.id:records" 
               value=""
               tal:attributes="value criterionid" />
        
    </div>
    
    <div class="field">
        <select name="criteria.operation:records"
                tal:define="coperation criterion/operation | here/operation;"
                tal:attributes="tabindex tabindex/next|nothing;"
                >
                
            <option value="min"
                    tal:attributes="selected python:coperation=='max'"
            >more than</option>
            
            <option value="max"
                    tal:attributes="selected python:coperation=='min'"
            >less than</option>
             
            <option value="within_day"
                    tal:attributes="selected python:coperation=='within_day'"
            >within</option>
        </select>
        
        <select name="criteria.value:records"
                tal:define="dateoptions criterion/defaultDateOptions | here/defaultDateOptions;
                            cvalue criterion/value | here/value;"
                tal:attributes="tabindex tabindex/next|nothing;"
                >

            <option value=""
                    tal:repeat="doption dateoptions"
                    tal:attributes="value python:doption[0];
                                    selected python:cvalue == doption[0];"
                    tal:content="python:doption[1]"
            >Date Option</option>
        </select>
        
        <select name="criteria.daterange:records"
                tal:define="cdaterange criterion/daterange | here/daterange;"
                tal:attributes="tabindex tabindex/next|nothing;"
                >

            <option value="old"
                    tal:attributes="selected python:cdaterange == 'old'"
            >old</option>
           
            <option value="ahead"
                    tal:attributes="selected python:cdaterange == 'ahead'"
            >ahead</option>
        </select>
    
    </div>
    
</div>
