mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-25 08:41:51 +00:00
Make 'bearings' a read-only field on entrances
This commit is contained in:
parent
76688695b8
commit
7a61bc47ea
@ -180,11 +180,11 @@ class EntranceForm(ModelForm):
|
||||
required=False,
|
||||
widget=HTMLarea(attrs={"height": "80%", "rows": 20, "placeholder": "Usually blank"}),
|
||||
)
|
||||
bearings = forms.CharField(
|
||||
label="Bearings (obsolete)",
|
||||
required=False,
|
||||
widget=HTMLarea(attrs={"height": "80%", "rows": 20, "placeholder": "Usually blank"}),
|
||||
)
|
||||
# bearings = forms.CharField(
|
||||
# label="Bearings (obsolete)",
|
||||
# required=False,
|
||||
# widget=HTMLarea(attrs={"height": "80%", "rows": 20, "placeholder": "Usually blank"}),
|
||||
# )
|
||||
tag_station = forms.CharField(
|
||||
required=False,
|
||||
widget=forms.TextInput(attrs={"size": "50","placeholder": "e.g. 1623.t2035-zb-03a"}),
|
||||
@ -214,7 +214,8 @@ class EntranceForm(ModelForm):
|
||||
exclude = (
|
||||
"cached_primary_slug",
|
||||
"filename",
|
||||
"slug"
|
||||
"slug",
|
||||
"bearings"
|
||||
)
|
||||
|
||||
def clean(self):
|
||||
|
@ -663,6 +663,7 @@ def edit_entrance(request, path="", caveslug=None, entslug=None):
|
||||
{
|
||||
"entform": entform,
|
||||
"cave": cave,
|
||||
"ent": entrance,
|
||||
"entletter": entletter,
|
||||
"entletterform": entletterform, # is unset if not being used
|
||||
"entlettereditable": entlettereditable,
|
||||
|
@ -2416,7 +2416,6 @@ def FindAndLoadSurvex():
|
||||
print(f" - Number of Survex legs: {legsnumber:,}")
|
||||
|
||||
for f in svx_load.fixes:
|
||||
# why are we seeing no *fixes from fixedpts/gps18.svx etc. ? They are parsed !
|
||||
survexblock, name, altitude, comment = svx_load.fixes[f]
|
||||
s = survexblock
|
||||
spath = s.parent.survexfile
|
||||
@ -2431,9 +2430,9 @@ def FindAndLoadSurvex():
|
||||
if comment:
|
||||
# print(f"FIX {survexblock} {altitude} {comment}")
|
||||
if re.match("(?i)[^s]*srtm[\s\S]*", comment.lower()):
|
||||
print(f"SRTM {ff}.svx::{survexblock} - {spath}.svx - '{comment}'")
|
||||
print(f"SRTM {ff}.svx::{survexblock} - {spath}.svx - alt={altitude} '{comment}'")
|
||||
if re.match("(?i)[^s]*radost[\s\S]*", comment.lower()):
|
||||
print(f"RDST {ff}.svx::{survexblock} - {spath}.svx - '{comment}'")
|
||||
print(f"RDST {ff}.svx::{survexblock} - {spath}.svx - alt={altitude} '{comment}'")
|
||||
|
||||
svx_load = None
|
||||
|
||||
|
@ -40,7 +40,10 @@ at troggle/core/forms.py ass this uses a Django magic form creation thinggy. -->
|
||||
{% else %}
|
||||
<table><tr><th>Entrance Letter</th><td>{{ entletter }}</td></table>
|
||||
{% endif %}
|
||||
<table>{{ entform }}</table>
|
||||
<table>{{ entform }}
|
||||
<tr><th><label for="id_bearings">Bearings (obsolete):</label></th><td>
|
||||
{{ent.bearings|safe}}</td></tr>
|
||||
</table>
|
||||
<p><input type="submit" value="Submit" /></p>
|
||||
</form>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user