app/soc/views/models/org_app.py
changeset 1566 5388270fb363
parent 1559 283046e54c01
child 1584 d8ba8c917f37
equal deleted inserted replaced
1565:d36ad73a2060 1566:5388270fb363
    32 from soc.logic import dicts
    32 from soc.logic import dicts
    33 from soc.logic import mail_dispatcher
    33 from soc.logic import mail_dispatcher
    34 from soc.logic import models as model_logic
    34 from soc.logic import models as model_logic
    35 from soc.logic.models import program as program_logic
    35 from soc.logic.models import program as program_logic
    36 from soc.logic.models import org_app as org_app_logic
    36 from soc.logic.models import org_app as org_app_logic
       
    37 from soc.views import helper
    37 from soc.views.helper import access
    38 from soc.views.helper import access
    38 from soc.views.helper import decorators
    39 from soc.views.helper import decorators
    39 from soc.views.helper import redirects
    40 from soc.views.helper import redirects
    40 from soc.views.helper import responses
    41 from soc.views.helper import responses
    41 from soc.views.helper import widgets
    42 from soc.views.helper import widgets
   106         'created_on', 'last_modified_on']
   107         'created_on', 'last_modified_on']
   107 
   108 
   108     new_params['create_extra_dynaproperties'] = {
   109     new_params['create_extra_dynaproperties'] = {
   109         'scope_path': forms.fields.CharField(widget=forms.HiddenInput,
   110         'scope_path': forms.fields.CharField(widget=forms.HiddenInput,
   110                                              required=True),
   111                                              required=True),
       
   112         'contrib_template': forms.fields.CharField(
       
   113             widget=helper.widgets.FullTinyMCE(
       
   114                 attrs={'rows': 25, 'cols': 100})),
   111         'admin_agreement': forms.fields.Field(required=False,
   115         'admin_agreement': forms.fields.Field(required=False,
   112             widget=widgets.AgreementField),
   116             widget=widgets.AgreementField),
   113         'agreed_to_admin_agreement': forms.fields.BooleanField(
   117         'agreed_to_admin_agreement': forms.fields.BooleanField(
   114             initial=False, required=True),
   118             initial=False, required=True),
   115         'clean_ideas': cleaning.clean_url('ideas'),
   119         'clean_ideas': cleaning.clean_url('ideas'),
   116         'clean_contrib_template': cleaning.clean_url('contrib_template'),
       
   117         'clean': cleaning.validate_new_group('link_id', 'scope_path',
   120         'clean': cleaning.validate_new_group('link_id', 'scope_path',
   118             model_logic.organization, org_app_logic)}
   121             model_logic.organization, org_app_logic)}
   119 
   122 
   120     # get rid of the clean method
   123     # get rid of the clean method
   121     new_params['edit_extra_dynaproperties'] = {
   124     new_params['edit_extra_dynaproperties'] = {