Prefill datetime inputs on voting page if submitted values

This commit is contained in:
Jeremy Zhang 2018-05-03 05:05:24 +00:00
parent 5552b8d340
commit 5da061a3d5
2 changed files with 5 additions and 5 deletions

View File

@ -457,4 +457,4 @@ def voting_get():
if gmember: if gmember:
u["discord"] = gmember.username + "#" + str(gmember.discriminator) u["discord"] = gmember.username + "#" + str(gmember.discriminator)
referrals.append(u) referrals.append(u)
return render_template("admin_voting.html.j2", overall=overall, referrals=referrals) return render_template("admin_voting.html.j2", overall=overall, referrals=referrals, datestart=datestart, timestart=timestart, dateend=dateend, timeend=timeend)

View File

@ -20,18 +20,18 @@
<tr> <tr>
<td> <td>
<div class="input-field inline"> <div class="input-field inline">
<input id="datestart" type="text" class="datepicker" palceholder="Start Date"> <input id="datestart" type="text" class="datepicker" palceholder="Start Date" {% if datestart %}value="{{ datestart }}"{% endif %}>
</div> </div>
<div class="input-field inline"> <div class="input-field inline">
<input id="timestart" type="text" class="timepicker" palceholder="Start Time"> <input id="timestart" type="text" class="timepicker" palceholder="Start Time" {% if timestart %}value="{{ timestart }}"{% endif %}>
</div> </div>
</td> </td>
<td> <td>
<div class="input-field inline"> <div class="input-field inline">
<input id="dateend" type="text" class="datepicker" palceholder="End Date"> <input id="dateend" type="text" class="datepicker" palceholder="End Date" {% if dateend %}value="{{ dateend }}"{% endif %}>
</div> </div>
<div class="input-field inline"> <div class="input-field inline">
<input id="timeend" type="text" class="timepicker" palceholder="End Time"> <input id="timeend" type="text" class="timepicker" palceholder="End Time" {% if timeend %}value="{{ timeend }}"{% endif %}>
</div> </div>
</td> </td>
<td> <td>