2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2026-05-22 19:36:05 +01:00
Files
troggle/templates/new_hole.html
T
2026-05-16 23:11:03 +01:00

163 lines
5.4 KiB
HTML

{% extends "cavebase.html" %}
{% block title %}New Cave Creation Form{% endblock %}
{% block extraheaders %}
<style>
/* Direct match from editcave.html */
div > label {
display: block;
font-weight: bold;
margin-top: 5px;
}
/* MATCHING FIELD LENGTHS TO DATA SHEET */
div.field-discoverers input,
div.field-proposed_name input { width: 400px; }
div.field-tag_id input,
div.field-tag_text input,
div.field-surface_wallet input,
div.field-survey_wallet input,
div.field-gps_owner input,
div.field-gps_coords input { width: 300px; }
div.field-gps_time input,
div.field-dist_to_ent input,
div.field-bear_to_ent input { width: 100px; }
/* SIDE BY SIDE LAYOUT */
.side-by-side {
display: flex;
gap: 20px;
align-items: flex-start;
}
/* CHECKBOX STYLING TO MATCH editcave.html VISUALLY */
.checkbox-container {
display: flex;
flex-direction: row; /* Keep box on the left */
align-items: center;
gap: 10px;
margin-top: 10px;
}
/* Override the 'block' display only for labels attached to checkboxes */
.checkbox-container label {
display: inline;
margin-top: 0;
font-weight: bold; /* Match editcave.html bolding */
}
.submit-btn {
font-weight: bold;
font-size: 200%; /* Match editcave.html submit size */
font-variant-caps: small-caps;
margin-left: 40%;
padding: 10px 20px;
cursor: pointer;
}
.input-unit-group {
display: flex;
align-items: center;
gap: 5px;
}
.unit-label {
font-weight: bold;
font-size: 1.1em;
color: #555;
}
div.field-gps_lat input,
div.field-gps_long input {
width: 140px;
}
</style>
{% endblock %}
{% block content %}
<h1>New Cave Datasheet</h1>
<h3>Instructions</h3>
<p>Refer to the handbook <a href="/handbook/l/new-cave-form.html">New Cave Datasheet</a>
page for what all these mean and how to fill them in.</p>
<p>If starting from scratch, read <a href="/handbook/survey/newcave.html">New Cave Process</a>.
<form action="" method="post" enctype="multipart/form-data">
{% csrf_token %}
<div class="form-container">
{% for field in form %}
{# Logic to catch the first coordinate and start a side-by-side div #}
{% if field.name == "gps_lat" %}
<div class="side-by-side">
<div class="field-{{ field.name }}">
{{ field.label_tag }}
{{ field }}<span class="unit-label"> N</span>
{{ field.errors }}
</div>
{% elif field.name == "gps_long" %}
<div class="field-{{ field.name }}">
{{ field.label_tag }}
{{ field }}<span class="unit-label"> E
{%if areatext %}&nbsp;&nbsp;&nbsp;&nbsp;<font color="blue"> {{areatext}}</font>{% endif %}</span>
{{ field.errors }}
</div>
</div> {# Standard Checkbox rendering #}
{% elif field.field.widget.input_type == "checkbox" %}
<div class="field-{{ field.name }} checkbox-container">
{{ field }}
{{ field.label_tag }}
</div>
{{ field.errors }}
{# Standard Field rendering #}
{% else %}
<div class="field-{{ field.name }}">
{{ field.label_tag }}
{{ field }}
{{ field.errors }}
</div>
{% endif %}
{% endfor %}
</div>
<p>
<input class="submit-btn" type="submit" value="Next" />
</p>
</form>
<h3>What this will do:</h3>
<ul>
<li>Calculate whether this new cave is in area 1623 or 1626
<li>Create a <span style="font-variant: small-caps;">fixed point</span> record by inserting into :loser:/fixedpts/gps/auto.svx
<li>Create a new Cave record
<li>Create a new Entrance record on that Cave
<li>Do a git commit (expoweb) of the new Cave and Entrance description files
<li>Do a git commit (loser) of the new GPS position fix<br />
(git commits use your logged-in identity in the "Who are you ?" field)
<li>Update the database with this new information
<li>Return you to this form if any important data is missing, invalid or inconsistent
<li>If all is fine, will take you to <br />
- the Entrance edit page for you to upload the photos<br />
- a new Wallet edit page to upload the <em>GPTTest</em> screenshot and trip details<br />
(and create a new digital wallet if it does not already exist)<br />
- the GPSlogs upload page to upload your prospecting track<br />
- the new Survex page to upload survey data (if any)<br />
- a new Logbook page if you have not already recorded this trip<br />
</ul>
</p>
<h4>Why we ask for the time the GPS was recorded</h4>
<p>Because ionospheric disturbance happens on a scale of an hour or so, every few hours,
and is local to an area about ~50km in size. If we continuously record the GPS position
of the potato hut during the expo then we will know if the GPS
position of this cave entrancce was recorded during one of these "bad" periods.</p>
<p>Go back and re-record the GPS positon the next day at the exact same point and put that data in the logbook.</p>
{% endblock %}
<p>🚧 under construction.