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.

File:
1 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')
Note: See TracChangeset for help on using the changeset viewer.