Moved create_extra_dynafields from club_admin and member to role.
Patch by: Lennard de Rijk
Reviewed by: to-be-reviewed
--- a/app/soc/views/models/club_admin.py Sat Jan 31 15:41:45 2009 +0000
+++ b/app/soc/views/models/club_admin.py Sat Jan 31 16:03:14 2009 +0000
@@ -25,7 +25,6 @@
from django import forms
-from soc.logic import cleaning
from soc.logic import dicts
from soc.logic.models import club as club_logic
from soc.views.helper import access
@@ -74,14 +73,6 @@
new_params['extra_dynaexclude'] = ['agreed_to_tos']
- new_params['create_extra_dynafields'] = {
- 'scope_path': forms.CharField(widget=forms.HiddenInput,
- required=True),
- 'clean_link_id' : cleaning.clean_existing_user('link_id'),
- 'clean_home_page' : cleaning.clean_url('home_page'),
- 'clean_blog' : cleaning.clean_url('blog'),
- 'clean_photo_url' : cleaning.clean_url('photo_url')}
-
new_params['allow_invites'] = True
params = dicts.merge(params, new_params)
--- a/app/soc/views/models/club_member.py Sat Jan 31 15:41:45 2009 +0000
+++ b/app/soc/views/models/club_member.py Sat Jan 31 16:03:14 2009 +0000
@@ -24,7 +24,6 @@
from django import forms
-from soc.logic import cleaning
from soc.logic import dicts
from soc.logic.models import club as club_logic
from soc.views.helper import access
@@ -76,14 +75,6 @@
new_params['extra_dynaexclude'] = ['agreed_to_tos']
- new_params['create_extra_dynafields'] = {
- 'scope_path': forms.CharField(widget=forms.HiddenInput,
- required=True),
- 'clean_link_id': cleaning.clean_existing_user('link_id'),
- 'clean_home_page': cleaning.clean_url('home_page'),
- 'clean_blog': cleaning.clean_url('blog'),
- 'clean_photo_url': cleaning.clean_url('photo_url')}
-
new_params['allow_requests_and_invites'] = True
params = dicts.merge(params, new_params)
--- a/app/soc/views/models/role.py Sat Jan 31 15:41:45 2009 +0000
+++ b/app/soc/views/models/role.py Sat Jan 31 16:03:14 2009 +0000
@@ -26,6 +26,7 @@
from django import http
from django.utils.translation import ugettext
+from soc.logic import cleaning
from soc.logic import dicts
from soc.logic.models import request as request_logic
from soc.logic.models import user as user_logic
@@ -114,6 +115,15 @@
new_params['extra_django_patterns'] = patterns
new_params['scope_redirect'] = redirects.getInviteRedirect
+ new_params['create_extra_dynafields'] = {
+ 'clean_link_id' : cleaning.clean_existing_user('link_id'),
+ 'clean_home_page' : cleaning.clean_url('home_page'),
+ 'clean_blog' : cleaning.clean_url('blog'),
+ 'clean_photo_url' : cleaning.clean_url('photo_url'),
+ 'scope_path': forms.CharField(widget=forms.HiddenInput,
+ required=True),
+ }
+
new_params['extra_dynaexclude'] = ['user', 'status', 'agreed_to_tos_on']
params = dicts.merge(params, new_params, sub_merge=True)