Changeset 7834 for main/waeup.kofa/trunk


Ignore:
Timestamp:
11 Mar 2012, 09:17:32 (13 years ago)
Author:
Henrik Bettermann
Message:

Cancel needs no form validation.

Simplify StudyLevelBreadcrumb?.

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

    r7833 r7834  
    13231323        self.redirect(self.url(self.context, u'@@manage')+'?tab1')
    13241324
    1325     @action(_('Cancel'))
     1325    @action(_('Cancel'), validator=NullValidator)
    13261326    def cancel(self, **data):
    13271327        self.redirect(self.url(self.context))
     
    14391439        self.redirect(self.url(self.context, u'@@manage')+'?tab2')
    14401440
    1441     @action(_('Cancel'))
     1441    @action(_('Cancel'), validator=NullValidator)
    14421442    def cancel(self, **data):
    14431443        self.redirect(self.url(self.context))
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r7833 r7834  
    3434from waeup.kofa.browser import (
    3535    KofaPage, KofaEditFormPage, KofaAddFormPage, KofaDisplayFormPage,
    36     ContactAdminForm, KofaForm)
     36    ContactAdminForm, KofaForm, NullValidator)
    3737from waeup.kofa.browser.interfaces import ICaptchaManager
    3838from waeup.kofa.browser.breadcrumbs import Breadcrumb
     
    155155    @property
    156156    def title(self):
    157         portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    158         # There is no request attribute, thus we can only translate
    159         # to the default (portal) language
    160         return translate(self.context.level_title, 'waeup.kofa',
    161             target_language=portal_language)
     157        return self.context.level_title
    162158
    163159class StudentsContainerPage(KofaPage):
     
    886882        return
    887883
    888     @action(_('Cancel'))
     884    @action(_('Cancel'), validator=NullValidator)
    889885    def cancel(self, **data):
    890886        self.redirect(self.url(self.context))
Note: See TracChangeset for help on using the changeset viewer.