<tal:defs define="dummy view/update" />
<html metal:use-macro="view/@@standard_macros/page" i18n:domain="schooltool">
<head>
  <title metal:fill-slot="title" i18n:translate="">Access Control</title>
</head>
<body>
<metal:block metal:fill-slot="body">

  <form method="post" tal:attributes="action request/URL"
        class="standalone">

    <h3 i18n:translate="">Access Control</h3>

    <fieldset>
      <div tal:repeat="setting view/settings"
           class="row">
        <tal:block condition="setting/alt_text"
                   define="input_name  string:setting.${setting/key}">
            <tal:block define="input_id string:on.${setting/key}">
              <input tal:attributes="checked setting/getValue;
                                     name input_name;
                                     id input_id"
                     class="choice_field"
                     type="radio"
                     value="True" />
              <label class="choice_field"
                     tal:content="setting/text"
                     tal:attributes="for string:on.${setting/key}"/>
            </tal:block>
            <tal:block define="input_id string:off.${setting/key}">
              <input tal:attributes="checked not:setting/getValue;
                                     name input_name;
                                     id input_id"
                     class="choice_field"
                     value="False"
                     type="radio"/>
              <label class="choice_field"
                     tal:content="setting/alt_text"
                     tal:attributes="for input_id"/>
            </tal:block>

        </tal:block>
        <tal:block condition="not:setting/alt_text">
          <input type="checkbox"
                 tal:attributes="checked setting/getValue;
                                 name string:setting.${setting/key};
                                 id setting/key" />
          <label tal:content="setting/text"
                 tal:attributes="for setting/key"/>
        </tal:block>
      </div>
      <div class="controls">
        <tal:block metal:use-macro="view/@@standard_macros/apply-button" />
        <tal:block metal:use-macro="view/@@standard_macros/cancel-button" />
      </div>
    </fieldset>
  </form>
</metal:block>
</body>
</html>
