<html xmlns:py="http://genshi.edgewall.org/"
  xmlns:xi="http://www.w3.org/2001/XInclude"
  py:strip="">
  
  <py:def function="page_title">${c.authorization_group_name} - Authorization - AuthorizationGroups</py:def>
  <py:def function="page_heading">Authorization: ${c.authorization_group_name}</py:def>

  <div py:match="content">
    <h3>Update Existing Roles</h3>

    <form id="theform" method="POST">
      ${authz_form_table('theform', c.roles, c.users, c.user_role_dict)}
      <button type="submit" name="save">
        Save
      </button>
    </form>

    <h3>Add Roles for Any User</h3>

    <form id="addform" method="POST">
      ${authz_add_table(c.roles)}
      <button type="submit" name="add"> Add </button>
    </form>

    <hr/>

    <h3>Existing Roles for Authorization Groups</h3>

    <form id="authzgroup_form" method="POST">
      ${authz_form_group_table('authzgroup_form', c.roles, c.authz_groups, c.authz_groups_role_dict)}
      <button type="submit" name="authz_save">
        Save
      </button>
    </form>

    <h3>Add Roles for Any Authorization Group</h3>

    <form id="authzgroup_addform" method="POST">
      ${authz_add_group_table(c.roles)}
      <button type="submit" name="authz_add"> Add </button>
    </form>

  </div>

  <xi:include href="layout.html" />
</html>
