app/soc/views/models/survey.py
changeset 2558 ba32a4f5716b
parent 2546 df7e4291c23c
child 2560 a944c0169ad8
equal deleted inserted replaced
2557:cba50e22ff6b 2558:ba32a4f5716b
   152          'base': forms.fields.CharField,
   152          'base': forms.fields.CharField,
   153          'label': 'Survey Link ID',
   153          'label': 'Survey Link ID',
   154          },
   154          },
   155         ]
   155         ]
   156 
   156 
   157     # survey_html: save form content if POST fails, so fields remain in UI
       
   158     new_params['create_extra_dynaproperties'] = {
   157     new_params['create_extra_dynaproperties'] = {
   159         #'survey_content': forms.fields.CharField(widget=surveys.EditSurvey(),
   158         'content': forms.fields.CharField(required=False, label='Description',
   160                                                  #required=False),
   159             widget=widgets.FullTinyMCE(attrs={'rows': 25, 'cols': 100})),
   161         'survey_html': forms.fields.CharField(widget=forms.HiddenInput,
   160         'survey_html': forms.fields.CharField(widget=forms.HiddenInput,
   162                                               required=False),
   161                                               required=False),
   163         'scope_path': forms.fields.CharField(widget=forms.HiddenInput,
   162         'scope_path': forms.fields.CharField(widget=forms.HiddenInput,
   164                                              required=True),
   163                                              required=True),
   165         'prefix': forms.fields.CharField(widget=widgets.ReadOnlyInput(),
   164         'prefix': forms.fields.CharField(widget=widgets.ReadOnlyInput(),
   168         'clean_link_id': cleaning.clean_link_id('link_id'),
   167         'clean_link_id': cleaning.clean_link_id('link_id'),
   169         'clean_scope_path': cleaning.clean_scope_path('scope_path'),
   168         'clean_scope_path': cleaning.clean_scope_path('scope_path'),
   170         'clean': cleaning.validate_document_acl(self, True),
   169         'clean': cleaning.validate_document_acl(self, True),
   171         }
   170         }
   172 
   171 
   173     new_params['extra_dynaexclude'] = ['author', 'created', 'content',
   172     new_params['extra_dynaexclude'] = ['author', 'created',
   174                                        'home_for', 'modified_by', 'modified',
   173                                        'home_for', 'modified_by', 'modified',
   175                                        'take_survey', 'survey_content']
   174                                        'take_survey', 'survey_content']
   176 
   175 
   177     new_params['edit_extra_dynaproperties'] = {
   176     new_params['edit_extra_dynaproperties'] = {
   178         'doc_key_name': forms.fields.CharField(widget=forms.HiddenInput),
   177         'doc_key_name': forms.fields.CharField(widget=forms.HiddenInput),