summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2023-08-02 10:17:48 +0300
committerPhilip Sargent <philip.sargent@gmail.com>2023-08-02 10:17:48 +0300
commit585eb534a9996448c8346002e150cf0283605f02 (patch)
tree239c34361ba3dfbfa0088295f4a9357bc0629815
parent7fc058b1da96d66020abdfd8dd7791bc981733b5 (diff)
downloadtroggle-585eb534a9996448c8346002e150cf0283605f02.tar.gz
troggle-585eb534a9996448c8346002e150cf0283605f02.tar.bz2
troggle-585eb534a9996448c8346002e150cf0283605f02.zip
Entrance locations explanations
-rw-r--r--core/forms.py8
-rw-r--r--core/views/caves.py3
-rw-r--r--templates/editentrance.html10
3 files changed, 17 insertions, 4 deletions
diff --git a/core/forms.py b/core/forms.py
index f0c30bf..e2124f1 100644
--- a/core/forms.py
+++ b/core/forms.py
@@ -182,8 +182,12 @@ class EntranceForm(ModelForm):
required=False,
widget=forms.TextInput(attrs={"size": "50"}), label="Other station: Survex station id, e.g. 1623.2023-xx-01.33"
)
- northing = forms.CharField(required=False)
- easting = forms.CharField(required=False)
+ northing = forms.CharField(
+ required=False, widget=forms.TextInput(attrs={"size": "10"}), label="Northing (UTM) - from survex data"
+ )
+ easting = forms.CharField(
+ required=False, widget=forms.TextInput(attrs={"size": "10"}), label="Easting (UTM) - from survex data"
+ )
lat_wgs84 = forms.CharField(
required=False, widget=forms.TextInput(attrs={"size": "10"}), label="Latitude (WSG84) - if no other location"
)
diff --git a/core/views/caves.py b/core/views/caves.py
index a4e3cb1..1c07fda 100644
--- a/core/views/caves.py
+++ b/core/views/caves.py
@@ -477,7 +477,8 @@ def edit_entrance(request, path="", caveslug=None, entslug=None):
cave_file = cave.file_output()
write_and_commit([entrance_file, cave_file], f"Online edit of entrance {entrance.slug}")
return HttpResponseRedirect("/" + cave.url)
- else:
+
+ else: # GET the page, not POST, or if either of the forms were invalid when POSTed
if entrance:
# re-read entrance data from file.
filename = str(entrance.slug +".html")
diff --git a/templates/editentrance.html b/templates/editentrance.html
index fc85e99..589c7da 100644
--- a/templates/editentrance.html
+++ b/templates/editentrance.html
@@ -5,10 +5,18 @@
{% include 'html_editor_scripts_css.html' %}
{% endblock %}
{% block content %}
-<h1>Edit Entrance - at cave {{cave.official_name|safe}} - {{cave.kataster_number}}</h1>
+<h1>Edit Entrance at cave {{cave.official_name|safe}} - {{cave.unofficial_number}} - {{cave.kataster_number}}</h1>
{% include 'html_editor_pop_ups.html' %}
<h2>{{message}}</h2>
<form action="" method="post">{% csrf_token %}
+<p> When you first create a new entrance, you will probably not have any cave survey data for the entrance location,
+<ul>
+<li>
+so the Easting/Northing fields will be blank.
+<li>Put in the location of your new entrance in the WGS84 latitude and longitude fields.
+<li>Read the <a href="/handbook/survey/coord2.html#summary">brief explanation</a> of location data in the handbook.
+</ul>
+
{% if entlettereditable %}
<table>{{ entletter }}</table>
{% else %}