2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2026-01-20 20:04:51 +00:00
Files
troggle/templates/new_prospect.html
2025-12-28 01:36:24 +00:00

92 lines
3.0 KiB
HTML

{% extends "cavebase.html" %}
{% block title %}
New Cave and Entrance
{% endblock %}
{% block extraheaders %}
{% include 'html_editor_scripts_css.html' %}
{% endblock %}
{% block content %}
<h1>New Cave Prospect</h1>
<p>Please fill in the details for a new prospect: a hole which might be a cave. Fields are documented in the <a href="/handbook/survey/caveentryfields.html">cave entry fields</a> guide.</p>
<style>
.prospect-form-container {
max-width: 100%;
margin-left: 15%;
font-family: monospace;
font-weight: bold;
font-size: 150%;
text-align: right;
}
.prospect-form label {
display: inline-block;
width: 320px;
text-align: right;
margin-right: 20px;
margin-bottom: 8px;
}
.prospect-form input, .prospect-form select, .prospect-form textarea {
font-family: monospace;
font-weight: bold;
font-size: 100%;
padding: 0.5em;
width: 20%;
margin-bottom: 10px;
}
.success-message {
color: green;
font-weight: bold;
margin-bottom: 15px;
}
.error {
color: red;
font-size: 90%;
display: block;
margin-bottom: 5px;
}
</style>
<div class="prospect-form-container">
<form method="post" class="prospect-form">
{% csrf_token %}
{% for field in form %}
{% if field.name != 'discoverers' and field.name != 'identified_login' and field.name != 'who_are_you' %}
<div>
<label for="{{ field.id_for_label }}">{{ field.label }}</label>
{{ field }}
{% if field.help_text %}<small>{{ field.help_text }}</small>{% endif %}
{% for error in field.errors %}<span class="error">{{ error }}</span>{% endfor %}
</div>
{% endif %}
{% endfor %}
<div>
<label for="{{ form.discoverers.id_for_label }}">{{ form.discoverers.label }}</label>
{{ form.discoverers }}
{% if form.discoverers.help_text %}<small>{{ form.discoverers.help_text }}</small>{% endif %}
{% for error in form.discoverers.errors %}<span class="error">{{ error }}</span>{% endfor %}
</div>
<div>
<label for="{{ form.identified_login.id_for_label }}">{{ form.identified_login.label }}</label>
{{ form.identified_login }}
{% if form.identified_login.help_text %}<small>{{ form.identified_login.help_text }}</small>{% endif %}
{% for error in form.identified_login.errors %}<span class="error">{{ error }}</span>{% endfor %}
</div>
<div>
<label for="{{ form.who_are_you.id_for_label }}">{{ form.who_are_you.label }}</label>
{{ form.who_are_you }}
{% if form.who_are_you.help_text %}<small>{{ form.who_are_you.help_text }}</small>{% endif %}
{% for error in form.who_are_you.errors %}<span class="error">{{ error }}</span>{% endfor %}
</div>
<br>
<button class="fancybutton" style="padding: 0.5em 25px; margin-left: 155px; font-size: 90%;" type="submit">Submit</button>
</form>
</div>
{% if success %}
<div class="success-message">Prospect submitted successfully. You can edit the details below or enter another.</div>
{% endif %}
{% endblock %}