Changeset 6254 for main/waeup.sirp/trunk/src/waeup/sirp
- Timestamp:
- 31 May 2011, 07:12:39 (14 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/applicants
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
r6198 r6254 44 44 ) 45 45 from waeup.sirp.interfaces import IWAeUPObject, ILocalRolesAssignable 46 from waeup.sirp.university.interfaces import ICertificate 46 47 from waeup.sirp.widgets.datewidget import ( 47 48 FriendlyDateWidget, FriendlyDateDisplayWidget) … … 435 436 grok.name('index') 436 437 grok.require('waeup.handleApplication') 437 form_fields = grok.AutoFields(IApplicant).omit('locked') 438 form_fields = grok.AutoFields(IApplicant).omit('locked').omit('course_admitted') 438 439 #form_fields['fst_sit_results'].custom_widget = list_results_display_widget 439 440 form_fields['passport'].custom_widget = ThumbnailWidget 440 441 form_fields['date_of_birth'].custom_widget = FriendlyDateDisplayWidget('le') 441 442 label = 'Applicant' 443 grok.template('form_display') 442 444 pnav = 3 443 445 … … 450 452 container_title = self.context.__parent__.title 451 453 return '%s Application Record' % container_title 454 455 @property 456 def getCourseAdmitted(self): 457 course_admitted = self.context.course_admitted 458 #import pdb; pdb.set_trace() 459 if ICertificate.providedBy(course_admitted): 460 url = self.url(course_admitted) 461 title = course_admitted.title 462 code = course_admitted.code 463 return '<a href="%s">%s (%s)</a>' %(url,title,code) 464 return 'not yet admitted' 452 465 453 466 class ApplicantsManageActionButton(ManageActionButton): -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/interfaces.py
r6249 r6254 389 389 source = lgas_vocab, 390 390 title = u'State/LGA', 391 required = False, 391 default = 'foreigner', 392 required = True, 392 393 ) 393 394 sex = schema.Choice( … … 439 440 ) 440 441 course_admitted = schema.Choice( 441 # XXX: should be choice442 442 title = u'Admitted Course of Study', 443 443 source = CertificateSource(), 444 default = None, 444 445 required = False, 445 446 ) … … 489 490 required = False, 490 491 readonly = True, 492 default = None, 491 493 ) 492 494 entry_session = schema.TextLine(
Note: See TracChangeset for help on using the changeset viewer.