- Timestamp:
- 24 May 2013, 05:18:59 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.futminna/trunk/src/waeup/futminna/applicants/interfaces.py
r10204 r10217 20 20 21 21 from zope import schema 22 from zope.interface import Attribute, invariant, Invalid 22 23 from waeup.kofa.applicants.interfaces import ( 23 24 IApplicantBaseData, … … 41 42 PUTME_OMIT_PDF_FIELDS, 42 43 PUTME_OMIT_MANAGE_FIELDS, 43 PUTME_OMIT_EDIT_FIELDS, 44 PUTME_OMIT_FIELDS, 45 #PUTME_OMIT_EDIT_FIELDS, 44 46 ) 47 48 PUTME_OMIT_EDIT_FIELDS = UG_OMIT_EDIT_FIELDS + PUTME_OMIT_FIELDS + ( 49 'firstname', 'middlename', 'lastname', 'sex', 50 'lga') 45 51 46 52 PG_OMIT_DISPLAY_FIELDS = OMIT_DISPLAY_FIELDS + ('course2',) … … 83 89 course2 = schema.Choice( 84 90 title = _(u'2nd Choice Course of Study'), 85 description = _(u'Comment which explains why applicant must select a 2nd Choice Course of Study.'), 86 source = AppCatCertificateSource(), 87 required = True, 91 source = AppCatCertificateSource(), 92 required = False, 88 93 ) 89 94 hq_type = schema.Choice( … … 167 172 ) 168 173 174 @invariant 175 def second_choice(applicant): 176 if applicant.course1 == applicant.course2: 177 raise Invalid(_("2nd choice course must differ from 1st choice course.")) 169 178 170 179 class ICustomPGApplicant(IApplicantBaseData): … … 259 268 """ 260 269 270 course1 = schema.Choice( 271 title = _(u'1st Choice Course of Study'), 272 source = AppCatCertificateSource(), 273 required = True, 274 readonly = True, 275 ) 276 277 course2 = schema.Choice( 278 title = _(u'2nd Choice Course of Study'), 279 description = _(u'Comment which explains why applicant must select a 2nd Choice Course of Study.'), 280 source = AppCatCertificateSource(), 281 required = True, 282 ) 283 261 284 class ICustomPGApplicantEdit(ICustomPGApplicant): 262 285 """A postgraduate applicant interface for editing.
Note: See TracChangeset for help on using the changeset viewer.