Changeset 2887 for WAeUP_SRP/base/skins


Ignore:
Timestamp:
8 Dec 2007, 17:20:50 (17 years ago)
Author:
joachim
Message:

all in edit_form

Location:
WAeUP_SRP/base/skins/waeup_student
Files:
1 edited
2 copied

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_student/accommodation_edit_form.pt

    r2886 r2887  
    11<tal:block define="rendered_main options/rendered;
    22                   portal_status_message options/psm;
    3                    data_storage options/ds;
     3                   data_storage options/ds|nothing;
    44                   mode options/mode;
    55                   edition python:1;"
     
    2828        <div tal:replace="structure rendered_main" />
    2929          <p>Instructions :</p>
    30           <ul tal:condition="python: mode == 'create'">
     30        <ul tal:condition="python: mode == 'create'">
    3131            <li>Buy a Hostel Application Scratch Card.</li>
    3232            <li>Enter the PIN above and press 'Book'.</li>
    3333            <li>Print your Hostel Allocation Slip.</li>
    3434          </ul>
    35           <ul tal:condition="python: mode == 'edit'"
    36               tal:define="info python: context.getAccommodationInfo()">
     35        <tal:block condition="python: mode == 'edit'"
     36                   tal:define="info python: context.getAccommodationInfo();
     37                   maintenance_online info/maintenance_online|nothing"
     38                   >
     39          <ul tal:condition="not: maintenance_online" tal:omit-tag="">
    3740            <li>Buy a Hostel Maintainance Scratch Card
    38             (Code: <span tal:replace="python: info['acco_doc'].acco_maint_code" />) for
    39             <span tal:replace="python: info['acco_doc'].acco_maint_fee" /> Nairas</li>
     41              (Code: <span tal:replace="python: info['acco_doc'].acco_maint_code" />) for
     42              <span tal:replace="python: info['acco_doc'].acco_maint_fee" /> Nairas</li>
    4043            <li>Enter the PIN above and press 'Save'.</li>
    4144            <li>Print your Hostel Maintenance Receipt.</li>
    4245          </ul>
     46          <tal:block condition="maintenance_online">
     47            <table tal:condition="not: info/maintenance_paid">
     48              <tr >
     49                <form action="pay_interswitch_acco" method="post"
     50                      enctype="multipart/form-data" class="workflow"
     51                      >
     52                  <input type="hidden"
     53                         name="paytype"
     54                         value="HOM"
     55                         />
     56                  <td colspan="2"> 
     57                    <input type="submit"
     58                           class="standalone"
     59                           name="cpsdocument_create_button"
     60                           value="Pay Maintenance Fee Online"
     61                           />
     62                  </td>
     63                </form>
     64              </tr>
     65            </table>
     66          </tal:block>
     67        </tal:block>
    4368      </metal:block>
    4469      <metal:block fill-slot="sub">
  • WAeUP_SRP/base/skins/waeup_student/accommodation_view.pt

    r2885 r2887  
    2626              layout_id='student_accommodation_fe')"
    2727              />
    28          <table>
    29          <tr>
     28      <table>
     29        <tr>
    3030          <td width="220px">Level:</td><td tal:content="info/level" />
    31         </tr>
    32         <tr tal:condition="not: info/maintenance_paid">
    33           <form action="pay_interswitch_acco" method="post"
    34                 enctype="multipart/form-data" class="workflow"
    35                 >
    36             <input type="hidden"
    37                    name="paytype"
    38                    value="HOM"
    39                    />
    40             <td colspan="2"> 
    41               <input type="submit"
    42                      class="standalone"
    43                      name="cpsdocument_create_button"
    44                      value="Pay Maintenance Fee Online"
    45                      />
    46             </td>
    47           </form>
    4831        </tr>
    4932      </table>
     
    5134  </metal:main>
    5235</metal:body>
    53 
  • WAeUP_SRP/base/skins/waeup_student/reserve_accommodation.py

    r2886 r2887  
    4747    if info['maintenance_paid']:
    4848        return context.REQUEST.RESPONSE.redirect("%s/accommodation_view" % info['acco'].absolute_url())
    49     elif info['online_payment']:
    50         return context.REQUEST.RESPONSE.redirect("%s/accommodation_view" % info['acco'].absolute_url())
    51         # return context.REQUEST.RESPONSE.redirect("%s/pay_interswitch_acco?paytype=HOM" % info['student'].absolute_url())
     49    # elif info['online_payment']:
     50    #     return context.REQUEST.RESPONSE.redirect("%s/accommodation_view" % info['acco'].absolute_url())
     51    #     # return context.REQUEST.RESPONSE.redirect("%s/pay_interswitch_acco?paytype=HOM" % info['student'].absolute_url())
    5252    else:
    5353        mode = 'edit'
Note: See TracChangeset for help on using the changeset viewer.