From 0b10b43959f66910e933a5cc54370a9f56c7bcdc Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Wed, 13 Apr 2011 02:56:19 -0400 Subject: [PATCH] Added view to add or remove user to a specific role --- apps/common/templates/generic_form.html | 4 + .../templates/generic_form_subtemplate.html | 3 +- apps/permissions/__init__.py | 3 +- apps/permissions/forms.py | 15 ++- apps/permissions/urls.py | 1 + apps/permissions/views.py | 99 ++++++++++++++++++- 6 files changed, 119 insertions(+), 6 deletions(-) diff --git a/apps/common/templates/generic_form.html b/apps/common/templates/generic_form.html index 365901bbfe..ba6afd3efb 100644 --- a/apps/common/templates/generic_form.html +++ b/apps/common/templates/generic_form.html @@ -25,6 +25,7 @@ {% with subtemplate.object as object %} {% with subtemplate.object_name as object_name %} {% with subtemplate.form_action as form_action %} + {% with subtemplate.submit_label as submit_label %} {% with subtemplate.form as form %} {% with subtemplate.content as content %} @@ -42,6 +43,7 @@ {% endwith %} {% endwith %} {% endwith %} + {% endwith %} {% endwith %} @@ -73,6 +75,7 @@ {% with form.title as title %} {% with form.object as object %} {% with form.object_name as object_name %} + {% with form.submit_label as submit_label %} {% with form.form_action as form_action %}
{% with form.form as form %} @@ -88,6 +91,7 @@ {% endwith %} {% endwith %} {% endwith %} + {% endwith %} {% endfor %}
diff --git a/apps/common/templates/generic_form_subtemplate.html b/apps/common/templates/generic_form_subtemplate.html index b894ea2ef0..baa0700279 100644 --- a/apps/common/templates/generic_form_subtemplate.html +++ b/apps/common/templates/generic_form_subtemplate.html @@ -63,11 +63,10 @@ {% else %} {% include "generic_form_instance.html" %} {% endif %} - {% if not read_only %}