Ignore:
Timestamp:
30 Oct 2015, 08:09:05 (9 years ago)
Author:
Henrik Bettermann
Message:

Allow also reg_number on public page to check application status without password.

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

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/CHANGES.txt

    r13346 r13363  
    441.3.4.dev0 (unreleased)
    55=======================
     6
     7* Allow also reg_number on public page to check application status
     8  without password.
    69
    710* Remove `beds_reserved` attribute from hostels. Hostels do no longer
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py

    r13356 r13363  
    13231323                # No need to flash something.
    13241324                return
    1325             applicant_id = form.get('applicant_id', None)
     1325            unique_id = form.get('unique_id', None)
    13261326            lastname = form.get('lastname', None)
    1327             if not applicant_id or not lastname:
     1327            if not unique_id or not lastname:
    13281328                self.flash(
    13291329                    _('Required input missing.'), type='warning')
     
    13311331            cat = getUtility(ICatalog, name='applicants_catalog')
    13321332            results = list(
    1333                 cat.searchResults(applicant_id=(applicant_id, applicant_id)))
     1333                cat.searchResults(applicant_id=(unique_id, unique_id)))
     1334            if not results:
     1335                results = list(
     1336                    cat.searchResults(reg_number=(unique_id, unique_id)))
    13341337            if results:
    13351338                applicant = results[0]
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantcheckstatus.pt

    r13358 r13363  
    44    <tr>
    55      <td i18n:translate="" class="fieldname">
    6         Applicant Id:
     6        Registration Number or Applicant Id:
    77      </td>
    88      <td>
    9         <input class="textType half" type="text" name="applicant_id" />
     9        <input class="textType half" type="text" name="unique_id" />
    1010      </td>
    1111    </tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py

    r13282 r13363  
    13881388        self.applicant.lastname = u'Lion '
    13891389        self.browser.open('http://localhost/app/applicants/checkstatus')
    1390         self.browser.getControl(name="applicant_id").value = 'nonsense'
     1390        self.browser.getControl(name="unique_id").value = 'nonsense'
    13911391        self.browser.getControl(name="lastname").value = 'Lion'
    13921392        self.browser.getControl("Submit").click()
    13931393        self.assertTrue('No application record found' in self.browser.contents)
    1394         self.browser.getControl(name="applicant_id").value = self.applicant.applicant_id
     1394        self.browser.getControl(name="unique_id").value = self.applicant.applicant_id
    13951395        self.browser.getControl(name="lastname").value = 'nonsense'
    13961396        self.browser.getControl("Submit").click()
    13971397        self.assertTrue('No application record found' in self.browser.contents)
    1398         self.browser.getControl(name="applicant_id").value = self.applicant.applicant_id
     1398        self.browser.getControl(name="unique_id").value = self.applicant.applicant_id
    13991399        self.browser.getControl(name="lastname").value = 'Lion'
    14001400        self.browser.getControl("Submit").click()
     
    14031403        IWorkflowState(self.applicant).setState('admitted')
    14041404        self.browser.open('http://localhost/app/applicants/checkstatus')
    1405         self.browser.getControl(name="applicant_id").value = self.applicant.applicant_id
     1405        self.browser.getControl(name="unique_id").value = self.applicant.applicant_id
    14061406        # whitespaces are ignored
    14071407        self.browser.getControl(name="lastname").value = 'Lion'
     
    14111411        self.applicant.course_admitted = self.certificate
    14121412        self.browser.open('http://localhost/app/applicants/checkstatus')
    1413         self.browser.getControl(name="applicant_id").value = self.applicant.applicant_id
     1413        self.browser.getControl(name="unique_id").value = self.applicant.applicant_id
     1414        self.browser.getControl(name="lastname").value = 'Lion'
     1415        self.browser.getControl("Submit").click()
     1416        self.assertTrue('Congratulations!' in self.browser.contents)
     1417        self.assertTrue('Unnamed Certificate (CERT1)' in self.browser.contents)
     1418        self.assertTrue('Department of Unnamed Department (dep1)' in self.browser.contents)
     1419        self.assertTrue('Faculty of Unnamed Faculty (NA)' in self.browser.contents)
     1420        # also the reg_number can be used
     1421        self.browser.open('http://localhost/app/applicants/checkstatus')
     1422        self.browser.getControl(name="unique_id").value = self.applicant.reg_number
    14141423        self.browser.getControl(name="lastname").value = 'Lion'
    14151424        self.browser.getControl("Submit").click()
Note: See TracChangeset for help on using the changeset viewer.