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

Cancel needs no form validation.

Simplify StudyLevelBreadcrumb?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.