gpp/port/templates/boat/form.html

50 lines
1.3 KiB
HTML

{% extends "base.html" %}
{% block content %}
<form action="{% url 'boat:add' %}" method="post">
{% csrf_token %}
<fieldset>
<legend>Boat</legend>
{{ boat_form }}
</fieldset>
<fieldset>
<legend>Insurance</legend>
<div>
<h3>Choose in list :</h3>
<select name="boat_insurance" id="select_boat_insurance">
<option value="-1" select="">---</option>
{% for ins in insurances %}
<option value="{{ ins.pk }}">{{ ins.name }}</option>
{% endfor %}
</select>
</div>
<div>
<h3>Or create a new one (will take existing if name already
exists</h3>
{{ insurance_form }}
</fieldset>
<fieldset>
<legend>Company</legend>
{{ company_form }}
</fieldset>
<fieldset>
<legend>Person</legend>
{{ person_form }}
{{ address_form }}
</fieldset>
<fieldset>
<legend>Stay</legend>
{{ stay_form }}
</fieldset>
<fieldset>
<legend>Mooring</legend>
<table>
{% for mooring_form in mooring_forms %}
{{ mooring_form.as_table }}
{% endfor %}
</table>
</fieldset>
<input type="submit" value="add"/>
</form>
{% endblock %}