diff options
Diffstat (limited to 'lib/srtgui/templates/report.html')
-rw-r--r-- | lib/srtgui/templates/report.html | 41 |
1 files changed, 39 insertions, 2 deletions
diff --git a/lib/srtgui/templates/report.html b/lib/srtgui/templates/report.html index d4d27f76..4c2b2450 100644 --- a/lib/srtgui/templates/report.html +++ b/lib/srtgui/templates/report.html @@ -13,10 +13,16 @@ </div> </div> - <form method="POST">{% csrf_token %} + <form method="POST"> {% csrf_token %} <input type="hidden" name="parent_page" value="{{parent_page}}"> <input type="hidden" name="record_list" value="{{record_list}}"> + {% if error_message %} + <br> + <font size="3" color="red">{{error_message}}</font> + <br> + {% endif %} + {% if report_type_list %} <hr> Report Type:<br> @@ -53,6 +59,12 @@ <hr> {% endif %} + {% if report_date_list %} + Date Range (mm/dd/yyyy):<br> + {{report_date_list|safe}} + <hr> + {% endif %} + {% if report_custom_list %} Page Specific Settings:<br> {{report_custom_list|safe}} @@ -68,6 +80,31 @@ </form> -<br> + <br> + <!-- <input type="submit" id="submit-report-button" class="btn btn-primary btn-lg" value="Generate and Download Report"/> --> + <!-- <button type="button" id="submit-report-button" class="btn btn-primary btn-lg"> Generate and Download Report </button> --> + <!-- <button id="select-these" class="btn btn-default" type="button">Select these</button> --> + + <!-- Javascript support --> + <script> + + $(document).ready(function() { + + /* Handle the post button */ + $('#test-submit-report-button').click(function(){ + document.getElementById("submit-report-button").innerText = " ... working ... "; + data = { + "action" : 'foo', + "pub" : $('#bar').is(':checked') ? "yes" : "no", + } + + $.post("wr/report/management", data, function(data, status){ + alert("Data: " + data + "\nStatus: " + status); + }); + }); + + }); + </script> + {% endblock %} |