Ignore:
Timestamp:
23 Aug 2007, 21:19:43 (17 years ago)
Author:
Henrik Bettermann
Message:

make managing application records work

Location:
WAeUP_SRP/trunk/skins/waeup_student
Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/apply_pume_form.pt

    r2155 r2157  
    5555          <p>Instructions :</p>
    5656          <ul>
    57             <li>Enter your JAMB Registration Number and the Application PIN above.</li>
     57            <li>Enter your JAMB Registration Number and the Application PIN.</li>
    5858            <li>Fill the form and upload your Passport Photograph with red background in jpg format.</li>
    5959            <li>Save and preview picture.
  • WAeUP_SRP/trunk/skins/waeup_student/apply_pume_manage.py

    r2156 r2157  
    3232if not context.isStaff():
    3333    return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.absolete_url())
     34   
    3435#type_name = 'StudentApplication'
    3536#ti = context.portal_types[type_name]
     
    3738reset = "reset" in request.keys()
    3839lt = context.portal_layouts
    39 reg_no = request.form.get('reg_no','')
    40 if same_type(reg_no, []):
    41     if reset:
    42         reg_no = reg_no[0]
    43     elif reg_no[1]:
    44         reg_no = reg_no[1]
     40
     41reg_no = request.get('reg_no','')
     42new_reg_no = request.get('new_reg_no','')
     43
     44if reset:
     45    reg_no = reg_no
     46elif new_reg_no:
     47    reg_no = new_reg_no
     48
    4549res = ''
    4650psm = ''
     
    4953if reset and reg_no:
    5054    data['reg_no'] = reg_no
    51     psm = "You successfully reset!"
     55    psm = "You successfully reset the record! The applicant will be able to edit and resubmit the data."
    5256    data['status'] = "edited"
    5357    context.applicants_catalog.modifyRecord(**data)
    5458    logger.info('%s reset application record of %s' % (member,reg_no))
     59   
     60#set_trace() 
     61
     62ds = [] 
    5563if reg_no:
    5664    brains = context.applicants_catalog(reg_no = reg_no)
     
    5866        for field in context.applicants_catalog.schema():
    5967            object[field] = getattr(brains[0],field,None)
    60         res,psm,ds = lt.renderLayout(layout_id= 'application',
     68        res,psm_dummy,ds = lt.renderLayout(layout_id= 'application',
    6169                                     schema_id= 'application',
    62                                      layout_mode = "view",
     70                                     layout_mode = "view_slip",
    6371                                     context=context,
    6472                                     ob=object,
     
    6775    else:
    6876        psm = "reg no %s not found" % reg_no
     77       
    6978return context.apply_pume_manage_form(rendered = res,
    7079                                      psm = psm,
    7180                                      reg_no = reg_no,
     81                                      ds = ds
    7282                                     )
    7383
  • WAeUP_SRP/trunk/skins/waeup_student/apply_pume_manage_form.pt

    r2156 r2157  
    22           portal_status_message options/psm|nothing;
    33           reg_no options/reg_no|nothing;
     4           ds options/ds|nothing;
    45           "
    56           >   
    67  <metal:block define-macro="edit_form">
    78    <metal:block use-macro="here/main_template/macros/master">
    8       <metal:block fill-slot="main">
    9         <h3>Search for PUME Application Record</h3>
    10         <br />     
     9      <metal:block fill-slot="main"
     10                   tal:define="info_applicants context/getApplicantsStatistics">
     11
    1112        <form action="" id="editForm" method="post"
    1213              enctype="multipart/form-data" class="workflow"
    1314              tal:attributes="action string:${context/absolute_url}/apply_pume_manage"
    1415              >
     16
    1517          <span tal:condition="not: rendered_main">
     18            <h3>Application Process</h3>
     19            <br />
     20           
     21            <table>
     22            <tr>
     23              <td>Number of records viewed:</td>
     24              <td><span tal:replace="info_applicants/pin_entered" /></td> 
     25            </tr>
     26            <tr>
     27              <td>Number of records submitted:</td>
     28              <td><span tal:replace="info_applicants/submitted" /></td>
     29            </tr>
     30            </table>           
     31           
     32            <br/>
     33           
    1634            <div class="label">Registration No:</div>
    1735            <input type="text" name="reg_no" size="15"
     
    2240                   />
    2341          </span>
     42
    2443          <span tal:condition="rendered_main">
     44            <h3>PUME Application Record <span tal:replace="reg_no"/></h3>
     45            <br />
    2546            <div tal:replace="structure rendered_main" />
     47                       
    2648            <input type="hidden" name="reg_no"
    2749                   tal:attributes="value reg_no|nothing"
     
    2951            <input type="submit" class="standalone"
    3052                   name="reset"
    31                    value="Reenable"
    32                    /><br />
     53                   value="Reset"
     54                   tal:condition="python: ds['status'] == 'submitted'"
     55                   />
     56            <br /><br />
     57
     58
    3359            <div class="label">Registration No:</div>
    34             <input type="text" name="reg_no" size="15"
    35                    />
     60            <input type="text" name="new_reg_no" size="15"
     61                   /> &nbsp;
    3662            <input type="submit" class="standalone"
    3763                   name="search"
  • WAeUP_SRP/trunk/skins/waeup_student/search_students_form.pt

    r2148 r2157  
    2020      <nobr><a href="statistics_simple_view">Basic Student Statistics</a>
    2121      &nbsp;&nbsp;&nbsp;&nbsp;</nobr>     
    22       <nobr><a href="statistics_applicants_view">Application Process</a>
     22      <nobr><a href="apply_pume_manage">Application Process</a>
    2323      &nbsp;&nbsp;&nbsp;&nbsp;</nobr>         
    2424      <span tal:condition="is_so">
Note: See TracChangeset for help on using the changeset viewer.