2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2026-03-01 03:01:41 +00:00

delete old forms, templates. fix logdataissues

This commit is contained in:
Philip Sargent
2021-04-23 11:43:25 +01:00
parent dbd186e299
commit 343d6cf350
8 changed files with 70 additions and 277 deletions

View File

@@ -1,26 +0,0 @@
{% autoescape off %}
<!DOCTYPE html>
<html>
<head>
<style type="text/css">.author {text-decoration:underline}</style>
</head>
<body>
<H1>{{trip.title}}</H1>
<span class="date">{{date}}</span> - <span class="expeditionyear">{{expeditionyear}}</span>
{% if trip.caveOrLocation == "cave" %}
<span class="cave">{{trip.cave}}</span>
{% else %}
<span class="location">{{trip.location}}</span>
{% endif %}
{% for person in persons %}
<div class="person">
<span class="name{% if person.author %} author{% endif %}">{{person.name}}</span>
TU<span class="TU">{% if person.TU %}{{person.TU}}{% else %}0{% endif %}</span>hours
</div>
{% endfor %}
<div class="report">{{trip.html}}</div>
</body>
</html>
{% endautoescape %}

View File

@@ -1,19 +0,0 @@
{% extends "base.html" %}
{% load csrffaker %}
{% block title %}Logbook {{logbookentry.id}}{% endblock %}
{% block head %}
<link rel="stylesheet" href="{{ settings.JSLIB_URL }}jquery-ui/css/lightness/jquery-ui.css" type="text/css" media="all" />
<script src="{{ settings.JSLIB_URL }}jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
<script src="{{ settings.MEDIA_URL }}js/jquery.formset.min.js" type="text/javascript"></script>
<!--<script src="{{ settings.TINY_MCE_MEDIA_URL }}tiny_mce.js" type="text/javascript"></script>-->
{{ tripForm.media }}
{% endblock %}
{% block content %}
<form action="" method="post">{% csrf_token %}
{{ form }}
<p><input type="submit" value="Submit" /></p>
</form>
{% endblock %}

View File

@@ -1,84 +0,0 @@
{% extends "base.html" %}
<!-- logbookentry.html - this text visible because this template has been included -->
{% load csrffaker %}
{% block title %}Logbook {{logbookentry.id}}{% endblock %}
{% block head %}
<script>
$(function() {
$("#id_date").datepicker({dateFormat: "yy-mm-dd"});
$('.persontrips tbody tr').formset();
$(":radio[name*='caveOrLocation']").change(setLocationType);
$(setLocationType());
function setLocationType () {
$("#cave").hide();
$("#location").hide();
$("#" + $(":radio[name*='caveOrLocation']:checked")[0].value).show();
};
});
</script>
<link rel="stylesheet" href="{{ settings.JSLIB_URL }}jquery-ui/css/lightness/jquery-ui.css" type="text/css" media="all" />
<script src="{{ settings.JSLIB_URL }}jquery/jquery-ui.min.js" type="text/javascript"></script>
<script src="{{ settings.MEDIA_URL }}js/jquery.formset.min.js" type="text/javascript"></script>
<!--<script src="{{ settings.TINY_MCE_MEDIA_URL }}tiny_mce.js" type="text/javascript"></script>-->
{{ tripForm.media }}
{% endblock %}
{% block content %}
<form action="" method="post">{% csrf_token %}
{{ tripForm.non_field_errors }}
<div class="fieldWrapper">
{{ tripForm.title.errors }}
<label for="id_title">Title:</label>
{{ tripForm.title }}
</div>
<div class="fieldWrapper">
{{ tripForm.date.errors }}
<label for="id_date">Date:</label>
{{ tripForm.date }}
</div>
<div class="fieldWrapper">
{{ tripForm.caveOrLocation.errors }}
<label for="id_caveOrLocation">Location Type:</label>
{{ tripForm.caveOrLocation }}
</div>
<div class="fieldWrapper" id="cave">
{{ tripForm.cave.errors }}
<label for="id_cave">Cave:</label>
{{ tripForm.cave }}
</div>
<div class="fieldWrapper" id="location">
{{ tripForm.location.errors }}
<label for="id_location">Location:</label>
{{ tripForm.location }}
</div>
<table class="persontrips" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<th>Person</th>
<th>TU /hours</th>
<th>Author</th>
<th></th>
</tr>
{% for form in personTripFormSet.forms %}
<tr>
<td>{{ form.name.errors }}{{ form.name }}</td>
<td>{{ form.TU.errors }}{{ form.TU }}</td>
<td>{{ form.author.errors }}{{ form.author }}</td>
<td></td>
{{ form.non_field_errors }}
</tr>
{% endfor %}
</tbody>
</table>
{{ personTripFormSet.management_form }}
<div class="fieldWrapper">
{{ tripForm.html.errors }}
<label for="id_date">Content:</label>
{{ tripForm.html }}
</div>
<p><input type="submit" value="Sumbit Trip Report" /></p>
</form>
{% endblock %}