Changeset 8629 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 5 Jun 2012, 14:25:40 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
r8627 r8629 1003 1003 return 1004 1004 1005 def _redirect(self, email, password, applicant_id): 1006 # Forward only email to landing page in base package. 1007 self.redirect(self.url(self.context, 'registration_complete', 1008 data = dict(email=email))) 1009 return 1010 1005 1011 @action(_('Get login credentials'), style='primary') 1006 1012 def register(self, **data): … … 1057 1063 if kofa_utils.sendCredentials(IUserAccount(applicant), 1058 1064 password, login_url, msg): 1059 self.redirect(self.url(self.context, 'registration_complete', 1060 data = dict(email=applicant.email))) 1061 return 1065 email_sent = applicant.email 1062 1066 else: 1063 self.flash(_('Email could not been sent. Please retry later.')) 1067 email_sent = None 1068 self._redirect(email=email_sent, password=password, 1069 applicant_id=applicant.applicant_id) 1064 1070 return 1065 1071 1066 1072 class ApplicantRegistrationEmailSent(KofaPage): 1067 1073 """Landing page after successful registration. 1074 1068 1075 """ 1069 1076 grok.name('registration_complete') … … 1072 1079 label = _('Your registration was successful.') 1073 1080 1074 def update(self, email=None ):1081 def update(self, email=None, applicant_id=None, password=None): 1075 1082 self.email = email 1076 return 1083 self.password = password 1084 self.applicant_id = applicant_id 1085 return -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantregemailsent.pt
r7811 r8629 1 < divi18n:domain="waeup.kofa">2 <p >1 <tal:only_email condition = "not: view/password" i18n:domain="waeup.kofa"> 2 <p tal:condition = "view/email"> 3 3 <span i18n:translate=""> An email with your user name and password 4 4 has been sent to … … 6 6 <span tal:replace="view/email">user@foo.baz</span>. 7 7 </p> 8 <p i18n:translate="">8 <p tal:condition = "view/email" i18n:translate=""> 9 9 Please check your email account to proceed. 10 </p> 11 <p tal:condition = "not: view/email" i18n:translate=""> 12 Email could not been sent. Please retry later. 10 13 </p> 11 14 <p i18n:translate=""> 12 15 Thanks for using Kofa! 13 16 </p> 14 </div> 17 </tal:only_email> 18 19 <tal:credentials condition = "view/password" i18n:domain="waeup.kofa"> 20 <h3 i18n:translate="">Your login credentials are:</h3> 21 <table class="bordered-table span6"> 22 <tr> 23 <td i18n:translate="">User Name:</td> 24 <td tal:content="view/applicant_id">ID</td> 25 <tr> 26 <tr> 27 <td i18n:translate="">Password:</td> 28 <td tal:content="view/password">PASSWORD</td> 29 <tr> 30 </table> 31 <p i18n:translate=""> 32 Print this page and proceed to the 33 <a tal:attributes="href python: view.url(layout.site, 'login')">login form</a>. 34 Please note that passwords are case-sensitive, 35 <br />when entering your credentials, and keep your password secret! 36 </p> 37 <p tal:condition = "view/email"> 38 <span i18n:translate=""> An email with your user name and password 39 has been sent to 40 </span> 41 <span tal:replace="view/email">user@foo.baz</span>. 42 </p> 43 <p i18n:translate=""> 44 Thanks for using Kofa! 45 </p> 46 </tal:credentials>
Note: See TracChangeset for help on using the changeset viewer.