Ignore:
Timestamp:
5 Dec 2011, 07:19:26 (13 years ago)
Author:
Henrik Bettermann
Message:

Define WAeUPForm based on from megrok.layout.Form and use this view in pages.py.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/layout.py

    r7254 r7274  
    2323import grokcore.view
    2424from hurry.resource import mode
    25 from megrok.layout import Page, Layout, EditForm, DisplayForm, AddForm
     25from megrok.layout import Page, Layout, Form, EditForm, DisplayForm, AddForm
    2626from z3c.flashmessage.interfaces import IMessageSource, IMessageReceiver
    2727from zope.component import getUtility, queryUtility, ComponentLookupError
     
    106106    grok.baseclass()
    107107
     108class WAeUPForm(Form, UtilityView):
     109    """A megrok.layout.Form with additional methods.
     110    """
     111    grok.baseclass()
     112
     113    def setUpWidgets(self,ignore_request=False):
     114        super(WAeUPForm,self).setUpWidgets(ignore_request)
     115        if self.widgets.get('subject'):
     116            self.widgets['subject'].displayWidth = 45
     117        if self.widgets.get('body'):
     118            self.widgets['body'].height = 10
     119        if self.widgets.get('body'):
     120            self.widgets['body'].width = 35
     121
    108122class WAeUPPage(Page):
    109123    """A megrok.layout page with additional methods.
Note: See TracChangeset for help on using the changeset viewer.