Ignore:
Timestamp:
6 Feb 2020, 09:23:11 (5 years ago)
Author:
Henrik Bettermann
Message:

Add Recruitment application.

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

Legend:

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

    r15951 r15991  
    2727    ICustomApplicant, ICustomUGApplicantEdit, ICustomPGApplicantEdit,
    2828    IPUTMEApplicantEdit, ITranscriptApplicant, ICertificateRequest,
    29     IFedexRequest)
     29    IFedexRequest, IRecruitment)
    3030
    3131class CustomApplicant(NigeriaApplicant):
     
    3434        ICustomPGApplicantEdit, IPUTMEApplicantEdit,
    3535        ITranscriptApplicant, ICertificateRequest,
    36         IFedexRequest)
     36        IFedexRequest, IRecruitment)
    3737    grok.provides(ICustomApplicant)
    3838
  • main/waeup.aaue/trunk/src/waeup/aaue/applicants/browser.py

    r15954 r15991  
    5656    IVerificationRequest,
    5757    ISendByEmailRequest,
    58     IFedexRequest
     58    IFedexRequest,
     59    IRecruitment,
    5960    )
    6061
     
    251252            form_fields = grok.AutoFields(IFedexRequest).omit(
    252253                'locked', 'suspended')
    253             form_fields['dispatch_address'].custom_widget = BytesDisplayWidget
     254        if self.target is not None and self.target == 'rec':
     255            form_fields = grok.AutoFields(IRecruitment).omit(
     256                'locked', 'suspended')
     257            form_fields['address'].custom_widget = BytesDisplayWidget
    254258            return form_fields
    255259        if self.target is not None and self.target == 'send':
     
    426430            form_fields['applicant_id'].for_display = True
    427431            return form_fields
     432        if self.target is not None and self.target == 'rec':
     433            form_fields = grok.AutoFields(IRecruitment)
     434            form_fields['applicant_id'].for_display = True
     435            return form_fields
    428436        # AAUE is using the same interface for all regular applications.
    429437        form_fields = grok.AutoFields(ICustomUGApplicant)
     
    467475            if not store.getFileByContext(self.context, attr=u'passport.jpg'):
    468476                return _('No passport picture uploaded.')
    469             if not self.target[:4] in ('cert', 'tran') and \
     477            if not self.target in ('cert', 'trans') and \
    470478                not self.request.form.get('confirm_passport', False):
    471479                return _('Passport picture confirmation box not ticked.')
     
    553561        if self.target is not None and self.target == 'fedex':
    554562            form_fields = grok.AutoFields(IFedexRequest).omit(
     563                'locked', 'suspended')
     564            form_fields['applicant_id'].for_display = True
     565            return form_fields
     566        if self.target is not None and self.target == 'rec':
     567            form_fields = grok.AutoFields(IRecruitment).omit(
    555568                'locked', 'suspended')
    556569            form_fields['applicant_id'].for_display = True
  • main/waeup.aaue/trunk/src/waeup/aaue/applicants/browser_templates/applicanteditpage.pt

    r15948 r15991  
    101101
    102102  <div tal:condition="python: not view.manage_applications
    103                               and not view.target in ('trans', 'cert')
     103                              and not view.target in ('trans', 'cert', 'rec')
    104104                              and context.__parent__.with_picture">
    105105    <input id="confirm_passport" name="confirm_passport"
     
    116116  </div>
    117117  <div tal:condition="python: not view.manage_applications
    118                               and view.target not in ('trans', 'cert')
     118                              and view.target in ('rec',)
    119119                              and context.__parent__.with_picture">
    120120    <input id="confirm_passport" name="confirm_passport"
  • main/waeup.aaue/trunk/src/waeup/aaue/applicants/interfaces.py

    r15954 r15991  
    6767    )
    6868
     69application_types_vocab = SimpleKofaVocabulary(
     70    (_('Academic Staff Positions'), 'academic'),
     71    (_('Senior Non-Teaching Staff'), 'senior'),
     72    (_('Junior Staff (Non-Teaching)'), 'junior'),
     73    )
     74
    6975request_types_vocab = SimpleKofaVocabulary(
    7076    (_('Scanned Result'), 'result'),
     
    978984        )
    979985
     986class IRecruitment(IKofaObject):
     987    """A recruitment application.
     988    """
     989
     990    suspended = schema.Bool(
     991        title = _(u'Account suspended'),
     992        default = False,
     993        required = False,
     994        )
     995
     996    locked = schema.Bool(
     997        title = _(u'Form locked'),
     998        default = False,
     999        required = False,
     1000        )
     1001
     1002    applicant_id = schema.TextLine(
     1003        title = _(u'Application Id'),
     1004        required = False,
     1005        readonly = False,
     1006        )
     1007
     1008    #reg_number = TextLineChoice(
     1009    #    title = _(u'Kofa Registration Number'),
     1010    #    readonly = False,
     1011    #    required = True,
     1012    #    source = contextual_reg_num_source,
     1013    #    )
     1014
     1015    application_types = schema.Choice(
     1016        title = _(u'Application Category'),
     1017        vocabulary = application_types_vocab,
     1018        required = True,
     1019        )
     1020
     1021    firstname = schema.TextLine(
     1022        title = _(u'First Name'),
     1023        required = True,
     1024        )
     1025
     1026    middlename = schema.TextLine(
     1027        title = _(u'Middle Name'),
     1028        required = False,
     1029        )
     1030
     1031    lastname = schema.TextLine(
     1032        title = _(u'Last Name (Surname)'),
     1033        required = True,
     1034        )
     1035
     1036    sex = schema.Choice(
     1037        title = _(u'Gender'),
     1038        source = GenderSource(),
     1039        required = True,
     1040        )
     1041
     1042    email = schema.ASCIILine(
     1043        title = _(u'Email Address'),
     1044        required = True,
     1045        constraint=validate_email,
     1046        )
     1047
     1048    phone = PhoneNumber(
     1049        title = _(u'Phone'),
     1050        description = u'',
     1051        required = False,
     1052        )
     1053
     1054    address = schema.Text(
     1055        title = _(u'Address'),
     1056        required = True,
     1057        )
     1058
    9801059class ISendByEmailRequest(IKofaObject):
    9811060    """A applicant asking for sending an email.
     
    10591138                       ITranscriptApplicant, ICertificateRequest,
    10601139                       IVerificationRequest, ISendByEmailRequest,
    1061                        IFedexRequest):
     1140                       IFedexRequest, IRecruitment):
    10621141    """An interface for all types of applicants.
    10631142
  • main/waeup.aaue/trunk/src/waeup/aaue/applicants/utils.py

    r15950 r15991  
    4848        'send': ['Send-By-Email Request', 'SE'],
    4949        'fedex': ['Payment for Courier (Fedex)', 'FED'],
     50        'rec': ['AAU Recruitment', 'REC'],
    5051        }
    5152
Note: See TracChangeset for help on using the changeset viewer.