Ignore:
Timestamp:
10 Jan 2016, 09:13:17 (9 years ago)
Author:
Henrik Bettermann
Message:

Configure transfer payments and let students enter their desired
study course. Save entered text in p_item attribute.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/onlinepaymentaddform.pt

    r11254 r13574  
    11<form action="." tal:attributes="action request/URL" method="post"
    22      enctype="multipart/form-data">
    3   <table class="form-table">
    4     <tbody>
    5       <tr>
    6         <td class="fieldname">
    7           <span>Payment Category</span>:
    8         </td>
    9         <td>
    10           <select id="form.p_category" name="form.p_category" size="1"
    11                   class="form-control half">
    12             <option tal:repeat="item view/selectable_categories"
    13                     tal:attributes="value python:item[0]">
    14               <span tal:replace="python:item[1]">FEE CATEGORY</span>
    15             </option>
    16           </select>
    17         </td>
    18       </tr>
    19     </tbody>
    20   </table>
     3
     4  <label for="p_cat" i18n:translate="">
     5    Payment Category:
     6  </label>
     7  <select id="form.p_category" name="form.p_category" size="1"
     8          class="form-control half" onclick="test()">
     9    <option tal:repeat="item view/selectable_categories"
     10            tal:attributes="value python:item[0]">
     11      <span tal:replace="python:item[1]">FEE CATEGORY</span>
     12    </option>
     13  </select>
     14
     15  <span id="new_programme" style="display: none;">
     16    <br />
     17    <label for="new_programme" i18n:translate="">
     18      Desired Course of Study:
     19    </label>
     20    <input class="textType" id="new_programme" name="new_programme"
     21      type="text">
     22  </span>
     23  <br />
    2124  <div tal:condition="view/availableActions">
    2225    <input tal:repeat="action view/actions"
     
    2528  </div>
    2629</form>
     30
     31<script type="text/javascript">
     32  function test() {
     33      if (document.getElementById('form.p_category').value == 'transfer') {
     34          document.getElementById('new_programme').style.display = 'block';
     35      } else {
     36          document.getElementById('new_programme').style.display = 'none';
     37      }
     38  }
     39</script>
Note: See TracChangeset for help on using the changeset viewer.