Tactical commit while I try to understand why the app doesn't rebuild

This commit is contained in:
Simon Brooke 2018-07-02 16:22:38 +01:00
parent f5afa67eed
commit 16af040537
45 changed files with 282 additions and 1973 deletions

View file

@ -23,13 +23,22 @@
</p>
</div>
{% endblock %}
{% block extra-script %}
var user = {
"username": "{{user.username}}",
"fullname": "{{user.fullname}}",
"id": {{user.id|default:-1}},
"authorised": {{user.authorised|default:false}}
};
{% endblock %}
{% block extra-tail %}
<!-- scripts and styles -->
<!-- ATTENTION \/ -->
<!-- ATTENTION /\ -->
<!-- Leaflet -->
<link rel="stylesheet" href="js/lib/leaflet/dist/leaflet.css" />
{% script "js/lib/leaflet/dist/leaflet.js" %}
{% script "js/lib/node_modules/signature_pad/dist/signature_pad.min.js" %}
{% script "js/lib/node_modules/leaflet/dist/leaflet.js" %}
{% script "/js/app.js" %}
{% endblock %}

View file

@ -10,7 +10,6 @@
<link rel="stylesheet" type="text/css" href="css/spinner.css" />
<link href="https://fonts.googleapis.com/css?family=Archivo+Black|Archivo+Narrow" rel="stylesheet"/>
<title>{{site-title}}: {{title}}</title>
{% script "js/lib/jquery/dist/jquery.min.js" %}
{% endblock %}
{% block extra-head %}
<!-- extra-head: put any additional markup to go into the head of your document into this block -->
@ -76,10 +75,6 @@
</footer>
{% endblock %}
{% endblock %}
{% block extra-tail %}
<!-- extra-tail: put markup here which needs to be at the very end of the body -->
<!-- e.g. some javascript script tags, some link tags -->
{% endblock %}
<script type="text/javascript">
var context = "{{servlet-context}}";
var csrfToken = "{{csrf-token}}";
@ -87,6 +82,10 @@
/* extra-script: put any actual javascript source text you need into this block */
{% endblock %}
</script>
{% block extra-tail %}
<!-- extra-tail: put markup here which needs to be at the very end of the body -->
<!-- e.g. some javascript script tags, some link tags -->
{% endblock %}
</body>
</html>

View file

@ -1,60 +0,0 @@
{% extends "base.html" %}
{% block title %}
{% endblock %}
{% block content %}
<form action="edit-canvasser" method="post">
{% if canvasser %}
<input type="hidden" name="id" id="id" value="{{canvasser.id}}"/>
{% endif %}
<p class="widget">
<label for="fullname">Full name</label>
<input type="text" name="fullname" id="fullname" value="{{canvasser.fullname}}"/>
</p>
<p class="widget">
(TODO: Not absolutely sure what I'm going to do for an elector id widget yet.)
</p>
<p class="widget">
<label for="address">Address</label>
{% if address.id %}
<!-- if we already have an address, just show it with a link to edit it -->
<span class="pseudo-widget" id="address">
{{address.address}}
</span>
{% else %}
(TODO: Some sort of address lookup widget goes here.)
{% endif %}
</p>
<p class="widget">
<label for="phone">Phone number</label>
<input type="tel" name="phone" id="phone" value="{{canvasser.phone}}"/>
</p>
<p class="widget">
<label for="email">Email address</label>
<input type="email" name="email" id="email" value="{{canvasser.email}}"/>
</p>
<p class="widget">
<label for="authority_id">Authorised by</label>
<select name="authority_id" id="authority_id">
{% for authority in authorities %}
<option value="{{authority.id}}"
{% ifequal authority.id canvasser.authority_id %}selected {% endifequal %}>
{{authority.id}}
</option>
</select>
</p>
</p>
id serial,
username character varying(32) NOT NULL,
fullname character varying(64) NOT NULL,
elector_id integer,
address_id integer NOT NULL,
phone character varying(16),
email character varying(128),
authority_id character varying(32) NOT NULL,
introduced_by int references canvassers(id),
authorised boolean
</form>
{% endblock %}