Force upnprint badge
So automation can try again
This commit is contained in:
parent
be00f257a1
commit
568536532c
3 changed files with 11 additions and 1 deletions
4
vendor/regidesk/regidesk/models.py
vendored
4
vendor/regidesk/regidesk/models.py
vendored
|
@ -98,6 +98,10 @@ class CheckIn(models.Model):
|
||||||
self.badge_printed = True
|
self.badge_printed = True
|
||||||
self.save()
|
self.save()
|
||||||
|
|
||||||
|
def unset_badge(self):
|
||||||
|
self.badge_printed = False
|
||||||
|
self.save()
|
||||||
|
|
||||||
def mark_schwag_given(self):
|
def mark_schwag_given(self):
|
||||||
self.schwag_given = True
|
self.schwag_given = True
|
||||||
self.save()
|
self.save()
|
||||||
|
|
|
@ -72,11 +72,15 @@
|
||||||
<dl class="dl-horizontal">
|
<dl class="dl-horizontal">
|
||||||
<dt>Status</dt><dd>{% if check_in.badge_printed %}Marked{% else %}Not marked{% endif %} as printed</dd>
|
<dt>Status</dt><dd>{% if check_in.badge_printed %}Marked{% else %}Not marked{% endif %} as printed</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<form method="post">
|
<form method="post" hidden>
|
||||||
<input type="checkbox" name="badge" value="badge" checked hidden>
|
<input type="checkbox" name="badge" value="badge" checked hidden>
|
||||||
<a type="button" class="btn btn-primary" href="badge">Show Badge</a>
|
<a type="button" class="btn btn-primary" href="badge">Show Badge</a>
|
||||||
<input class="btn {% if check_in.badge_printed %}btn-danger{% else %}btn-success{% endif %} pull-right" type="submit" value="Submit">
|
<input class="btn {% if check_in.badge_printed %}btn-danger{% else %}btn-success{% endif %} pull-right" type="submit" value="Submit">
|
||||||
</form>
|
</form>
|
||||||
|
<form method="post">
|
||||||
|
<input type="checkbox" name="unbadge" value="unbadge" checked hidden>
|
||||||
|
<input class="btn btn-danger pull-right" type="submit" value="Force Reprint">
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
2
vendor/regidesk/regidesk/views.py
vendored
2
vendor/regidesk/regidesk/views.py
vendored
|
@ -312,6 +312,8 @@ def check_in_overview(request, access_code):
|
||||||
check_in.bulk_mark_given()
|
check_in.bulk_mark_given()
|
||||||
elif 'exception' in request.POST:
|
elif 'exception' in request.POST:
|
||||||
check_in.set_exception(request.POST['exception'])
|
check_in.set_exception(request.POST['exception'])
|
||||||
|
elif 'unbadge' in request.POST:
|
||||||
|
check_in.unset_badge()
|
||||||
return redirect(request.path)
|
return redirect(request.path)
|
||||||
ctx = {
|
ctx = {
|
||||||
'check_in': check_in,
|
'check_in': check_in,
|
||||||
|
|
Loading…
Reference in a new issue