Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace dropdown by number field on reward point redemption index #1810

Merged
merged 1 commit into from
Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions evap/rewards/templates/rewards_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<th style="width: 20%">{% trans 'Date' %}</th>
<th style="width: 40%">{% trans 'Event' %}</th>
<th style="width: 20%">{% trans 'Available until' %}</th>
<th style="width: 20%" class="text-end">{% trans 'Redeem points' %}</th>
<th style="width: 20%">{% trans 'Redeem points' %}</th>
</tr>
</thead>
<tbody>
Expand All @@ -37,12 +37,8 @@
<td>{{ event.date }}</td>
<td>{{ event.name }}</td>
<td>{{ event.redeem_end_date }}</td>
<td class="text-end">
<select class="form-select" id="id_points-{{ event.id }}" name="points-{{ event.id }}" style="width:5em">
{% for p in point_selection %}
<option value="{{ p }}">{{ p }}</option>
{% endfor %}
</select>
<td>
<input class="form-control" id="id_points-{{ event.id }}" name="points-{{ event.id }}" type="number" value="0" min="0" max="{{ total_points_available }}">
</td>
</tr>
{% endfor %}
Expand Down
1 change: 0 additions & 1 deletion evap/rewards/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ def index(request):
reward_point_actions=reward_point_actions,
total_points_available=total_points_available,
events=events,
point_selection=range(0, total_points_available + 1),
)
return render(request, "rewards_index.html", template_data)

Expand Down