Ignore:
Timestamp:
22 Feb 2014, 20:41:35 (11 years ago)
Author:
uli
Message:

Merge changes from henrik-diazo-themed back into trunk.

Location:
main/waeup.aaue/trunk
Files:
4 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk

  • main/waeup.aaue/trunk/src/waeup/aaue

  • main/waeup.aaue/trunk/src/waeup/aaue/applicants/browser.py

    r10929 r11291  
    3535    UG_OMIT_PDF_FIELDS,
    3636    UG_OMIT_MANAGE_FIELDS,
    37     UG_OMIT_EDIT_FIELDS,
    38     PG_OMIT_DISPLAY_FIELDS,
    39     PG_OMIT_PDF_FIELDS,
    40     PG_OMIT_MANAGE_FIELDS,
    41     PG_OMIT_EDIT_FIELDS)
     37    UG_OMIT_EDIT_FIELDS)
    4238from waeup.aaue.applicants.interfaces import (
    4339    ICustomApplicant,
    4440    ICustomUGApplicant,
    45     ICustomPGApplicant,
    46     ICustomPGApplicantEdit,
    47     ICustomUGApplicantEdit)
     41    ICustomUGApplicantEdit
     42    )
    4843
    49 UG_OMIT_PDF_FIELDS = [
    50     element for element in UG_OMIT_PDF_FIELDS if not element == 'phone']
     44UG_OMIT_PDF_FIELDS = tuple([
     45    element for element in UG_OMIT_PDF_FIELDS if not element == 'phone'])
    5146UG_OMIT_PDF_FIELDS += ('reg_number','alr_fname', 'alr_no', 'alr_date',
    5247    'alr_results', 'notice')
     48
     49FP_OMIT_FIELDS = ('hq_type', 'hq_fname', 'hq_matric_no',
     50     'hq_degree', 'hq_school', 'hq_session', 'hq_disc')
     51FP_OMIT_DISPLAY_FIELDS = UG_OMIT_DISPLAY_FIELDS + FP_OMIT_FIELDS
     52FP_OMIT_PDF_FIELDS = UG_OMIT_PDF_FIELDS + FP_OMIT_FIELDS
     53FP_OMIT_MANAGE_FIELDS = UG_OMIT_MANAGE_FIELDS + FP_OMIT_FIELDS
     54FP_OMIT_EDIT_FIELDS = UG_OMIT_EDIT_FIELDS + FP_OMIT_FIELDS
    5355
    5456class CustomApplicantDisplayFormPage(NigeriaApplicantDisplayFormPage):
     
    5860    @property
    5961    def form_fields(self):
    60         if self.target is not None and self.target.startswith('pg'):
    61             form_fields = grok.AutoFields(ICustomPGApplicant)
    62             for field in PG_OMIT_DISPLAY_FIELDS:
     62        form_fields = grok.AutoFields(ICustomUGApplicant)
     63        if self.target is not None and self.target.startswith('fp'):
     64            for field in FP_OMIT_DISPLAY_FIELDS:
    6365                form_fields = form_fields.omit(field)
    6466        else:
    65             form_fields = grok.AutoFields(ICustomUGApplicant)
    6667            for field in UG_OMIT_DISPLAY_FIELDS:
    6768                form_fields = form_fields.omit(field)
     
    104105    @property
    105106    def form_fields(self):
    106         if self.target is not None and self.target.startswith('pg'):
    107             form_fields = grok.AutoFields(ICustomPGApplicant)
    108             for field in PG_OMIT_PDF_FIELDS:
     107        form_fields = grok.AutoFields(ICustomUGApplicant)
     108        if self.target is not None and self.target.startswith('fp'):
     109            for field in FP_OMIT_PDF_FIELDS:
    109110                form_fields = form_fields.omit(field)
    110111        else:
    111             form_fields = grok.AutoFields(ICustomUGApplicant)
    112112            for field in UG_OMIT_PDF_FIELDS:
    113113                form_fields = form_fields.omit(field)
     
    128128    @property
    129129    def form_fields(self):
    130         if self.target is not None and self.target.startswith('pg'):
    131             form_fields = grok.AutoFields(ICustomPGApplicant)
    132             for field in PG_OMIT_MANAGE_FIELDS:
     130        form_fields = grok.AutoFields(ICustomUGApplicant)
     131        if self.target is not None and self.target.startswith('fp'):
     132            for field in FP_OMIT_MANAGE_FIELDS:
    133133                form_fields = form_fields.omit(field)
    134134        else:
    135             form_fields = grok.AutoFields(ICustomUGApplicant)
    136135            for field in UG_OMIT_MANAGE_FIELDS:
    137136                form_fields = form_fields.omit(field)
     
    146145    @property
    147146    def form_fields(self):
    148         if self.target is not None and self.target.startswith('pg'):
    149             form_fields = grok.AutoFields(ICustomPGApplicantEdit)
    150             for field in PG_OMIT_EDIT_FIELDS:
     147        form_fields = grok.AutoFields(ICustomUGApplicantEdit)
     148        if self.target is not None and self.target.startswith('fp'):
     149            for field in FP_OMIT_EDIT_FIELDS:
    151150                form_fields = form_fields.omit(field)
    152151        else:
    153             form_fields = grok.AutoFields(ICustomUGApplicantEdit)
    154152            for field in UG_OMIT_EDIT_FIELDS:
    155153                form_fields = form_fields.omit(field)
  • main/waeup.aaue/trunk/src/waeup/aaue/browser/tests.py

    r8444 r11291  
    4949        shutil.rmtree(self.dc_root)
    5050
    51     def test_custom_theme(self):
    52         self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
    53         self.browser.open('http://localhost/app/configuration')
    54         self.assertMatches('...AAUE Theme...', self.browser.contents)
    55         self.browser.getControl(name="form.skin").value = ['custom theme']
    56         self.browser.getControl("Save").click()
    57         self.browser.open('http://localhost/app/configuration')
    58         return
    59 
    6051    #def test_access_live_url(self):
    6152    #    # We can't access the system with basic authentication
  • main/waeup.aaue/trunk/src/waeup/aaue/etranzact/browser.py

    r10983 r11291  
    271271    label = _('Requery eTranzact History')
    272272    action = 'query_history'
     273    placeholder = _('Confirmation Number (PIN)')
    273274
    274275class EtranzactEnterPinPageApplicant(EtranzactEnterPinPageStudent):
  • main/waeup.aaue/trunk/src/waeup/aaue/etranzact/browser_templates/enterpin.pt

    r9853 r11291  
    1 <form tal:attributes="action view/action"
    2     method="POST" i18n:domain="waeup.aaue">
    3   <table class="form-table">
    4     <tbody>
    5       <tr>
    6         <td i18n:translate="">
    7         Confirmation Number (PIN):
    8         </td>
    9         <td>
    10         <input name="confirmation_number" type="text" class="span5" maxlength=""
    11                value="" />
    12         </td>
    13       </tr>
    14       <tr>
    15         <td colspan="2">
    16           <input type="submit" name="SUBMIT" class="btn primary"
    17                  tal:attributes="value view/buttonname" />
    18         </td>
    19       </tr>
    20     </tbody>
    21   </table>
     1<form method="POST" class="form-inline" tal:attributes="action view/action">
     2<br />
     3  <div class="form-group half">
     4    <input name="confirmation_number" type="text" class="form-control" maxlength=""
     5           value="" tal:attributes="placeholder view/placeholder"/>
     6  </div>
     7  <div class="form-group">
     8    <input type="submit" name="SUBMIT" class="btn btn-primary"
     9           tal:attributes="value view/buttonname" />
     10  </div>
    2211</form>
  • main/waeup.aaue/trunk/src/waeup/aaue/etranzact/tests.py

    r10978 r11291  
    7171        self.browser.getLink("Query eTranzact History").click()
    7272        self.assertMatches(
    73             '...Confirmation Number (PIN):...',
     73            '...Confirmation Number (PIN)...',
    7474            self.browser.contents)
    7575
Note: See TracChangeset for help on using the changeset viewer.