Ignore:
Timestamp:
29 Jun 2022, 10:24:59 (2 years ago)
Author:
Henrik Bettermann
Message:

Send email after final submission of application form.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/applicants
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py

    r16960 r16976  
    14061406                    mapping = {'a':  emails_sent})
    14071407        IWorkflowInfo(self.context).fireTransition('submit')
     1408        # Send confirmation email
     1409        getUtility(IKofaUtils).informApplicant(self.context)
    14081410        # application_date is used in export files for sorting.
    14091411        # We can thus store utc.
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py

    r16746 r16976  
    319319        )
    320320
     321    send_email= schema.Bool(
     322        title = _(u'Send email after submission'),
     323        required = False,
     324        default = False,
     325        )
     326
    321327    def addApplicant(applicant):
    322328        """Add an applicant.
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py

    r16801 r16976  
    19701970        referee2.name = u'Otis Stone'
    19711971        referee2.email = 'otis@stones.de'
     1972        self.applicant.__parent__.send_email = True
    19721973        self.applicant.referees = [referee1, referee2]
    19731974        self.assertFalse(referee1.email_sent)
     
    20422043            '\nmsg: Sample University'
    20432044            '\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: '
    20442061            % (session_1, session_1, session_2, mandate_id_0,
    20452062               session_1, session_1, session_2, mandate_id_1,),
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_export.py

    r15918 r16976  
    7373            result,
    7474            'application_category,application_fee,application_slip_notice,code,'
    75             'description,enddate,hidden,mode,prefix,startdate,'
     75            'description,enddate,hidden,mode,prefix,send_email,startdate,'
    7676            'strict_deadline,title,with_picture,year\r\n'
    7777
    7878            'basic,0.0,,dp2017,'
    7979            '"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,'
    8181            'General Studies,1,2017\r\n'
    8282            )
Note: See TracChangeset for help on using the changeset viewer.