Ignore:
Timestamp:
7 Jun 2025, 02:06:59 (4 days ago)
Author:
uli
Message:

Support Google Recaptcha v3.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/branches/uli-recaptcha/src/waeup/kofa/applicants/browser.py

    r18021 r18083  
    5050from waeup.kofa.applicants.applicant import search
    5151from waeup.kofa.applicants.workflow import (
    52     INITIALIZED, STARTED, PAID, SUBMITTED, 
     52    INITIALIZED, STARTED, PAID, SUBMITTED,
    5353    ADMITTED, NOT_ADMITTED, CREATED, PROCESSED)
    5454from waeup.kofa.browser import (
     
    843843    def render(self):
    844844        return
    845        
     845
    846846class BalancePaymentAddFormPage(KofaAddFormPage):
    847847    """ Page to add an online payment which can balance s previous session
     
    10781078    manage_applications = True
    10791079    pnav = 3
    1080    
     1080
    10811081    @property
    10821082    def display_actions(self):
     
    12121212        if self.upload_success is False:  # False is not None!
    12131213            # Error during image upload. Ignore other values.
    1214             return 
     1214            return
    12151215        changed_fields = self.applyData(self.context, **data)
    12161216        # Turn list of lists into single list
     
    15781578        # Handle captcha
    15791579        self.captcha = getUtility(ICaptchaManager).getCaptcha()
    1580         self.captcha_result = self.captcha.verify(self.request)
    1581         self.captcha_code = self.captcha.display(self.captcha_result.error_code)
     1580        self.captcha_result = self.captcha.verify(
     1581            self.request, 'applicant_register')
     1582        self.captcha_code = self.captcha.display(
     1583            self.captcha_result.error_code, 'applicant_register')
    15821584        return
    15831585
     
    17071709        # Handle captcha
    17081710        self.captcha = getUtility(ICaptchaManager).getCaptcha()
    1709         self.captcha_result = self.captcha.verify(self.request)
    1710         self.captcha_code = self.captcha.display(self.captcha_result.error_code)
     1711        self.captcha_result = self.captcha.verify(
     1712            self.request, 'check_appl_status')
     1713        self.captcha_code = self.captcha.display(
     1714            self.captcha_result.error_code, 'check_appl_status')
    17111715        if SUBMIT:
    17121716            if not self.captcha_result.is_valid:
     
    17921796        # Handle captcha
    17931797        self.captcha = getUtility(ICaptchaManager).getCaptcha()
    1794         self.captcha_result = self.captcha.verify(self.request)
    1795         self.captcha_code = self.captcha.display(self.captcha_result.error_code)
     1798        self.captcha_result = self.captcha.verify(
     1799            self.request, 'check_trans_state')
     1800        self.captcha_code = self.captcha.display(
     1801            self.captcha_result.error_code, 'check_trans_state')
    17961802        if SUBMIT:
    17971803            self.results = []
     
    20872093            args = {'mandate_id':mandate.mandate_id}
    20882094            # Check if report exists.
    2089             # (1) If mandate has been used to create a report, 
     2095            # (1) If mandate has been used to create a report,
    20902096            # redirect to the pdf file.
    20912097            if mandate.params.get('redirect_path2'):
Note: See TracChangeset for help on using the changeset viewer.