Changeset 9857


Ignore:
Timestamp:
10 Jan 2013, 07:02:42 (12 years ago)
Author:
Henrik Bettermann
Message:

Reset default value of body field to avoid that the last officer comment is pre-filled in all contact forms.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py

    r9845 r9857  
    350350    form_fields = grok.AutoFields(IContactForm).select('body')
    351351
     352    def update(self):
     353        super(ContactAdminForm, self).update()
     354        self.form_fields.get('body').field.default = None
     355        return
     356
    352357    @property
    353358    def config(self):
     
    393398
    394399    def update(self):
     400        super(EnquiriesForm, self).update()
    395401        # Handle captcha
    396402        self.captcha = getUtility(ICaptchaManager).getCaptcha()
    397403        self.captcha_result = self.captcha.verify(self.request)
    398404        self.captcha_code = self.captcha.display(self.captcha_result.error_code)
    399         return super(EnquiriesForm, self).update()
     405        return
    400406
    401407    @action(_('Send now'), style='primary')
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r9845 r9857  
    426426
    427427    def update(self, subject=u'', body=u''):
     428        super(ContactStudentForm, self).update()
    428429        self.form_fields.get('subject').field.default = subject
    429430        self.form_fields.get('body').field.default = body
    430         return super(ContactStudentForm, self).update()
     431        return
    431432
    432433    def label(self):
Note: See TracChangeset for help on using the changeset viewer.