mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-24 00:42:17 +00:00
Basic checkin/out logic complete
This commit is contained in:
@@ -3,14 +3,47 @@
|
||||
{% load static %}
|
||||
{% load button from filters %}
|
||||
|
||||
{% block css %}
|
||||
{{ block.super }}
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'css/selects.css' %}"/>
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'css/easymde.min.css' %}">
|
||||
{% endblock %}
|
||||
|
||||
{% block preload_js %}
|
||||
{{ block.super }}
|
||||
<script src="{% static 'js/selects.js' %}"></script>
|
||||
<script src="{% static 'js/easymde.min.js' %}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{{ block.super }}
|
||||
<script src="{% static 'js/autocompleter.js' %}"></script>
|
||||
<script src="{% static 'js/interaction.js' %}"></script>
|
||||
<script src="{% static 'js/tooltip.js' %}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-12">
|
||||
{% include 'form_errors.html' %}
|
||||
<form id="checkin" role="form" method="POST" action="{{ form.action|default:request.path }}">
|
||||
<input type="hidden" name="{{ form.event.name }}" id="{{ form.event.id_for_label }}"
|
||||
value="{{event.pk}}"/>
|
||||
{% if not request.is_ajax and self.request.user.pk is form.event.mic.pk %}
|
||||
<div class="form-group">
|
||||
<label for="{{ form.person.id_for_label }}"
|
||||
class="col-sm-4 col-form-label">{{ form.person.label }}</label>
|
||||
<div class="col-sm-8">
|
||||
<select id="{{ form.person.id_for_label }}" name="{{ form.person.name }}" class="px-0 selectpicker" data-live-search="true" data-sourceurl="{% url 'api_secure' model='profile' %}?fields=first_name,last_name,initials">
|
||||
{% if person %}
|
||||
<option value="{{form.person.value}}" selected="selected" >{{ person.name }}</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<input type="hidden" name="{{ form.person.name }}" id="{{ form.person.id_for_label }}"
|
||||
value="{{request.user.pk}}"/>
|
||||
{% endif %}
|
||||
{% csrf_token %}
|
||||
<div class="form-group">
|
||||
<label for="{{ form.time.id_for_label }}"
|
||||
@@ -44,7 +77,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if edit %}
|
||||
{% if edit or manual %}
|
||||
<div class="form-group">
|
||||
<label for="{{ form.end_time.id_for_label }}"
|
||||
class="col-sm-4 col-form-label">End Time</label>
|
||||
|
||||
Reference in New Issue
Block a user