contrib template in org_app is now a TextProperty.
authorLennard de Rijk <ljvderijk@gmail.com>
Sat, 28 Feb 2009 21:08:02 +0000
changeset 1566 5388270fb363
parent 1565 d36ad73a2060
child 1567 b5589e656ed1
contrib template in org_app is now a TextProperty. Organization can design their own template that students can use to propose. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed
app/soc/models/org_app.py
app/soc/views/models/org_app.py
--- a/app/soc/models/org_app.py	Sat Feb 28 20:44:14 2009 +0000
+++ b/app/soc/models/org_app.py	Sat Feb 28 21:08:02 2009 +0000
@@ -68,15 +68,13 @@
     'list is not used please specify another method of communication used '
     'within the group.')
 
-  contrib_template = db.LinkProperty(required=False, verbose_name=ugettext(
-      'What is the URL to the application template would you like contributors'
+  contrib_template = db.TextProperty(required=False, verbose_name=ugettext(
+      'What is the application template you would like contributors'
       ' to your organization to use.'))
   contrib_template.help_text = ugettext(
       'This template can be used by contributors, such as students'
       ' and other non-member participants, when they apply to contribute'
       ' to the organization.')
-  contrib_template.help_text = ugettext('For instance a link to a Melange '
-      'public document or some other URL')
 
   contrib_disappears = db.TextProperty(required=True, verbose_name=ugettext(
       'What is your plan for dealing with disappearing contributors?'))
--- a/app/soc/views/models/org_app.py	Sat Feb 28 20:44:14 2009 +0000
+++ b/app/soc/views/models/org_app.py	Sat Feb 28 21:08:02 2009 +0000
@@ -34,6 +34,7 @@
 from soc.logic import models as model_logic
 from soc.logic.models import program as program_logic
 from soc.logic.models import org_app as org_app_logic
+from soc.views import helper
 from soc.views.helper import access
 from soc.views.helper import decorators
 from soc.views.helper import redirects
@@ -108,12 +109,14 @@
     new_params['create_extra_dynaproperties'] = {
         'scope_path': forms.fields.CharField(widget=forms.HiddenInput,
                                              required=True),
+        'contrib_template': forms.fields.CharField(
+            widget=helper.widgets.FullTinyMCE(
+                attrs={'rows': 25, 'cols': 100})),
         'admin_agreement': forms.fields.Field(required=False,
             widget=widgets.AgreementField),
         'agreed_to_admin_agreement': forms.fields.BooleanField(
             initial=False, required=True),
         'clean_ideas': cleaning.clean_url('ideas'),
-        'clean_contrib_template': cleaning.clean_url('contrib_template'),
         'clean': cleaning.validate_new_group('link_id', 'scope_path',
             model_logic.organization, org_app_logic)}