Changeset 7368 for main/waeup.sirp/trunk/src
- Timestamp:
- 18 Dec 2011, 08:16:16 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp
- Files:
-
- 3 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
r7365 r7368 305 305 text = 'Manage applicants container' 306 306 307 class ApplicantRegisterActionButton(ManageActionButton): 308 grok.order(2) 309 grok.context(IApplicantsContainer) 310 grok.view(ApplicantsContainerPage) 311 grok.require('waeup.Anonymous') 312 icon = 'actionicon_login.png' 313 text = 'Register for application' 314 target = 'register' 315 307 316 class ApplicantsContainerManageFormPage(SIRPEditFormPage): 308 317 grok.context(IApplicantsContainer) … … 408 417 'firstname', 'middlename', 'lastname', 409 418 'email', 'phone') 410 title = 'Applicants'411 419 label = 'Add applicant' 412 420 pnav = 3 … … 1096 1104 grok.require('waeup.Public') 1097 1105 grok.template('applicantregister') 1098 label = 'Applicant Registration'1099 title = label1100 1106 form_fields = grok.AutoFields(IApplicantEdit).select( 1101 1107 'firstname', 'middlename', 'lastname', 'email', 'phone') 1102 1108 form_fields['phone'].custom_widget = PhoneWidget 1103 1109 1110 @property 1111 def title(self): 1112 return "Applicants Container: %s" % self.context.title 1113 1114 @property 1115 def label(self): 1116 return "Register for %s Application" % self.context.title 1117 1104 1118 def update(self): 1105 # handle captcha 1119 # Check if application has started ... 1120 if not self.context.startdate or self.context.startdate > date.today(): 1121 self.flash('Application has not yet started.') 1122 self.redirect(self.url(self.context)) 1123 return 1124 # ... or ended 1125 if not self.context.enddate or self.context.enddate < date.today(): 1126 self.flash('Application has ended.') 1127 self.redirect(self.url(self.context)) 1128 return 1129 # Handle captcha 1106 1130 self.captcha = getUtility(ICaptchaManager).getCaptcha() 1107 1131 self.captcha_result = self.captcha.verify(self.request) … … 1109 1133 return 1110 1134 1111 @grok.action(' Register')1135 @grok.action('Send login credentials') 1112 1136 def register(self, **data): 1113 1137 if not self.captcha_result.is_valid: … … 1132 1156 pwd,login_url,email_to,subject) 1133 1157 if success: 1134 self.flash('An email with your user name and password ' +1158 self.flash('An email with your user name and password ' + 1135 1159 'has been sent to %s.' % email_to) 1136 1160 else: -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantregister.pt
r7365 r7368 50 50 </tbody> 51 51 </table> 52 52 <p> An account will be created for you and an email with your login credentials 53 will be sent to the address provided. 54 </p> 53 55 <div class="actionButtons" tal:condition="view/availableActions"> 54 56 <input tal:repeat="action view/actions" … … 56 58 /> 57 59 </div> 58 59 60 60 </form> -
main/waeup.sirp/trunk/src/waeup/sirp/utils/utils.py
r7365 r7368 77 77 %s 78 78 Student Registration and Information Portal of 79 %s 79 %s. 80 80 81 Your user name is: %s82 Your password is: %s81 Your user name: %s 82 Your password: %s 83 83 Login page: %s 84 84
Note: See TracChangeset for help on using the changeset viewer.