<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      xmlns:py="http://genshi.edgewall.org/" 
      xmlns:i18n="http://genshi.edgewall.org/i18n"
      i18n:domain="acct_mgr">
  <xi:include href="admin.html" />
  <head>
    <title>Accounts: Cleanup</title>
  </head>

  <body>
    <h2>Accounts: Cleanup</h2>
    <form id="cleanup" class="mod" method="post">
      <div id="attributelist">
        <table class="listing" id="attributelist">
          <thead>
            <tr>
              <th class="sel">&nbsp;</th>
              <th colspan="3">Account</th>
            </tr>
            <tr>
              <th class="sel">&nbsp;</th>
              <th class="sel">&nbsp;</th>
              <th>Attribute</th>
              <th>Value</th>
            </tr>
          </thead>
          <tbody>
            <!--! 
            <tr class="important">
              <td colspan="4">Not Authenticated Accounts</td>
            </tr>
            <py:for each="account, states in attr">
              <py:for each="state in states['id'].keys()">
                <py:if test="state != 1">
                  <tr>
                    <th><input type="checkbox" name="sel"
                               value="${states['id'][state]}" />
                    </th>
                    <th colspan="3">
                      '${account}'
                    </th>
                  </tr>
                  <tr py:for="name,value in states[state].iteritems()"
                      py:if="name != 'id' and not isinstance(value, dict)">
                    <td>&nbsp;</td>
                    <td>
                      <input type="checkbox" name="sel"
                             value="${states[state]['id'][name]}" />
                    </td>
                    <td>'${name}'</td> 
                    <td>'${value}'</td>
                  </tr>
                </py:if>
              </py:for>
            </py:for>
            //-->
            <tr class="suggestions">
              <td colspan="4">Authenticated Accounts</td>
            </tr>
            <py:for each="account, states in attr.iteritems()">
              <py:if test="True">
                <tr>
                  <th><input type="checkbox" name="sel"
                             value="${states['id'][1]}" />
                  </th>
                  <th colspan="3">
                    '${account}'
                  </th>
                </tr>
                <tr py:for="name,value in states[1].iteritems()"
                    py:if="name != 'id' and not isinstance(value, dict)">
                  <td>&nbsp;</td>
                  <td>
                    <input type="checkbox" name="sel"
                           value="${states[1]['id'][name]}" />
                  </td>
                  <td>'${name}'</td> 
                  <td>'${value}'</td>
                </tr>
              </py:if>
            </py:for>
          </tbody>
        </table>
      </div>
      <div class="buttons">
        <input type="hidden" name="max_per_page"
               value="$max_per_page" />
        <input type="hidden" name="accounts"
               value="${','.join(accounts)}" />
        <input type="submit" name="purge"
               value="${dgettext('acct_mgr', 'Remove selected entries')}" />
        <input type="submit" name="unselect"
               value="${dgettext('acct_mgr', 'Undo selection')}" />
      </div>
    </form>
  </body>
</html>
