Changeset 16976
- Timestamp:
- 29 Jun 2022, 10:24:59 (2 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
r16960 r16976 1406 1406 mapping = {'a': emails_sent}) 1407 1407 IWorkflowInfo(self.context).fireTransition('submit') 1408 # Send confirmation email 1409 getUtility(IKofaUtils).informApplicant(self.context) 1408 1410 # application_date is used in export files for sorting. 1409 1411 # We can thus store utc. -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py
r16746 r16976 319 319 ) 320 320 321 send_email= schema.Bool( 322 title = _(u'Send email after submission'), 323 required = False, 324 default = False, 325 ) 326 321 327 def addApplicant(applicant): 322 328 """Add an applicant. -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
r16801 r16976 1970 1970 referee2.name = u'Otis Stone' 1971 1971 referee2.email = 'otis@stones.de' 1972 self.applicant.__parent__.send_email = True 1972 1973 self.applicant.referees = [referee1, referee2] 1973 1974 self.assertFalse(referee1.email_sent) … … 2042 2043 '\nmsg: Sample University' 2043 2044 '\nmsg: ' 2045 '\nSending email from no-reply@waeup.org to xx@yy.zz:' 2046 '\nMessage:' 2047 '\nmsg: MIME-Version: 1.0' 2048 '\nmsg: Content-Type: text/plain; charset="us-ascii"' 2049 '\nmsg: Content-Transfer-Encoding: 7bit' 2050 '\nmsg: From: Administrator <no-reply@waeup.org>' 2051 '\nmsg: To: John Anthony Tester <xx@yy.zz>' 2052 '\nmsg: Reply-To: Administrator <contact@waeup.org>' 2053 '\nmsg: Subject: Your application form was successfully submitted' 2054 '\nmsg: ' 2055 '\nmsg: Dear John Anthony Tester,' 2056 '\nmsg: ' 2057 '\nmsg: Your application app2020_<6-DIGITS> has been successfully submitted to Sample University.' 2058 '\nmsg: ' 2059 '\nmsg: Regards' 2060 '\nmsg: ' 2044 2061 % (session_1, session_1, session_2, mandate_id_0, 2045 2062 session_1, session_1, session_2, mandate_id_1,), -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_export.py
r15918 r16976 73 73 result, 74 74 'application_category,application_fee,application_slip_notice,code,' 75 'description,enddate,hidden,mode,prefix,s tartdate,'75 'description,enddate,hidden,mode,prefix,send_email,startdate,' 76 76 'strict_deadline,title,with_picture,year\r\n' 77 77 78 78 'basic,0.0,,dp2017,' 79 79 '"Some Description\nwith linebreak\n<<de>>man spriht deutsh",' 80 '2017-01-31 23:00:00+00:00#,0,,app, 2017-01-01 12:00:00+00:00#,1,'80 '2017-01-31 23:00:00+00:00#,0,,app,0,2017-01-01 12:00:00+00:00#,1,' 81 81 'General Studies,1,2017\r\n' 82 82 ) -
main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py
r16828 r16976 405 405 406 406 407 def informApplicant(self, applicant): 408 """Inform applicant that the application form was successfully 409 submitted. 410 """ 411 if not getattr(applicant.__parent__, 'send_email', False): 412 return 413 subject = 'Your application form was successfully submitted' 414 text = _(u"""Dear ${a}, 415 416 Your application ${b} has been successfully submitted to ${c}. 417 418 Regards 419 """) 420 config = grok.getSite()['configuration'] 421 from_name = config.name_admin 422 from_addr = config.email_admin 423 rcpt_name = applicant.display_fullname 424 rcpt_addr = applicant.email 425 session = '%s/%s' % ( 426 applicant.__parent__.year, applicant.__parent__.year+1) 427 text = _(text, mapping={ 428 'a': rcpt_name, 429 'b': applicant.applicant_id, 430 'c': config.name, 431 }) 432 body = translate(text, 'waeup.kofa', 433 target_language=self.PORTAL_LANGUAGE) 434 return send_mail( 435 from_name, from_addr, rcpt_name, rcpt_addr, 436 subject, body, config) 437 407 438 def inviteReferee(self, referee, applicant, url_info=None): 408 439 """Send invitation email to referee.
Note: See TracChangeset for help on using the changeset viewer.