Ignore:
Timestamp:
4 Jul 2014, 07:46:16 (10 years ago)
Author:
Henrik Bettermann
Message:

Filter payment ticket data exports by specifying the payment_date period.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates
Files:
2 edited

Legend:

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

    r11254 r11730  
    1414    Exporter (Data Type)
    1515  </label>
    16   <select name="exporter" class="form-control half">
     16  <select id="exporter" name="exporter" class="form-control half" onclick="test()">
    1717    <option tal:repeat="item view/exporters"
    1818            tal:attributes="value python:item[1]">
     
    5050    </option>
    5151  </select>
    52   <br /><br />
     52  <br />
     53  <span id="payment_dates" style="display: none;">
     54    <label for="mode" i18n:translate="">
     55      Payment Date
     56    </label>
     57    <br />
     58    from
     59    <input class="datepicker-le-year datepicker-short textType"
     60           id="payments_start"
     61           name="payments_start" type="text" value="" />
     62    to <input class="datepicker-le-year datepicker-short textType"
     63           id="payments_end"
     64           name="payments_end" type="text" value="" />
     65    <br />
     66  </span>
     67  <br />
    5368  <input type="submit" name="START"  i18n:translate=""
    5469    value="Create CSV file"
    5570    class="btn btn-primary" />
    5671</form>
     72
     73<script type="text/javascript">
     74  function test() {
     75      if (document.getElementById('exporter').value == 'bursary' ||
     76          document.getElementById('exporter').value == 'studentpayments') {
     77          document.getElementById('payment_dates').style.display = 'block';
     78      } else {
     79          document.getElementById('payment_dates').style.display = 'none';
     80      }
     81  }
     82</script>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/exportconfig_certificate.pt

    r11254 r11730  
    1414    Exporter (Data Type)
    1515  </label>
    16   <select name="exporter" class="form-control half">
     16  <select id="exporter" name="exporter" class="form-control half" onclick="test()">
    1717    <option tal:repeat="item view/exporters"
    1818            tal:attributes="value python:item[1]">
     
    4040    </option>
    4141  </select>
    42   <br /><br />
     42  <br />
     43  <span id="payment_dates" style="display: none;">
     44    <label for="mode" i18n:translate="">
     45      Payment Date
     46    </label>
     47    <br />
     48    from
     49    <input class="datepicker-le-year datepicker-short textType"
     50           id="payments_start"
     51           name="payments_start" type="text" value="" />
     52    to <input class="datepicker-le-year datepicker-short textType"
     53           id="payments_end"
     54           name="payments_end" type="text" value="" />
     55    <br />
     56  </span>
     57  <br />
    4358  <input type="submit" name="START"  i18n:translate=""
    4459    value="Create CSV file"
    4560    class="btn btn-primary" />
    4661</form>
     62
     63<script type="text/javascript">
     64  function test() {
     65      if (document.getElementById('exporter').value == 'bursary' ||
     66          document.getElementById('exporter').value == 'studentpayments') {
     67          document.getElementById('payment_dates').style.display = 'block';
     68      } else {
     69          document.getElementById('payment_dates').style.display = 'none';
     70      }
     71  }
     72</script>
Note: See TracChangeset for help on using the changeset viewer.