Skip to content

Commit

Permalink
Bring back number of candidates and ppt options
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnMwashuma committed Oct 28, 2024
1 parent b36b8d3 commit 18f6c0a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tally_ho/apps/tally/static/js/download_results.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ $(document).ready(function () {
success: (data) => {
downloadResults(data, `results_${Date.now()}.json`);
$("#export-results").removeAttr("disabled");
$("#export-results").html("Export Results in JSON");
$("#export-results").html("All Results JSON Export");
},
});
});
Expand Down
21 changes: 18 additions & 3 deletions tally_ho/apps/tally/templates/reports/form_results.html
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,25 @@ <h1>{% trans 'Candidate Results' %}</h1>

<table class="display" id="candidate-results-report">
<caption style="margin-top: 2em; margin-left: -0.5em; margin-bottom: 2em;">
<div id="in-report" class="row" style="float: left;margin-left: 0.5em;">
<div id="in-report" class="row">
<div class="col-12" style="margin-bottom: 2em;">
<button id="export-results" class="btn btn-default btn-small">{% trans 'Export Results in JSON' %}</button>
<div class="col-3" style="padding-left: 0.5em; display: none">
<button id="export-form-results-presidential" class="btn btn-default btn-small">{% trans 'Export Presidential Results in JSON' %}</button>
</div>
<div class="col-3" style="padding-left: 0.5em; display: none">
<button id="export-form-results-parliamentary" class="btn btn-default btn-small">{% trans 'Export Parliamentary Results in JSON' %}</button>
</div>
<div class="col-6">
<p style="float: left; margin-right: 1em;" class="card-text">{% trans 'Number of leading candidates:' %}</p>
<input style="float: left; width: 4em;" type="number" min="1" value="0" id="export-number">
</div>
<div class="col-6">
<div class="card">
<div class="card-body">
<button style="float: right; margin-left: 1em;" id="export-results" class="btn btn-default btn-small">{% trans 'All Results JSON Export' %}</button>
<button style="float: right;" id="inc-ppt-export-report" class="btn btn-default btn-small">{% trans 'PowerPoint Export' %}</button>
</div>
</div>
</div>
</div>
<div class="col-12" style="margin-bottom: 2em;">
Expand Down Expand Up @@ -364,4 +380,3 @@ <h1>{% trans 'Candidate Results' %}</h1>
</div>

{% endblock %}

0 comments on commit 18f6c0a

Please sign in to comment.