Changeset 21c6ad4 for asadb/template


Ignore:
Timestamp:
Oct 21, 2012, 8:36:38 PM (13 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, space-access, stable, stage
Children:
ecb0997
Parents:
670a2bd
git-author:
Alex Dehnert <adehnert@…> (10/21/12 20:36:38)
git-committer:
Alex Dehnert <adehnert@…> (10/21/12 20:36:38)
Message:

Select groups from roles held on membership page

Add a new option to the membership confirmation page, to allowing selecting
groups from amongst the ones that list the user as having some role. Fixes
ASA-#140.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asadb/template/membership/confirm.html

    r670a2bd r21c6ad4  
    4646{% endif %}
    4747
    48 <h3>Option 1: Add or remove groups one at a time</h3>
     48<h3>Option 1: Add or remove groups that list a role for you</h3>
     49
     50<table class='pretty-table'>
     51<thead>
     52<tr>
     53    <th>Group</th>
     54    <th>Roles</th>
     55    <th>Add/Remove</th>
     56</tr>
     57</thead>
     58<tbody>
     59{% for group, roles in role_groups.values %}
     60<tr>
     61    <th>{{group}}</th>
     62    <td>{{roles|join:", "}}</td>
     63    <td><form action="" method="post">
     64        <input type="hidden" name="group" value="{{group.pk}}">
     65        {% csrf_token %}
     66        {% if group in member_groups %}
     67        <input type="hidden" name="action" value="remove">
     68        <input type="submit" name="add-remove" value="Remove">
     69        {% else %}
     70        <input type="hidden" name="action" value="add">
     71        <input type="submit" name="add-remove" value="Add">
     72        {% endif %}
     73    </form></td>
     74</tr>
     75{% endfor %}
     76</tbody>
     77</table>
     78
     79<h3>Option 2: Add or remove groups by searching</h3>
    4980
    5081<form action="" method="get">
     
    96127
    97128
    98 <h3>Option 2: Select all your groups at once</h3>
     129<h3>Option 3: Select all your groups at once</h3>
    99130
    100131<p>Below is a list of all recognized groups. You can go through picking out the groups you are a member of. However, you should be careful not to deselect any groups (unless you aren't a member of them, of course).</p>
Note: See TracChangeset for help on using the changeset viewer.