radio_choice.pt 943 Bytes
<div tal:define="oid oid|field.oid;
                 css_class css_class|field.widget.css_class;
                 style style|field.widget.style;
                 inline getattr(field.widget, 'inline', False);"
     tal:omit-tag="not inline">
  ${field.start_rename()}
  <div tal:repeat="choice values | field.widget.values"
       tal:omit-tag="inline"
       class="radio">
    <label for="${oid}-${repeat.choice.index}"
           tal:define="(value, title) choice"
           tal:attributes="class inline and 'radio-inline'">
      <input tal:attributes="checked value == cstruct;
                             class css_class;
                             style style;
                             attributes|field.widget.attributes|{};"
             type="radio"
             name="${oid}"
             value="${value}"
             id="${oid}-${repeat.choice.index}"/>
      ${title}
    </label>
  </div>
  ${field.end_rename()}
</div>