Ignore:
Timestamp:
6 Aug 2018, 06:48:42 (6 years ago)
Author:
Henrik Bettermann
Message:

Remove some fields from certificate application form.

Remove passport picture requirement.

Location:
main/waeup.aaue/trunk/src/waeup/aaue/applicants
Files:
3 edited

Legend:

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

    r15091 r15099  
    239239            form_fields = grok.AutoFields(ICertificateRequest).omit(
    240240                'locked', 'suspended')
    241             form_fields['dispatch_address'].custom_widget = BytesDisplayWidget
    242             form_fields['perm_address'].custom_widget = BytesDisplayWidget
     241            #form_fields['dispatch_address'].custom_widget = BytesDisplayWidget
     242            #form_fields['perm_address'].custom_widget = BytesDisplayWidget
    243243            return form_fields
    244244        # AAUE is using the same interface for all regular applications.
     
    392392    def unremovable(self, ticket):
    393393        return True
     394
     395    def dataNotComplete(self):
     396        store = getUtility(IExtFileStore)
     397        if not self.target[:4] in ('cert', 'tran'):
     398            if store.getFileByContext(self.context, attr=u'passport.jpg'):
     399                return _('No passport picture uploaded.')
     400            if not self.request.form.get('confirm_passport', False):
     401                return _('Passport picture confirmation box not ticked.')
     402        return False
    394403
    395404    # AAUE applicants never see the 'Remove Selected Tickets' button.
  • main/waeup.aaue/trunk/src/waeup/aaue/applicants/interfaces.py

    r14829 r15099  
    747747        )
    748748
    749     perm_address = schema.Text(
    750         title = _(u'Current Local Address'),
    751         required = False,
    752         readonly = False,
    753         )
    754 
    755     dispatch_address = schema.Text(
    756         title = _(u'Dispatch Addresses'),
    757         description = u'Addresses to which certificate should be posted.',
    758         required = False,
    759         readonly = False,
    760         )
    761 
    762749    entry_session = schema.Choice(
    763750        title = _(u'Entry Session'),
     
    781768        )
    782769
    783     no_copies = schema.Choice(
    784         title = _(u'Number of Copies'),
    785         description = u'Must correspond with the number of dispatch addresses above.',
    786         values=[1, 2, 3, 4],
    787         required = False,
    788         readonly = False,
    789         default = 1,
    790         )
    791770
    792771class ICustomApplicant(ICustomUGApplicant, ICustomPGApplicant,
  • main/waeup.aaue/trunk/src/waeup/aaue/applicants/tests/test_browser.py

    r15091 r15099  
    187187        self.browser.open(self.certapplicant_path)
    188188        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    189         self.assertTrue("Dispatch Address" in self.browser.contents)
     189        #self.assertTrue("Dispatch Address" in self.browser.contents)
    190190
    191191    def test_certificate_request_update(self):
Note: See TracChangeset for help on using the changeset viewer.