source: main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/onlinepaymentaddform.pt @ 16431

Last change on this file since 16431 was 16431, checked in by Henrik Bettermann, 4 years ago

Add payment option (p_option) field to payment tickets and add
select box on online payment add form pages. Disable this feature
in the base package.

File size: 2.4 KB
Line 
1<form action="." tal:attributes="action request/URL" method="post"
2      enctype="multipart/form-data">
3
4  <table class="form-table">
5    <tbody>
6      <tr>
7        <td class="fieldname">
8          Payment Category:
9        </td>
10        <td>
11          <select id="form.p_category" name="form.p_category" size="1"
12                  class="form-control half" onclick="further()">
13            <option tal:repeat="item view/selectable_categories"
14                    tal:attributes="value python:item[0]">
15              <span tal:replace="python:item[1]">FEE CATEGORY</span>
16            </option>
17          </select>
18        </td>
19      </tr>
20      <tr tal:condition="view/selectable_payment_options">
21        <td class="fieldname">
22          Payment Option:
23        </td>
24        <td>
25          <select id="form.p_option" name="form.p_option" size="1"
26                  class="form-control half" onclick="further()">
27            <option tal:repeat="item view/selectable_payment_options"
28                    tal:attributes="value python:item[0]">
29              <span tal:replace="python:item[1]">PAYMENT OPTION</span>
30            </option>
31          </select>
32        </td>
33      </tr>
34    </tbody>
35  </table>
36
37  <table id="widgets" class="form-table" style="display: none;">
38    <tbody>
39      <tal:widgets content="structure provider:widgets" />
40    </tbody>
41  </table>
42
43  <span id="p_item" style="display: none;">
44  <table class="form-table">
45    <tbody>
46      <tr>
47        <td class="fieldname">
48          Desired Course of Study:
49        </td>
50        <td>
51          <input class="textType" id="new_programme" name="new_programme"
52            type="text">
53        </td>
54      </tr>
55    </tbody>
56  </table>
57  </span>
58
59  <br />
60
61  <div tal:condition="view/availableActions">
62    <input tal:repeat="action view/actions"
63           tal:replace="structure action/render"
64           />
65  </div>
66</form>
67
68<script type="text/javascript">
69  function further() {
70      if (document.getElementById('form.p_category').value == 'transfer') {
71          document.getElementById('p_item').style.display = 'block';
72      } else {
73          document.getElementById('p_item').style.display = 'none';
74      }
75      if (document.getElementById('form.p_category').value == 'combi') {
76          document.getElementById('widgets').style.display = 'block';
77      } else {
78          document.getElementById('widgets').style.display = 'none';
79      }
80  }
81</script>
Note: See TracBrowser for help on using the repository browser.