Ignore:
Timestamp:
26 Oct 2015, 14:35:35 (9 years ago)
Author:
Henrik Bettermann
Message:

Tell the student which data are missing.

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

Legend:

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

    r13344 r13349  
    23142314    @property
    23152315    def all_required_fields_filled(self):
    2316         if self.context.email and self.context.phone:
    2317             return True
    2318         return False
     2316        if not self.context.email:
     2317            return _("Email address is missing.")
     2318        if not self.context.phone:
     2319            return _("Phone number is missing.")
     2320        return
    23192321
    23202322    @property
     
    23342336            self.redirect(self.url(self.context, 'change_portrait'))
    23352337            return
    2336         if not self.all_required_fields_filled:
    2337             self.flash(_("Not all required fields filled."), type="warning")
     2338        arf_warning = self.all_required_fields_filled
     2339        if arf_warning:
     2340            self.flash(arf_warning, type="warning")
    23382341            self.redirect(self.url(self.context, 'edit_base'))
    23392342            return
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r13345 r13349  
    24132413        # Uups, we forgot to fill the phone fields
    24142414        self.browser.getControl("Start clearance").click()
    2415         self.assertMatches('...Not all required fields filled...',
     2415        self.assertMatches('...Phone number is missing...',
    24162416                           self.browser.contents)
    24172417        self.browser.open(self.student_path + '/edit_base')
Note: See TracChangeset for help on using the changeset viewer.