summaryrefslogtreecommitdiffstats
path: root/templates/editfile.html
blob: 64f1fbaae9a63df5e8e0993cf4e2b7796f0a8137 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
{% extends "base.html" %}
{% load csrffaker %} 
{% block title %}File{% endblock %}
{% block head %}
<script>
	$(function() {
		$("#id_date").datepicker({dateFormat: "yy-mm-dd"});
                $("#id_cave").change(function() {
                         $('#id_entrance').load('{% url "get_entrances" caveslug="" %}' + this.value);
                                                 });
                $("#id_cave").change(function() {
                         $('#id_qm').load('{% url "get_qms" caveslug="" %}' + this.value);
                                                 });
                $("#id_expedition").change(function() {
                         $('#id_logbookentry').load('{% url "get_logbook_entries" expeditionslug="" %}' + this.value);
                                                 });
                $("#id_expedition").change(function() {
                         $('#id_person').load('{% url "get_people" expeditionslug="" %}' + this.value);
                                                 });
	});

</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-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>
{{ fileForm.media }}
{% endblock %}
{% block content %}

<form action="" method="post">{% csrf_token %}
    {{ fileForm.non_field_errors }}
    <div class="fieldWrapper">
        {{ fileForm.title.errors }}
        <label for="id_title">Title:</label>
        {{ fileForm.title }}
    </div>
    <div class="fieldWrapper">
        {{ fileForm.slug.errors }}
        <label for="id_slug">Slug:</label>
        {{ fileForm.slug }}
    </div>
    <div class="fieldWrapper">
        {{ fileForm.date.errors }}
        <label for="id_date">Date:</label>
        {{ fileForm.date }}
    </div>
    <div class="fieldWrapper" id="lon_utm">
        {{ fileForm.lon_utm.errors }}
        <label for="id_lon_utm">Longitude:</label>
        {{ fileForm.lon_utm }}
    </div>
    <div class="fieldWrapper" id="lat_utm">
        {{ fileForm.lat_utm.errors }}
        <label for="id_lat_utm">Latitude:</label>
        {{ fileForm.lat_utm }}
    </div>
    <div class="fieldWrapper" id="cave">
        {{ fileForm.cave.errors }}
        <label for="id_cave">Cave:</label>
        {{ fileForm.cave }}
    </div>
    <div class="fieldWrapper" id="entrance">
        {{ fileForm.entrance.errors }}
        <label for="id_entrance">Entrance:</label>
        {{ fileForm.entrance }}
    </div>
    <div class="fieldWrapper" id="qm">
        {{ fileForm.qm.errors }}
        <label for="id_cavem">QM:</label>
        {{ fileForm.qm }}
    </div>
    <div class="fieldWrapper" id="expedition">
        {{ fileForm.expedition.errors }}
        <label for="id_expediton">Expedition:</label>
        {{ fileForm.expedition }}
    </div>
    <div class="fieldWrapper" id="logbookentry">
        {{ fileForm.logbookentry.errors }}
        <label for="id_logbookentry">Logbook Entry:</label>
        {{ fileForm.logbookentry }}
    </div>
    <div class="fieldWrapper" id="person">
        {{ fileForm.person.errors }}
        <label for="id_expediton">Person:</label>
        {{ fileForm.person }}
    </div>
    <div class="fieldWrapper">
        {{ fileForm.html.errors }}
        <label for="id_date">Content:</label>
        {{ fileForm.html }}
    </div>
    <p><input type="submit" value="Submit Trip Report" /></p>
</form>

{% endblock %}