- Timestamp:
- 10 Sep 2012, 11:05:07 (12 years ago)
- Location:
- main/waeup.kofa/branches/uli-async-update
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/branches/uli-async-update
- Property svn:mergeinfo changed
-
main/waeup.kofa/branches/uli-async-update/src/waeup/kofa/applicants/browser.py
r9166 r9169 309 309 pnav = 3 310 310 311 form_fields = grok.AutoFields(IApplicantsContainer).omit('title') 312 form_fields['description'].custom_widget = HTMLDisplayWidget 313 form_fields[ 314 'startdate'].custom_widget = FriendlyDatetimeDisplayWidget('le') 315 form_fields[ 316 'enddate'].custom_widget = FriendlyDatetimeDisplayWidget('le') 311 @property 312 def form_fields(self): 313 form_fields = grok.AutoFields(IApplicantsContainer).omit('title') 314 form_fields['description'].custom_widget = HTMLDisplayWidget 315 form_fields[ 316 'startdate'].custom_widget = FriendlyDatetimeDisplayWidget('le') 317 form_fields[ 318 'enddate'].custom_widget = FriendlyDatetimeDisplayWidget('le') 319 if self.request.principal.id == 'zope.anybody': 320 form_fields = form_fields.omit( 321 'code', 'prefix', 'year', 'mode', 322 'strict_deadline', 'application_category') 323 return form_fields 317 324 318 325 @property … … 494 501 grok.template('applicantdisplaypage') 495 502 form_fields = grok.AutoFields(IApplicant).omit( 496 'locked', 'course_admitted', 'password' )503 'locked', 'course_admitted', 'password', 'suspended') 497 504 label = _('Applicant') 498 505 pnav = 3 506 hide_hint = False 499 507 500 508 @property … … 539 547 grok.name('base') 540 548 form_fields = grok.AutoFields(IApplicant).select( 541 'applicant_id', 'firstname', 'lastname','email', 'course1')549 'applicant_id','email', 'course1') 542 550 543 551 class CreateStudentPage(UtilityView, grok.View): … … 708 716 709 717 def update(self): 710 if self.context.state in ('initialized', 'started' ):718 if self.context.state in ('initialized', 'started', 'paid'): 711 719 self.flash( 712 _('Please pay before trying to download the application slip.'))720 _('Please pay and submit before trying to download the application slip.')) 713 721 return self.redirect(self.url(self.context)) 714 722 return … … 882 890 form_fields = grok.AutoFields(IApplicantEdit).omit( 883 891 'locked', 'course_admitted', 'student_id', 884 's creening_score',892 'suspended' 885 893 ) 886 894 form_fields['applicant_id'].for_display = True … … 1085 1093 # Send email with credentials 1086 1094 login_url = self.url(grok.getSite(), 'login') 1095 url_info = u'Login: %s' % login_url 1087 1096 msg = _('You have successfully been registered for the') 1088 1097 if kofa_utils.sendCredentials(IUserAccount(applicant), 1089 password, login_url, msg):1098 password, url_info, msg): 1090 1099 email_sent = applicant.email 1091 1100 else:
Note: See TracChangeset for help on using the changeset viewer.