--- a/app/soc/views/models/club.py Sun Mar 15 16:20:24 2009 +0000
+++ b/app/soc/views/models/club.py Sun Mar 15 16:30:26 2009 +0000
@@ -95,6 +95,13 @@
('/' + new_params['url_name'] + '/apply_member',
'Join a Club', 'apply_member'),]
+ new_params['create_dynafields'] = [
+ {'name': 'link_id',
+ 'base': forms.fields.CharField,
+ 'label': 'Club Link ID',
+ },
+ ]
+
new_params['create_extra_dynaproperties'] = {
'clean' : cleaning.validate_new_group('link_id', 'scope_path',
club_logic, club_app_logic)}
--- a/app/soc/views/models/club_app.py Sun Mar 15 16:20:24 2009 +0000
+++ b/app/soc/views/models/club_app.py Sun Mar 15 16:30:26 2009 +0000
@@ -71,6 +71,13 @@
new_params['sidebar_grouping'] = 'Clubs'
+ new_params['create_dynafields'] = [
+ {'name': 'link_id',
+ 'base': forms.fields.CharField,
+ 'label': 'Club Link ID',
+ },
+ ]
+
new_params['create_extra_dynaproperties'] = {
'clean': cleaning.validate_new_group('link_id', 'scope_path',
model_logic.club, club_app_logic)}
--- a/app/soc/views/models/document.py Sun Mar 15 16:20:24 2009 +0000
+++ b/app/soc/views/models/document.py Sun Mar 15 16:30:26 2009 +0000
@@ -80,6 +80,13 @@
new_params['sans_link_id_create'] = True
new_params['sans_link_id_list'] = True
+ new_params['create_dynafields'] = [
+ {'name': 'link_id',
+ 'base': forms.fields.CharField,
+ 'label': 'Document Link ID',
+ },
+ ]
+
new_params['create_extra_dynaproperties'] = {
'content': forms.fields.CharField(
widget=widgets.FullTinyMCE(attrs={'rows': 25, 'cols': 100})),
--- a/app/soc/views/models/org_app.py Sun Mar 15 16:20:24 2009 +0000
+++ b/app/soc/views/models/org_app.py Sun Mar 15 16:30:26 2009 +0000
@@ -109,6 +109,13 @@
new_params['extra_dynaexclude'] = ['applicant', 'backup_admin', 'status',
'created_on', 'last_modified_on']
+ new_params['create_dynafields'] = [
+ {'name': 'link_id',
+ 'base': forms.fields.CharField,
+ 'label': 'Organization Link ID',
+ },
+ ]
+
new_params['create_extra_dynaproperties'] = {
'scope_path': forms.fields.CharField(widget=forms.HiddenInput,
required=True),
--- a/app/soc/views/models/organization.py Sun Mar 15 16:20:24 2009 +0000
+++ b/app/soc/views/models/organization.py Sun Mar 15 16:30:26 2009 +0000
@@ -121,6 +121,13 @@
new_params['extra_django_patterns'] = patterns
+ new_params['create_dynafields'] = [
+ {'name': 'link_id',
+ 'base': forms.fields.CharField,
+ 'label': 'Organization Link ID',
+ },
+ ]
+
new_params['create_extra_dynaproperties'] = {
'scope_path': forms.CharField(widget=forms.HiddenInput,
required=True),
--- a/app/soc/views/models/program.py Sun Mar 15 16:20:24 2009 +0000
+++ b/app/soc/views/models/program.py Sun Mar 15 16:30:26 2009 +0000
@@ -118,6 +118,13 @@
new_params['extra_django_patterns'] = patterns
+ new_params['create_dynafields'] = [
+ {'name': 'link_id',
+ 'base': forms.fields.CharField,
+ 'label': 'Program Link ID',
+ },
+ ]
+
# TODO add clean field to check for uniqueness in link_id and scope_path
new_params['create_extra_dynaproperties'] = {
'description': forms.fields.CharField(widget=helper.widgets.TinyMCE(
--- a/app/soc/views/models/sponsor.py Sun Mar 15 16:20:24 2009 +0000
+++ b/app/soc/views/models/sponsor.py Sun Mar 15 16:30:26 2009 +0000
@@ -24,6 +24,8 @@
]
+from django import forms
+
from soc.logic import dicts
from soc.logic.models.host import logic as host_logic
from soc.logic.models.sponsor import logic as sponsor_logic
@@ -69,6 +71,13 @@
new_params['document_prefix'] = "sponsor"
new_params['sidebar_grouping'] = 'Programs'
+ new_params['create_dynafields'] = [
+ {'name': 'link_id',
+ 'base': forms.fields.CharField,
+ 'label': 'Sponsor Link ID',
+ },
+ ]
+
params = dicts.merge(params, new_params)
super(View, self).__init__(params=params)