gpp/port/templates/new_stay/new_stay-2.html

50 lines
1.4 KiB
HTML
Raw Permalink Normal View History

{% extends "index.html" %}
{% load dict %}
{% block form %}
{% if sailors_forms.initial|length <= 0 %}
<em>No one is yet assigned for this boat</em>
{% else %}
<!-- necessary to work with formsets -->
{{ sailors_forms.management_form }}
Previous passengers :
<table>
<tr>
<th>Person</th>
<th>Captain</th>
<th>Crew</th>
<th>Owner</th>
<th>Guest</th>
<th>Pet</th>
<th>On the boat</th>
</tr>
{% for sailors_form in sailors_forms %}
<tr>
{% with id=sailors_form.person.value %}
<td>{{ persons|get:id }}
{{ sailors_form.person }}</td>
{% endwith %}
<td>{{ sailors_form.is_captain }}</td>
<td>{{ sailors_form.is_crew }}</td>
<td>{{ sailors_form.is_owner }}</td>
<td>{{ sailors_form.is_guest }}</td>
<td>{{ sailors_form.is_pet }}</td>
<td>{{ sailors_form.present }}</td>
</tr>
{% endfor %}
</table>
<br />
<input type="submit" value="Next" />
<br />
{% endif %}
{% endblock %}
{% block formnew %}
<form action="{% url 'person:add' %}" method="post">
2024-07-15 11:01:34 +02:00
{% csrf_token %}
<div class="new hidden" id="new_person">
{{ person_form }}
<input type="submit" value="Add person" />
</div>
</form>
{% endblock %}