Generally, removing files auto-generated from ADL from the repository.

This commit is contained in:
Simon Brooke 2018-07-17 22:37:34 +01:00
parent 0bf1a2d7f6
commit 325ad7ed67
39 changed files with 204 additions and 11313 deletions

File diff suppressed because it is too large Load diff

View file

@ -5,7 +5,7 @@
-- --
-- auto-generated by [Application Description Language framework] -- auto-generated by [Application Description Language framework]
-- --
-- (https://github.com/simon-brooke/adl) at 20180715T195945.839Z -- (https://github.com/simon-brooke/adl) at 20180717T075810.523Z
-- --
-- A web-app intended to be used by canvassers -- A web-app intended to be used by canvassers
-- campaigning for a 'Yes' vote in the second independence -- campaigning for a 'Yes' vote in the second independence
@ -211,7 +211,8 @@ CREATE TABLE electors
dwelling_id INTEGER NOT NULL, dwelling_id INTEGER NOT NULL,
phone VARCHAR(16), phone VARCHAR(16),
email VARCHAR(128), email VARCHAR(128),
gender VARCHAR(32) DEFAULT 'Unknown' gender VARCHAR(32) DEFAULT 'Unknown',
signature TEXT
); );
GRANT SELECT ON electors TO admin, GRANT SELECT ON electors TO admin,
analysts, analysts,
@ -600,6 +601,7 @@ SELECT electors.name,
electors.email, electors.email,
genders.id AS gender_expanded, genders.id AS gender_expanded,
electors.gender, electors.gender,
electors.signature,
electors.id electors.id
FROM dwellings, addresses, genders, electors FROM dwellings, addresses, genders, electors
WHERE electors.dwelling_id = dwellings.id WHERE electors.dwelling_id = dwellings.id
@ -804,7 +806,7 @@ GRANT SELECT ON lv_teams TO admin,
CREATE VIEW lv_visits AS CREATE VIEW lv_visits AS
SELECT addresses.address ||', '|| addresses.postcode AS address_id_expanded, SELECT addresses.address ||', '|| addresses.postcode AS address_id_expanded,
visits.address_id, visits.address_id,
canvassers.username ||', '|| canvassers.fullname ||', '|| addresses.address ||', '|| addresses.postcode ||', '|| canvassers.phone ||', '|| canvassers.email AS canvasser_id_expanded, canvassers.username ||', '|| canvassers.fullname ||', ' || canvassers.phone ||', '|| canvassers.email AS canvasser_id_expanded,
visits.canvasser_id, visits.canvasser_id,
visits.date, visits.date,
visits.id visits.id

View file

@ -1,269 +0,0 @@
{% extends "base.html" %}
<!-- File application-index.html generated 2018-07-15T19:59:46.651Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %}
<dl class='index'>
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dt>
<a href='{{servlet-context}}/list-addresses-Addresses'>
Address
</a>
</dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dd>
<p>
Addresses of all buildings which contain
dwellings.
</p>
</dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dt>
<a href='{{servlet-context}}/list-authorities-Authorities'>
Authority
</a>
</dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dd>
<p>
Authorities which may authenticate canvassers to
the system.
</p>
</dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dt>
<a href='{{servlet-context}}/list-canvassers-Canvassers'>
Canvasser
</a>
</dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dd>
<p>
Primary users of the system: those actually
interviewing electors.
</p>
</dd>
{% endifmemberof %}
{% ifmemberof public admin canvassers teamorganisers issueexperts analysts issueeditors %}
<dt>
<a href='{{servlet-context}}/list-districts-Districts'>
District
</a>
</dt>
{% endifmemberof %}
{% ifmemberof public admin canvassers teamorganisers issueexperts analysts issueeditors %}
<dd>
<p>
Electoral districts: TODO: Shape (polygon)
information will need to be added, for use in
maps.
</p>
</dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dt>
<a href='{{servlet-context}}/list-dwellings-Dwellings'>
Dwelling
</a>
</dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dd>
<p>
All dwellings within addresses in the system; a
dwelling is a house, flat or appartment in which electors live.
Every address should have at least one dwelling; essentially,
an address maps onto a street door and dwellings map onto
what's behind that door. So a tenement or a block of flats
would be one address with many dwellings.
</p>
</dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dt>
<a href='{{servlet-context}}/list-electors-Electors'>
Elector
</a>
</dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dd>
<p>
All electors known to the system; electors are
people believed to be entitled to vote in the current
campaign.
</p>
</dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dt>
<a href='{{servlet-context}}/list-events-Events'>
Event
</a>
</dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dd>
<p>
An event to which a team or teams are invited. Typically created by the team organiser(s).
May be a training event, a social event or a canvassing session.
</p>
</dd>
{% endifmemberof %}
{% ifmemberof issueexperts canvassers analysts issueeditors admin %}
<dt>
<a href='{{servlet-context}}/list-followupactions-Followupactions'>
Followupaction
</a>
</dt>
{% endifmemberof %}
{% ifmemberof issueexperts canvassers analysts issueeditors admin %}
<dd>
<p>
Actions taken on followup
requests.
</p>
</dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dt>
<a href='{{servlet-context}}/list-followupmethods-Followupmethods'>
Followupmethod
</a>
</dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dd>
<p>
Methods which may be used to follow up a followup request. Reference data.
</p>
</dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dt>
<a href='{{servlet-context}}/list-followuprequests-Followuprequests'>
Followuprequest
</a>
</dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dd>
<p>
Requests for a followup with an issue
expert
</p>
</dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dt>
<a href='{{servlet-context}}/list-genders-Genders'>
Gender
</a>
</dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dd>
<p>
All genders which may be assigned to
electors.
</p>
</dd>
{% endifmemberof %}
{% ifmemberof canvassers analysts admin %}
<dt>
<a href='{{servlet-context}}/list-intentions-Intentions'>
Intention
</a>
</dt>
{% endifmemberof %}
{% ifmemberof canvassers analysts admin %}
<dd>
<p>
Intentions of electors to vote for options
elicited in visits.
</p>
</dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dt>
<a href='{{servlet-context}}/list-issues-Issues'>
Issue
</a>
</dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dd>
<p>
Issues believed to be of interest to electors,
about which they may have questions.
</p>
</dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dt>
<a href='{{servlet-context}}/list-options-Options'>
Option
</a>
</dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dd>
<p>
Options in the election or referendum being
canvassed on
</p>
</dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dt>
<a href='{{servlet-context}}/list-roles-Roles'>
Role
</a>
</dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dd>
<p>
A role (essentially, the same as a group, but
application layer rather than database layer) of which a user
may be a member.
</p>
</dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
<dt>
<a href='{{servlet-context}}/list-teams-Teams'>
Team
</a>
</dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
<dd>
</dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers admin %}
<dt>
<a href='{{servlet-context}}/list-visits-Visits'>
Visit
</a>
</dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers admin %}
<dd>
<p>
All visits made by canvassers to dwellings in
which opinions were recorded.
</p>
</dd>
{% endifmemberof %}
</dl>
{% endblock %}

View file

@ -1,278 +0,0 @@
{% extends "base.html" %}
<!-- File form-addresses-Address.html generated 2018-07-15T19:59:46.643Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% script "/js/lib/node_modules/selectize/dist/js/standalone/selectize.min.js" %}
{% style "/js/lib/node_modules/selectize/dist/css/selectize.css" %}
{% endblock %}
{% block content %}
<div id='content' class='edit'>
<form action='{{servlet-context}}/form-addresses-Address' method='POST'>
{% csrf-field %}
<input id='id' name='id' type='hidden' value='{{record.id}}'/>
<p class='widget'>
<label for='address'>
Address
</label>
{% if {{record.address}} %}
{% ifmemberof admin %}
<input id='address' name='address' type='string' value='{{record.address}}' maxlength='256' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='address' name='address' class='pseudo-widget disabled'>
{{record.address}}
</span>
{% else %}
<span id='address' name='address' class='pseudo-widget not-authorised'>
You are not permitted to view address of addresses
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<input id='address' name='address' type='string' value='{{record.address}}' maxlength='256' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='address' name='address' class='pseudo-widget disabled'>
{{record.address}}
</span>
{% else %}
<span id='address' name='address' class='pseudo-widget not-authorised'>
You are not permitted to view address of addresses
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='postcode'>
Postcode
</label>
{% if {{record.postcode}} %}
{% ifmemberof admin %}
<input id='postcode' name='postcode' type='string' value='{{record.postcode}}' maxlength='16' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='postcode' name='postcode' class='pseudo-widget disabled'>
{{record.postcode}}
</span>
{% else %}
<span id='postcode' name='postcode' class='pseudo-widget not-authorised'>
You are not permitted to view postcode of addresses
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<input id='postcode' name='postcode' type='string' value='{{record.postcode}}' maxlength='16' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='postcode' name='postcode' class='pseudo-widget disabled'>
{{record.postcode}}
</span>
{% else %}
<span id='postcode' name='postcode' class='pseudo-widget not-authorised'>
You are not permitted to view postcode of addresses
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='phone'>
Phone
</label>
{% if {{record.phone}} %}
{% ifmemberof admin %}
<input id='phone' name='phone' type='string' value='{{record.phone}}' maxlength='16' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='phone' name='phone' class='pseudo-widget disabled'>
{{record.phone}}
</span>
{% else %}
<span id='phone' name='phone' class='pseudo-widget not-authorised'>
You are not permitted to view phone of addresses
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<input id='phone' name='phone' type='string' value='{{record.phone}}' maxlength='16' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='phone' name='phone' class='pseudo-widget disabled'>
{{record.phone}}
</span>
{% else %}
<span id='phone' name='phone' class='pseudo-widget not-authorised'>
You are not permitted to view phone of addresses
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='district_id'>
District_id
</label>
{% if {{record.district_id}} %}
{% ifmemberof admin %}
<select id='district_id' name='district_id'>
{% for option in district_id %}<option value='{{option.id}}' {% ifequal record.district_id option.id%}selected='selected'{% endifequal %}>{{option.name}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='district_id' name='district_id' class='pseudo-widget disabled'>
{{record.district_id}}
</span>
{% else %}
<span id='district_id' name='district_id' class='pseudo-widget not-authorised'>
You are not permitted to view district_id of addresses
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<select id='district_id' name='district_id'>
{% for option in district_id %}<option value='{{option.id}}' {% ifequal record.district_id option.id%}selected='selected'{% endifequal %}>{{option.name}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='district_id' name='district_id' class='pseudo-widget disabled'>
{{record.district_id}}
</span>
{% else %}
<span id='district_id' name='district_id' class='pseudo-widget not-authorised'>
You are not permitted to view district_id of addresses
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='latitude'>
Latitude
</label>
{% if {{record.latitude}} %}
{% ifmemberof admin %}
<input id='latitude' name='latitude' type='number' value='{{record.latitude}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='latitude' name='latitude' class='pseudo-widget disabled'>
{{record.latitude}}
</span>
{% else %}
<span id='latitude' name='latitude' class='pseudo-widget not-authorised'>
You are not permitted to view latitude of addresses
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<input id='latitude' name='latitude' type='number' value='{{record.latitude}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='latitude' name='latitude' class='pseudo-widget disabled'>
{{record.latitude}}
</span>
{% else %}
<span id='latitude' name='latitude' class='pseudo-widget not-authorised'>
You are not permitted to view latitude of addresses
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='longitude'>
Longitude
</label>
{% if {{record.longitude}} %}
{% ifmemberof admin %}
<input id='longitude' name='longitude' type='number' value='{{record.longitude}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='longitude' name='longitude' class='pseudo-widget disabled'>
{{record.longitude}}
</span>
{% else %}
<span id='longitude' name='longitude' class='pseudo-widget not-authorised'>
You are not permitted to view longitude of addresses
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<input id='longitude' name='longitude' type='number' value='{{record.longitude}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='longitude' name='longitude' class='pseudo-widget disabled'>
{{record.longitude}}
</span>
{% else %}
<span id='longitude' name='longitude' class='pseudo-widget not-authorised'>
You are not permitted to view longitude of addresses
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
{% ifmemberof admin %}
<p class='widget action-safe'>
<label for='save-button' class='action-safe'>
To save this addresses record
</label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p>
{% endifmemberof %}
{% ifmemberof admin %}
<p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'>
To delete this addresses record
</label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p>
{% endifmemberof %}
</form>
</div>
{% endblock %}
{% block extra-tail %}
<script type='text/javascript'>
/**
* selectize one select widget. Substitute the actual id of the widget for `district_id`,
* and the current value for {{record.district_id}}.
*/
$('#district_id').selectize({
valueField: 'id',
labelField: 'name',
searchField: 'name',
hideSelected: false,
create: false,
load: function(query, callback) {
console.log('Desperately seeking ' + query);
if (query === null || !query.length) return callback();
$.ajax({
url: '/json/auto/search-strings-electors?name=' + query,
type: 'GET',
dataType: 'jsonp',
error: function() {
console.log( 'Query ' + query + ' failed.');
callback();
},
success: function(res) {
console.log('Received ' + res + ' records for ' + query);
callback(res);
}
});
}
})[0].selectize.setValue({{record.district_id}}, true);
</script>
{% endblock %}

View file

@ -1,241 +0,0 @@
{% extends "base.html" %}
<!-- File form-authorities-Authority.html generated 2018-07-15T19:59:46.656Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% endblock %}
{% block content %}
<div id='content' class='edit'>
<form action='{{servlet-context}}/form-authorities-Authority' method='POST'>
{% csrf-field %}
<p class='widget'>
<label for='id'>
Id
</label>
{% if {{record.id}} %}
{% ifmemberof admin %}
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='32' size='32'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% else %}
<span id='id' name='id' class='pseudo-widget not-authorised'>
You are not permitted to view id of authorities
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='32' size='32'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% else %}
<span id='id' name='id' class='pseudo-widget not-authorised'>
You are not permitted to view id of authorities
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='request_token_uri'>
Request-token-uri
</label>
{% if {{record.request-token-uri}} %}
{% ifmemberof admin %}
<input id='request_token_uri' name='request_token_uri' type='string' value='{{record.request_token_uri}}' maxlength='256' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='request_token_uri' name='request_token_uri' class='pseudo-widget disabled'>
{{record.request_token_uri}}
</span>
{% else %}
<span id='request_token_uri' name='request_token_uri' class='pseudo-widget not-authorised'>
You are not permitted to view request_token_uri of authorities
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<input id='request_token_uri' name='request_token_uri' type='string' value='{{record.request_token_uri}}' maxlength='256' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='request_token_uri' name='request_token_uri' class='pseudo-widget disabled'>
{{record.request_token_uri}}
</span>
{% else %}
<span id='request_token_uri' name='request_token_uri' class='pseudo-widget not-authorised'>
You are not permitted to view request_token_uri of authorities
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='access_token_uri'>
Access-token-uri
</label>
{% if {{record.access-token-uri}} %}
{% ifmemberof admin %}
<input id='access_token_uri' name='access_token_uri' type='string' value='{{record.access_token_uri}}' maxlength='256' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='access_token_uri' name='access_token_uri' class='pseudo-widget disabled'>
{{record.access_token_uri}}
</span>
{% else %}
<span id='access_token_uri' name='access_token_uri' class='pseudo-widget not-authorised'>
You are not permitted to view access_token_uri of authorities
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<input id='access_token_uri' name='access_token_uri' type='string' value='{{record.access_token_uri}}' maxlength='256' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='access_token_uri' name='access_token_uri' class='pseudo-widget disabled'>
{{record.access_token_uri}}
</span>
{% else %}
<span id='access_token_uri' name='access_token_uri' class='pseudo-widget not-authorised'>
You are not permitted to view access_token_uri of authorities
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='authorize_uri'>
Authorize-uri
</label>
{% if {{record.authorize-uri}} %}
{% ifmemberof admin %}
<input id='authorize_uri' name='authorize_uri' type='string' value='{{record.authorize_uri}}' maxlength='256' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='authorize_uri' name='authorize_uri' class='pseudo-widget disabled'>
{{record.authorize_uri}}
</span>
{% else %}
<span id='authorize_uri' name='authorize_uri' class='pseudo-widget not-authorised'>
You are not permitted to view authorize_uri of authorities
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<input id='authorize_uri' name='authorize_uri' type='string' value='{{record.authorize_uri}}' maxlength='256' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='authorize_uri' name='authorize_uri' class='pseudo-widget disabled'>
{{record.authorize_uri}}
</span>
{% else %}
<span id='authorize_uri' name='authorize_uri' class='pseudo-widget not-authorised'>
You are not permitted to view authorize_uri of authorities
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='consumer_key'>
Consumer-key
</label>
{% if {{record.consumer-key}} %}
{% ifmemberof admin %}
<input id='consumer_key' name='consumer_key' type='string' value='{{record.consumer_key}}' maxlength='32' size='32'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='consumer_key' name='consumer_key' class='pseudo-widget disabled'>
{{record.consumer_key}}
</span>
{% else %}
<span id='consumer_key' name='consumer_key' class='pseudo-widget not-authorised'>
You are not permitted to view consumer_key of authorities
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<input id='consumer_key' name='consumer_key' type='string' value='{{record.consumer_key}}' maxlength='32' size='32'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='consumer_key' name='consumer_key' class='pseudo-widget disabled'>
{{record.consumer_key}}
</span>
{% else %}
<span id='consumer_key' name='consumer_key' class='pseudo-widget not-authorised'>
You are not permitted to view consumer_key of authorities
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='consumer_secret'>
Consumer-secret
</label>
{% if {{record.consumer-secret}} %}
{% ifmemberof admin %}
<input id='consumer_secret' name='consumer_secret' type='string' value='{{record.consumer_secret}}' maxlength='256' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='consumer_secret' name='consumer_secret' class='pseudo-widget disabled'>
{{record.consumer_secret}}
</span>
{% else %}
<span id='consumer_secret' name='consumer_secret' class='pseudo-widget not-authorised'>
You are not permitted to view consumer_secret of authorities
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<input id='consumer_secret' name='consumer_secret' type='string' value='{{record.consumer_secret}}' maxlength='256' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='consumer_secret' name='consumer_secret' class='pseudo-widget disabled'>
{{record.consumer_secret}}
</span>
{% else %}
<span id='consumer_secret' name='consumer_secret' class='pseudo-widget not-authorised'>
You are not permitted to view consumer_secret of authorities
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
{% ifmemberof admin %}
<p class='widget action-safe'>
<label for='save-button' class='action-safe'>
To save this authorities record
</label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p>
{% endifmemberof %}
{% ifmemberof admin %}
<p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'>
To delete this authorities record
</label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p>
{% endifmemberof %}
</form>
</div>
{% endblock %}
{% block extra-tail %}
<script type='text/javascript'>
</script>
{% endblock %}

View file

@ -1,514 +0,0 @@
{% extends "base.html" %}
<!-- File form-canvassers-Canvasser.html generated 2018-07-15T19:59:46.660Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% script "js/lib/node_modules/simplemde/dist/simplemde.min.js" %}
{% style "js/lib/node_modules/simplemde/dist/simplemde.min.css" %}
{% script "/js/lib/node_modules/selectize/dist/js/standalone/selectize.min.js" %}
{% style "/js/lib/node_modules/selectize/dist/css/selectize.css" %}
{% endblock %}
{% block content %}
<div id='content' class='edit'>
<form action='{{servlet-context}}/form-canvassers-Canvasser' method='POST'>
{% csrf-field %}
<input id='id' name='id' type='hidden' value='{{record.id}}'/>
<p class='widget'>
<label for='username'>
Username
</label>
{% if {{record.username}} %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<input id='username' name='username' type='string' value='{{record.username}}' maxlength='32' size='32'/>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='username' name='username' class='pseudo-widget disabled'>
{{record.username}}
</span>
{% else %}
<span id='username' name='username' class='pseudo-widget not-authorised'>
You are not permitted to view username of canvassers
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<input id='username' name='username' type='string' value='{{record.username}}' maxlength='32' size='32'/>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='username' name='username' class='pseudo-widget disabled'>
{{record.username}}
</span>
{% else %}
<span id='username' name='username' class='pseudo-widget not-authorised'>
You are not permitted to view username of canvassers
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='fullname'>
Fullname
</label>
{% if {{record.fullname}} %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<input id='fullname' name='fullname' type='string' value='{{record.fullname}}' maxlength='64' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='fullname' name='fullname' class='pseudo-widget disabled'>
{{record.fullname}}
</span>
{% else %}
<span id='fullname' name='fullname' class='pseudo-widget not-authorised'>
You are not permitted to view fullname of canvassers
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<input id='fullname' name='fullname' type='string' value='{{record.fullname}}' maxlength='64' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='fullname' name='fullname' class='pseudo-widget disabled'>
{{record.fullname}}
</span>
{% else %}
<span id='fullname' name='fullname' class='pseudo-widget not-authorised'>
You are not permitted to view fullname of canvassers
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='avatar'>
Avatar
</label>
{% if {{record.avatar}} %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<input id='avatar' name='avatar' type='file' value='{{record.avatar}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='avatar' name='avatar' class='pseudo-widget disabled'>
{{record.avatar}}
</span>
{% else %}
<span id='avatar' name='avatar' class='pseudo-widget not-authorised'>
You are not permitted to view avatar of canvassers
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<input id='avatar' name='avatar' type='file' value='{{record.avatar}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='avatar' name='avatar' class='pseudo-widget disabled'>
{{record.avatar}}
</span>
{% else %}
<span id='avatar' name='avatar' class='pseudo-widget not-authorised'>
You are not permitted to view avatar of canvassers
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='bio'>
Bio
</label>
{% if {{record.bio}} %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<textarea rows='8' cols='60' id='bio' name='bio'>
{{record.bio}}
</textarea>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='bio' name='bio' class='pseudo-widget disabled'>
{{record.bio}}
</span>
{% else %}
<span id='bio' name='bio' class='pseudo-widget not-authorised'>
You are not permitted to view bio of canvassers
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<textarea rows='8' cols='60' id='bio' name='bio'>
{{record.bio}}
</textarea>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='bio' name='bio' class='pseudo-widget disabled'>
{{record.bio}}
</span>
{% else %}
<span id='bio' name='bio' class='pseudo-widget not-authorised'>
You are not permitted to view bio of canvassers
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='elector_id'>
Elector_id
</label>
{% if {{record.elector_id}} %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<select id='elector_id' name='elector_id'>
{% for option in elector_id %}<option value='{{option.id}}' {% ifequal record.elector_id option.id%}selected='selected'{% endifequal %}>{{option.name}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='elector_id' name='elector_id' class='pseudo-widget disabled'>
{{record.elector_id}}
</span>
{% else %}
<span id='elector_id' name='elector_id' class='pseudo-widget not-authorised'>
You are not permitted to view elector_id of canvassers
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<select id='elector_id' name='elector_id'>
{% for option in elector_id %}<option value='{{option.id}}' {% ifequal record.elector_id option.id%}selected='selected'{% endifequal %}>{{option.name}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='elector_id' name='elector_id' class='pseudo-widget disabled'>
{{record.elector_id}}
</span>
{% else %}
<span id='elector_id' name='elector_id' class='pseudo-widget not-authorised'>
You are not permitted to view elector_id of canvassers
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='address_id'>
Address_id
</label>
{% if {{record.address_id}} %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<select id='address_id' name='address_id'>
{% for option in address_id %}<option value='{{option.id}}' {% ifequal record.address_id option.id%}selected='selected'{% endifequal %}>{{option.address}} {{option.postcode}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='address_id' name='address_id' class='pseudo-widget disabled'>
{{record.address_id}}
</span>
{% else %}
<span id='address_id' name='address_id' class='pseudo-widget not-authorised'>
You are not permitted to view address_id of canvassers
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<select id='address_id' name='address_id'>
{% for option in address_id %}<option value='{{option.id}}' {% ifequal record.address_id option.id%}selected='selected'{% endifequal %}>{{option.address}} {{option.postcode}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='address_id' name='address_id' class='pseudo-widget disabled'>
{{record.address_id}}
</span>
{% else %}
<span id='address_id' name='address_id' class='pseudo-widget not-authorised'>
You are not permitted to view address_id of canvassers
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='phone'>
Phone
</label>
{% if {{record.phone}} %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<input id='phone' name='phone' type='string' value='{{record.phone}}' maxlength='16' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='phone' name='phone' class='pseudo-widget disabled'>
{{record.phone}}
</span>
{% else %}
<span id='phone' name='phone' class='pseudo-widget not-authorised'>
You are not permitted to view phone of canvassers
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<input id='phone' name='phone' type='string' value='{{record.phone}}' maxlength='16' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='phone' name='phone' class='pseudo-widget disabled'>
{{record.phone}}
</span>
{% else %}
<span id='phone' name='phone' class='pseudo-widget not-authorised'>
You are not permitted to view phone of canvassers
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='email'>
Email
</label>
{% if {{record.email}} %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<input id='email' name='email' type='string' value='{{record.email}}' maxlength='128' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='email' name='email' class='pseudo-widget disabled'>
{{record.email}}
</span>
{% else %}
<span id='email' name='email' class='pseudo-widget not-authorised'>
You are not permitted to view email of canvassers
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<input id='email' name='email' type='string' value='{{record.email}}' maxlength='128' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='email' name='email' class='pseudo-widget disabled'>
{{record.email}}
</span>
{% else %}
<span id='email' name='email' class='pseudo-widget not-authorised'>
You are not permitted to view email of canvassers
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='authority_id'>
Authority_id
</label>
{% if {{record.authority_id}} %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<select id='authority_id' name='authority_id'>
{% for option in authority_id %}<option value='{{option.id}}' {% ifequal record.authority_id option.id%}selected='selected'{% endifequal %}>{{option.id}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='authority_id' name='authority_id' class='pseudo-widget disabled'>
{{record.authority_id}}
</span>
{% else %}
<span id='authority_id' name='authority_id' class='pseudo-widget not-authorised'>
You are not permitted to view authority_id of canvassers
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<select id='authority_id' name='authority_id'>
{% for option in authority_id %}<option value='{{option.id}}' {% ifequal record.authority_id option.id%}selected='selected'{% endifequal %}>{{option.id}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='authority_id' name='authority_id' class='pseudo-widget disabled'>
{{record.authority_id}}
</span>
{% else %}
<span id='authority_id' name='authority_id' class='pseudo-widget not-authorised'>
You are not permitted to view authority_id of canvassers
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='authorised'>
Authorised
</label>
{% if {{record.authorised}} %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<input id='authorised' name='authorised' type='checkbox' value='{{record.authorised}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='authorised' name='authorised' class='pseudo-widget disabled'>
{{record.authorised}}
</span>
{% else %}
<span id='authorised' name='authorised' class='pseudo-widget not-authorised'>
You are not permitted to view authorised of canvassers
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<input id='authorised' name='authorised' type='checkbox' value='{{record.authorised}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='authorised' name='authorised' class='pseudo-widget disabled'>
{{record.authorised}}
</span>
{% else %}
<span id='authorised' name='authorised' class='pseudo-widget not-authorised'>
You are not permitted to view authorised of canvassers
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='roles'>
Roles
</label>
{% if {{record.roles}} %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<select id='roles' name='roles' multiple='multiple'>
{% for option in roles %}<option value='{{option.role_id}}' {% ifequal record.roles option.role_id%}selected='selected'{% endifequal %}>{{option.name}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='roles' name='roles' class='pseudo-widget disabled'>
{{record.roles}}
</span>
{% else %}
<span id='roles' name='roles' class='pseudo-widget not-authorised'>
You are not permitted to view roles of canvassers
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<select id='roles' name='roles' multiple='multiple'>
{% for option in roles %}<option value='{{option.role_id}}' {% ifequal record.roles option.role_id%}selected='selected'{% endifequal %}>{{option.name}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='roles' name='roles' class='pseudo-widget disabled'>
{{record.roles}}
</span>
{% else %}
<span id='roles' name='roles' class='pseudo-widget not-authorised'>
You are not permitted to view roles of canvassers
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<p class='widget action-safe'>
<label for='save-button' class='action-safe'>
To save this canvassers record
</label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'>
To delete this canvassers record
</label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p>
{% endifmemberof %}
</form>
</div>
{% endblock %}
{% block extra-tail %}
<script type='text/javascript'>
/**
* selectize one select widget. Substitute the actual id of the widget for `elector_id`,
* and the current value for {{record.elector_id}}.
*/
$('#elector_id').selectize({
valueField: 'id',
labelField: 'name',
searchField: 'name',
hideSelected: false,
create: false,
load: function(query, callback) {
console.log('Desperately seeking ' + query);
if (query === null || !query.length) return callback();
$.ajax({
url: '/json/auto/search-strings-electors?name=' + query,
type: 'GET',
dataType: 'jsonp',
error: function() {
console.log( 'Query ' + query + ' failed.');
callback();
},
success: function(res) {
console.log('Received ' + res + ' records for ' + query);
callback(res);
}
});
}
})[0].selectize.setValue({{record.elector_id}}, true);
/**
* selectize one select widget. Substitute the actual id of the widget for `address_id`,
* and the current value for {{record.address_id}}.
*/
$('#address_id').selectize({
valueField: 'id',
labelField: 'name',
searchField: 'name',
hideSelected: false,
create: false,
load: function(query, callback) {
console.log('Desperately seeking ' + query);
if (query === null || !query.length) return callback();
$.ajax({
url: '/json/auto/search-strings-electors?name=' + query,
type: 'GET',
dataType: 'jsonp',
error: function() {
console.log( 'Query ' + query + ' failed.');
callback();
},
success: function(res) {
console.log('Received ' + res + ' records for ' + query);
callback(res);
}
});
}
})[0].selectize.setValue({{record.address_id}}, true);
var simplemde = new SimpleMDE({
autosave: {
enabled: true,
uniqueId: "Smeagol-{{page}}",
delay: 1000,
},
indentWithTabs: true,
insertTexts: {
horizontalRule: ["", "\n\n-----\n\n"],
image: ["![](http://", ")"],
link: ["[", "](http://)"],
table: ["", "\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text | Text | Text |\n\n"],
},
showIcons: ["code"], //, "table"], - sadly, markdown-clj does not support tables
spellChecker: true,
status: ["autosave", "lines", "words", "cursor"]
});
</script>
{% endblock %}

View file

@ -1,72 +0,0 @@
{% extends "base.html" %}
<!-- File form-districts-District.html generated 2018-07-15T19:59:46.640Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% endblock %}
{% block content %}
<div id='content' class='edit'>
<form action='{{servlet-context}}/form-districts-District' method='POST'>
{% csrf-field %}
<input id='id' name='id' type='hidden' value='{{record.id}}'/>
<p class='widget'>
<label for='name'>
Name
</label>
{% if {{record.name}} %}
{% ifmemberof admin %}
<input id='name' name='name' type='string' value='{{record.name}}' maxlength='64' size='60'/>
{% else %}
{% ifmemberof public admin canvassers teamorganisers issueexperts analysts issueeditors %}
<span id='name' name='name' class='pseudo-widget disabled'>
{{record.name}}
</span>
{% else %}
<span id='name' name='name' class='pseudo-widget not-authorised'>
You are not permitted to view name of districts
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<input id='name' name='name' type='string' value='{{record.name}}' maxlength='64' size='60'/>
{% else %}
{% ifmemberof public admin canvassers teamorganisers issueexperts analysts issueeditors %}
<span id='name' name='name' class='pseudo-widget disabled'>
{{record.name}}
</span>
{% else %}
<span id='name' name='name' class='pseudo-widget not-authorised'>
You are not permitted to view name of districts
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
{% ifmemberof admin %}
<p class='widget action-safe'>
<label for='save-button' class='action-safe'>
To save this districts record
</label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p>
{% endifmemberof %}
{% ifmemberof admin %}
<p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'>
To delete this districts record
</label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p>
{% endifmemberof %}
</form>
</div>
{% endblock %}
{% block extra-tail %}
<script type='text/javascript'>
</script>
{% endblock %}

View file

@ -1,142 +0,0 @@
{% extends "base.html" %}
<!-- File form-dwellings-Dwelling.html generated 2018-07-15T19:59:46.667Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% script "/js/lib/node_modules/selectize/dist/js/standalone/selectize.min.js" %}
{% style "/js/lib/node_modules/selectize/dist/css/selectize.css" %}
{% endblock %}
{% block content %}
<div id='content' class='edit'>
<form action='{{servlet-context}}/form-dwellings-Dwelling' method='POST'>
{% csrf-field %}
<input id='id' name='id' type='hidden' value='{{record.id}}'/>
<p class='widget'>
<label for='address_id'>
Address_id
</label>
{% if {{record.address_id}} %}
{% ifmemberof admin %}
<select id='address_id' name='address_id'>
{% for option in address_id %}<option value='{{option.id}}' {% ifequal record.address_id option.id%}selected='selected'{% endifequal %}>{{option.address}} {{option.postcode}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='address_id' name='address_id' class='pseudo-widget disabled'>
{{record.address_id}}
</span>
{% else %}
<span id='address_id' name='address_id' class='pseudo-widget not-authorised'>
You are not permitted to view address_id of dwellings
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<select id='address_id' name='address_id'>
{% for option in address_id %}<option value='{{option.id}}' {% ifequal record.address_id option.id%}selected='selected'{% endifequal %}>{{option.address}} {{option.postcode}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='address_id' name='address_id' class='pseudo-widget disabled'>
{{record.address_id}}
</span>
{% else %}
<span id='address_id' name='address_id' class='pseudo-widget not-authorised'>
You are not permitted to view address_id of dwellings
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='sub_address'>
Sub-address
</label>
{% if {{record.sub-address}} %}
{% ifmemberof admin %}
<input id='sub_address' name='sub_address' type='string' value='{{record.sub_address}}' maxlength='32' size='32'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='sub_address' name='sub_address' class='pseudo-widget disabled'>
{{record.sub_address}}
</span>
{% else %}
<span id='sub_address' name='sub_address' class='pseudo-widget not-authorised'>
You are not permitted to view sub_address of dwellings
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<input id='sub_address' name='sub_address' type='string' value='{{record.sub_address}}' maxlength='32' size='32'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='sub_address' name='sub_address' class='pseudo-widget disabled'>
{{record.sub_address}}
</span>
{% else %}
<span id='sub_address' name='sub_address' class='pseudo-widget not-authorised'>
You are not permitted to view sub_address of dwellings
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
{% ifmemberof admin %}
<p class='widget action-safe'>
<label for='save-button' class='action-safe'>
To save this dwellings record
</label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p>
{% endifmemberof %}
{% ifmemberof admin %}
<p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'>
To delete this dwellings record
</label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p>
{% endifmemberof %}
</form>
</div>
{% endblock %}
{% block extra-tail %}
<script type='text/javascript'>
/**
* selectize one select widget. Substitute the actual id of the widget for `address_id`,
* and the current value for {{record.address_id}}.
*/
$('#address_id').selectize({
valueField: 'id',
labelField: 'name',
searchField: 'name',
hideSelected: false,
create: false,
load: function(query, callback) {
console.log('Desperately seeking ' + query);
if (query === null || !query.length) return callback();
$.ajax({
url: '/json/auto/search-strings-electors?name=' + query,
type: 'GET',
dataType: 'jsonp',
error: function() {
console.log( 'Query ' + query + ' failed.');
callback();
},
success: function(res) {
console.log('Received ' + res + ' records for ' + query);
callback(res);
}
});
}
})[0].selectize.setValue({{record.address_id}}, true);
</script>
{% endblock %}

View file

@ -1,248 +0,0 @@
{% extends "base.html" %}
<!-- File form-electors-Elector.html generated 2018-07-15T19:59:46.654Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% script "/js/lib/node_modules/selectize/dist/js/standalone/selectize.min.js" %}
{% style "/js/lib/node_modules/selectize/dist/css/selectize.css" %}
{% endblock %}
{% block content %}
<div id='content' class='edit'>
<form action='{{servlet-context}}/form-electors-Elector' method='POST'>
{% csrf-field %}
<input id='id' name='id' type='hidden' value='{{record.id}}'/>
<p class='widget'>
<label for='name'>
Name
</label>
{% if {{record.name}} %}
{% ifmemberof admin %}
<input id='name' name='name' type='string' value='{{record.name}}' maxlength='64' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='name' name='name' class='pseudo-widget disabled'>
{{record.name}}
</span>
{% else %}
<span id='name' name='name' class='pseudo-widget not-authorised'>
You are not permitted to view name of electors
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<input id='name' name='name' type='string' value='{{record.name}}' maxlength='64' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='name' name='name' class='pseudo-widget disabled'>
{{record.name}}
</span>
{% else %}
<span id='name' name='name' class='pseudo-widget not-authorised'>
You are not permitted to view name of electors
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='dwelling_id'>
Dwelling_id
</label>
{% if {{record.dwelling_id}} %}
{% ifmemberof admin %}
<select id='dwelling_id' name='dwelling_id'>
{% for option in dwelling_id %}<option value='{{option.id}}' {% ifequal record.dwelling_id option.id%}selected='selected'{% endifequal %}>{{option.address_id_expanded}} {{option.sub-address}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='dwelling_id' name='dwelling_id' class='pseudo-widget disabled'>
{{record.dwelling_id}}
</span>
{% else %}
<span id='dwelling_id' name='dwelling_id' class='pseudo-widget not-authorised'>
You are not permitted to view dwelling_id of electors
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<select id='dwelling_id' name='dwelling_id'>
{% for option in dwelling_id %}<option value='{{option.id}}' {% ifequal record.dwelling_id option.id%}selected='selected'{% endifequal %}>{{option.address_id_expanded}} {{option.sub-address}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='dwelling_id' name='dwelling_id' class='pseudo-widget disabled'>
{{record.dwelling_id}}
</span>
{% else %}
<span id='dwelling_id' name='dwelling_id' class='pseudo-widget not-authorised'>
You are not permitted to view dwelling_id of electors
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='phone'>
Phone
</label>
{% if {{record.phone}} %}
{% ifmemberof admin %}
<input id='phone' name='phone' type='string' value='{{record.phone}}' maxlength='16' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='phone' name='phone' class='pseudo-widget disabled'>
{{record.phone}}
</span>
{% else %}
<span id='phone' name='phone' class='pseudo-widget not-authorised'>
You are not permitted to view phone of electors
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<input id='phone' name='phone' type='string' value='{{record.phone}}' maxlength='16' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='phone' name='phone' class='pseudo-widget disabled'>
{{record.phone}}
</span>
{% else %}
<span id='phone' name='phone' class='pseudo-widget not-authorised'>
You are not permitted to view phone of electors
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='email'>
Email
</label>
{% if {{record.email}} %}
{% ifmemberof admin %}
<input id='email' name='email' type='string' value='{{record.email}}' maxlength='128' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='email' name='email' class='pseudo-widget disabled'>
{{record.email}}
</span>
{% else %}
<span id='email' name='email' class='pseudo-widget not-authorised'>
You are not permitted to view email of electors
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<input id='email' name='email' type='string' value='{{record.email}}' maxlength='128' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='email' name='email' class='pseudo-widget disabled'>
{{record.email}}
</span>
{% else %}
<span id='email' name='email' class='pseudo-widget not-authorised'>
You are not permitted to view email of electors
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='gender'>
Gender
</label>
{% if {{record.gender}} %}
{% ifmemberof admin %}
<select id='gender' name='gender'>
{% for option in gender %}<option value='{{option.id}}' {% ifequal record.gender option.id%}selected='selected'{% endifequal %}>{{option.id}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='gender' name='gender' class='pseudo-widget disabled'>
{{record.gender}}
</span>
{% else %}
<span id='gender' name='gender' class='pseudo-widget not-authorised'>
You are not permitted to view gender of electors
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<select id='gender' name='gender'>
{% for option in gender %}<option value='{{option.id}}' {% ifequal record.gender option.id%}selected='selected'{% endifequal %}>{{option.id}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='gender' name='gender' class='pseudo-widget disabled'>
{{record.gender}}
</span>
{% else %}
<span id='gender' name='gender' class='pseudo-widget not-authorised'>
You are not permitted to view gender of electors
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
{% ifmemberof admin %}
<p class='widget action-safe'>
<label for='save-button' class='action-safe'>
To save this electors record
</label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p>
{% endifmemberof %}
{% ifmemberof admin %}
<p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'>
To delete this electors record
</label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p>
{% endifmemberof %}
</form>
</div>
{% endblock %}
{% block extra-tail %}
<script type='text/javascript'>
/**
* selectize one select widget. Substitute the actual id of the widget for `dwelling_id`,
* and the current value for {{record.dwelling_id}}.
*/
$('#dwelling_id').selectize({
valueField: 'id',
labelField: 'name',
searchField: 'name',
hideSelected: false,
create: false,
load: function(query, callback) {
console.log('Desperately seeking ' + query);
if (query === null || !query.length) return callback();
$.ajax({
url: '/json/auto/search-strings-electors?name=' + query,
type: 'GET',
dataType: 'jsonp',
error: function() {
console.log( 'Query ' + query + ' failed.');
callback();
},
success: function(res) {
console.log('Received ' + res + ' records for ' + query);
callback(res);
}
});
}
})[0].selectize.setValue({{record.dwelling_id}}, true);
</script>
{% endblock %}

View file

@ -1,272 +0,0 @@
{% extends "base.html" %}
<!-- File form-events-Events.html generated 2018-07-15T19:59:46.658Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% script "js/lib/node_modules/simplemde/dist/simplemde.min.js" %}
{% style "js/lib/node_modules/simplemde/dist/simplemde.min.css" %}
{% script "/js/lib/node_modules/selectize/dist/js/standalone/selectize.min.js" %}
{% style "/js/lib/node_modules/selectize/dist/css/selectize.css" %}
{% endblock %}
{% block content %}
<div id='content' class='edit'>
<form action='{{servlet-context}}/form-events-Events' method='POST'>
{% csrf-field %}
<input id='id' name='id' type='hidden' value='{{record.id}}'/>
<p class='widget'>
<label for='name'>
Name
</label>
{% if {{record.name}} %}
{% ifmemberof teamorganisers admin %}
<input id='name' name='name' type='string' value='{{record.name}}' maxlength='64' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='name' name='name' class='pseudo-widget disabled'>
{{record.name}}
</span>
{% else %}
<span id='name' name='name' class='pseudo-widget not-authorised'>
You are not permitted to view name of events
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof teamorganisers admin %}
<input id='name' name='name' type='string' value='{{record.name}}' maxlength='64' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='name' name='name' class='pseudo-widget disabled'>
{{record.name}}
</span>
{% else %}
<span id='name' name='name' class='pseudo-widget not-authorised'>
You are not permitted to view name of events
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='teams'>
Teams
</label>
{% if {{record.teams}} %}
{% ifmemberof teamorganisers admin %}
<select id='teams' name='teams' multiple='multiple'>
{% for option in teams %}<option value='{{option.id}}' {% ifequal record.teams option.id%}selected='selected'{% endifequal %}>{{option.name}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='teams' name='teams' class='pseudo-widget disabled'>
{{record.teams}}
</span>
{% else %}
<span id='teams' name='teams' class='pseudo-widget not-authorised'>
You are not permitted to view teams of events
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof teamorganisers admin %}
<select id='teams' name='teams' multiple='multiple'>
{% for option in teams %}<option value='{{option.id}}' {% ifequal record.teams option.id%}selected='selected'{% endifequal %}>{{option.name}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='teams' name='teams' class='pseudo-widget disabled'>
{{record.teams}}
</span>
{% else %}
<span id='teams' name='teams' class='pseudo-widget not-authorised'>
You are not permitted to view teams of events
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='date'>
Date
</label>
{% if {{record.date}} %}
{% ifmemberof teamorganisers admin %}
<input id='date' name='date' type='date' value='{{record.date}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='date' name='date' class='pseudo-widget disabled'>
{{record.date}}
</span>
{% else %}
<span id='date' name='date' class='pseudo-widget not-authorised'>
You are not permitted to view date of events
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof teamorganisers admin %}
<input id='date' name='date' type='date' value='{{record.date}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='date' name='date' class='pseudo-widget disabled'>
{{record.date}}
</span>
{% else %}
<span id='date' name='date' class='pseudo-widget not-authorised'>
You are not permitted to view date of events
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='time'>
Time
</label>
{% if {{record.time}} %}
{% ifmemberof teamorganisers admin %}
<input id='time' name='time' type='time' value='{{record.time}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='time' name='time' class='pseudo-widget disabled'>
{{record.time}}
</span>
{% else %}
<span id='time' name='time' class='pseudo-widget not-authorised'>
You are not permitted to view time of events
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof teamorganisers admin %}
<input id='time' name='time' type='time' value='{{record.time}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='time' name='time' class='pseudo-widget disabled'>
{{record.time}}
</span>
{% else %}
<span id='time' name='time' class='pseudo-widget not-authorised'>
You are not permitted to view time of events
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='decription'>
Decription
</label>
{% if {{record.decription}} %}
{% ifmemberof teamorganisers admin %}
<textarea rows='8' cols='60' id='decription' name='decription'>
{{record.decription}}
</textarea>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='decription' name='decription' class='pseudo-widget disabled'>
{{record.decription}}
</span>
{% else %}
<span id='decription' name='decription' class='pseudo-widget not-authorised'>
You are not permitted to view decription of events
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof teamorganisers admin %}
<textarea rows='8' cols='60' id='decription' name='decription'>
{{record.decription}}
</textarea>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='decription' name='decription' class='pseudo-widget disabled'>
{{record.decription}}
</span>
{% else %}
<span id='decription' name='decription' class='pseudo-widget not-authorised'>
You are not permitted to view decription of events
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='cancelled'>
Cancelled
</label>
{% if {{record.cancelled}} %}
{% ifmemberof teamorganisers admin %}
<input id='cancelled' name='cancelled' type='checkbox' value='{{record.cancelled}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='cancelled' name='cancelled' class='pseudo-widget disabled'>
{{record.cancelled}}
</span>
{% else %}
<span id='cancelled' name='cancelled' class='pseudo-widget not-authorised'>
You are not permitted to view cancelled of events
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof teamorganisers admin %}
<input id='cancelled' name='cancelled' type='checkbox' value='{{record.cancelled}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='cancelled' name='cancelled' class='pseudo-widget disabled'>
{{record.cancelled}}
</span>
{% else %}
<span id='cancelled' name='cancelled' class='pseudo-widget not-authorised'>
You are not permitted to view cancelled of events
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
{% ifmemberof teamorganisers admin %}
<p class='widget action-safe'>
<label for='save-button' class='action-safe'>
To save this events record
</label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p>
{% endifmemberof %}
{% ifmemberof teamorganisers admin %}
<p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'>
To delete this events record
</label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p>
{% endifmemberof %}
</form>
</div>
{% endblock %}
{% block extra-tail %}
<script type='text/javascript'>
var simplemde = new SimpleMDE({
autosave: {
enabled: true,
uniqueId: "Smeagol-{{page}}",
delay: 1000,
},
indentWithTabs: true,
insertTexts: {
horizontalRule: ["", "\n\n-----\n\n"],
image: ["![](http://", ")"],
link: ["[", "](http://)"],
table: ["", "\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text | Text | Text |\n\n"],
},
showIcons: ["code"], //, "table"], - sadly, markdown-clj does not support tables
spellChecker: true,
status: ["autosave", "lines", "words", "cursor"]
});
</script>
{% endblock %}

View file

@ -1,302 +0,0 @@
{% extends "base.html" %}
<!-- File form-followupactions-Followupaction.html generated 2018-07-15T19:59:46.668Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% script "js/lib/node_modules/simplemde/dist/simplemde.min.js" %}
{% style "js/lib/node_modules/simplemde/dist/simplemde.min.css" %}
{% script "/js/lib/node_modules/selectize/dist/js/standalone/selectize.min.js" %}
{% style "/js/lib/node_modules/selectize/dist/css/selectize.css" %}
{% endblock %}
{% block content %}
<div id='content' class='edit'>
<form action='{{servlet-context}}/form-followupactions-Followupaction' method='POST'>
{% csrf-field %}
<input id='id' name='id' type='hidden' value='{{record.id}}'/>
<p class='widget'>
<label for='request_id'>
Request_id
</label>
{% if {{record.request_id}} %}
{% ifmemberof admin %}
<select id='request_id' name='request_id'>
{% for option in request_id %}<option value='{{option.id}}' {% ifequal record.request_id option.id%}selected='selected'{% endifequal %}>{{option.elector_id_expanded}} {{option.visit_id_expanded}} {{option.issue_id_expanded}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof issueexperts canvassers analysts issueeditors admin %}
<span id='request_id' name='request_id' class='pseudo-widget disabled'>
{{record.request_id}}
</span>
{% else %}
<span id='request_id' name='request_id' class='pseudo-widget not-authorised'>
You are not permitted to view request_id of followupactions
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<select id='request_id' name='request_id'>
{% for option in request_id %}<option value='{{option.id}}' {% ifequal record.request_id option.id%}selected='selected'{% endifequal %}>{{option.elector_id_expanded}} {{option.visit_id_expanded}} {{option.issue_id_expanded}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof issueexperts canvassers analysts issueeditors admin %}
<span id='request_id' name='request_id' class='pseudo-widget disabled'>
{{record.request_id}}
</span>
{% else %}
<span id='request_id' name='request_id' class='pseudo-widget not-authorised'>
You are not permitted to view request_id of followupactions
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='actor'>
Actor
</label>
{% if {{record.actor}} %}
{% ifmemberof admin %}
<select id='actor' name='actor'>
{% for option in actor %}<option value='{{option.id}}' {% ifequal record.actor option.id%}selected='selected'{% endifequal %}>{{option.username}} {{option.fullname}} {{option.address_id_expanded}} {{option.phone}} {{option.email}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof issueexperts canvassers analysts issueeditors admin %}
<span id='actor' name='actor' class='pseudo-widget disabled'>
{{record.actor}}
</span>
{% else %}
<span id='actor' name='actor' class='pseudo-widget not-authorised'>
You are not permitted to view actor of followupactions
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<select id='actor' name='actor'>
{% for option in actor %}<option value='{{option.id}}' {% ifequal record.actor option.id%}selected='selected'{% endifequal %}>{{option.username}} {{option.fullname}} {{option.address_id_expanded}} {{option.phone}} {{option.email}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof issueexperts canvassers analysts issueeditors admin %}
<span id='actor' name='actor' class='pseudo-widget disabled'>
{{record.actor}}
</span>
{% else %}
<span id='actor' name='actor' class='pseudo-widget not-authorised'>
You are not permitted to view actor of followupactions
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='date'>
Date
</label>
{% if {{record.date}} %}
{% ifmemberof admin %}
<input id='date' name='date' type='string' value='{{record.date}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof issueexperts canvassers analysts issueeditors admin %}
<span id='date' name='date' class='pseudo-widget disabled'>
{{record.date}}
</span>
{% else %}
<span id='date' name='date' class='pseudo-widget not-authorised'>
You are not permitted to view date of followupactions
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<input id='date' name='date' type='string' value='{{record.date}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof issueexperts canvassers analysts issueeditors admin %}
<span id='date' name='date' class='pseudo-widget disabled'>
{{record.date}}
</span>
{% else %}
<span id='date' name='date' class='pseudo-widget not-authorised'>
You are not permitted to view date of followupactions
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='notes'>
Notes
</label>
{% if {{record.notes}} %}
{% ifmemberof admin %}
<textarea rows='8' cols='60' id='notes' name='notes'>
{{record.notes}}
</textarea>
{% else %}
{% ifmemberof issueexperts canvassers analysts issueeditors admin %}
<span id='notes' name='notes' class='pseudo-widget disabled'>
{{record.notes}}
</span>
{% else %}
<span id='notes' name='notes' class='pseudo-widget not-authorised'>
You are not permitted to view notes of followupactions
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<textarea rows='8' cols='60' id='notes' name='notes'>
{{record.notes}}
</textarea>
{% else %}
{% ifmemberof issueexperts canvassers analysts issueeditors admin %}
<span id='notes' name='notes' class='pseudo-widget disabled'>
{{record.notes}}
</span>
{% else %}
<span id='notes' name='notes' class='pseudo-widget not-authorised'>
You are not permitted to view notes of followupactions
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='closed'>
Closed
</label>
{% if {{record.closed}} %}
{% ifmemberof admin %}
<input id='closed' name='closed' type='checkbox' value='{{record.closed}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof issueexperts canvassers analysts issueeditors admin %}
<span id='closed' name='closed' class='pseudo-widget disabled'>
{{record.closed}}
</span>
{% else %}
<span id='closed' name='closed' class='pseudo-widget not-authorised'>
You are not permitted to view closed of followupactions
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<input id='closed' name='closed' type='checkbox' value='{{record.closed}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof issueexperts canvassers analysts issueeditors admin %}
<span id='closed' name='closed' class='pseudo-widget disabled'>
{{record.closed}}
</span>
{% else %}
<span id='closed' name='closed' class='pseudo-widget not-authorised'>
You are not permitted to view closed of followupactions
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
{% ifmemberof admin %}
<p class='widget action-safe'>
<label for='save-button' class='action-safe'>
To save this followupactions record
</label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p>
{% endifmemberof %}
{% ifmemberof admin %}
<p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'>
To delete this followupactions record
</label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p>
{% endifmemberof %}
</form>
</div>
{% endblock %}
{% block extra-tail %}
<script type='text/javascript'>
/**
* selectize one select widget. Substitute the actual id of the widget for `request_id`,
* and the current value for {{record.request_id}}.
*/
$('#request_id').selectize({
valueField: 'id',
labelField: 'name',
searchField: 'name',
hideSelected: false,
create: false,
load: function(query, callback) {
console.log('Desperately seeking ' + query);
if (query === null || !query.length) return callback();
$.ajax({
url: '/json/auto/search-strings-electors?name=' + query,
type: 'GET',
dataType: 'jsonp',
error: function() {
console.log( 'Query ' + query + ' failed.');
callback();
},
success: function(res) {
console.log('Received ' + res + ' records for ' + query);
callback(res);
}
});
}
})[0].selectize.setValue({{record.request_id}}, true);
/**
* selectize one select widget. Substitute the actual id of the widget for `actor`,
* and the current value for {{record.actor}}.
*/
$('#actor').selectize({
valueField: 'id',
labelField: 'name',
searchField: 'name',
hideSelected: false,
create: false,
load: function(query, callback) {
console.log('Desperately seeking ' + query);
if (query === null || !query.length) return callback();
$.ajax({
url: '/json/auto/search-strings-electors?name=' + query,
type: 'GET',
dataType: 'jsonp',
error: function() {
console.log( 'Query ' + query + ' failed.');
callback();
},
success: function(res) {
console.log('Received ' + res + ' records for ' + query);
callback(res);
}
});
}
})[0].selectize.setValue({{record.actor}}, true);
var simplemde = new SimpleMDE({
autosave: {
enabled: true,
uniqueId: "Smeagol-{{page}}",
delay: 1000,
},
indentWithTabs: true,
insertTexts: {
horizontalRule: ["", "\n\n-----\n\n"],
image: ["![](http://", ")"],
link: ["[", "](http://)"],
table: ["", "\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text | Text | Text |\n\n"],
},
showIcons: ["code"], //, "table"], - sadly, markdown-clj does not support tables
spellChecker: true,
status: ["autosave", "lines", "words", "cursor"]
});
</script>
{% endblock %}

View file

@ -1,71 +0,0 @@
{% extends "base.html" %}
<!-- File form-followupmethods-Followupmethod.html generated 2018-07-15T19:59:46.669Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% endblock %}
{% block content %}
<div id='content' class='edit'>
<form action='{{servlet-context}}/form-followupmethods-Followupmethod' method='POST'>
{% csrf-field %}
<p class='widget'>
<label for='id'>
Id
</label>
{% if {{record.id}} %}
{% ifmemberof admin %}
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='32' size='32'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% else %}
<span id='id' name='id' class='pseudo-widget not-authorised'>
You are not permitted to view id of followupmethods
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='32' size='32'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% else %}
<span id='id' name='id' class='pseudo-widget not-authorised'>
You are not permitted to view id of followupmethods
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
{% ifmemberof admin %}
<p class='widget action-safe'>
<label for='save-button' class='action-safe'>
To save this followupmethods record
</label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p>
{% endifmemberof %}
{% ifmemberof admin %}
<p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'>
To delete this followupmethods record
</label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p>
{% endifmemberof %}
</form>
</div>
{% endblock %}
{% block extra-tail %}
<script type='text/javascript'>
</script>
{% endblock %}

View file

@ -1,252 +0,0 @@
{% extends "base.html" %}
<!-- File form-followuprequests-Followuprequest.html generated 2018-07-15T19:59:46.642Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% script "/js/lib/node_modules/selectize/dist/js/standalone/selectize.min.js" %}
{% style "/js/lib/node_modules/selectize/dist/css/selectize.css" %}
{% endblock %}
{% block content %}
<div id='content' class='edit'>
<form action='{{servlet-context}}/form-followuprequests-Followuprequest' method='POST'>
{% csrf-field %}
<input id='id' name='id' type='hidden' value='{{record.id}}'/>
<p class='widget'>
<label for='elector_id'>
Elector_id
</label>
{% if {{record.elector_id}} %}
{% ifmemberof %}
<select id='elector_id' name='elector_id'>
{% for option in elector_id %}<option value='{{option.id}}' {% ifequal record.elector_id option.id%}selected='selected'{% endifequal %}>{{option.name}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='elector_id' name='elector_id' class='pseudo-widget disabled'>
{{record.elector_id}}
</span>
{% else %}
<span id='elector_id' name='elector_id' class='pseudo-widget not-authorised'>
You are not permitted to view elector_id of followuprequests
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof %}
<select id='elector_id' name='elector_id'>
{% for option in elector_id %}<option value='{{option.id}}' {% ifequal record.elector_id option.id%}selected='selected'{% endifequal %}>{{option.name}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='elector_id' name='elector_id' class='pseudo-widget disabled'>
{{record.elector_id}}
</span>
{% else %}
<span id='elector_id' name='elector_id' class='pseudo-widget not-authorised'>
You are not permitted to view elector_id of followuprequests
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='visit_id'>
Visit_id
</label>
{% if {{record.visit_id}} %}
{% ifmemberof %}
<select id='visit_id' name='visit_id'>
{% for option in visit_id %}<option value='{{option.id}}' {% ifequal record.visit_id option.id%}selected='selected'{% endifequal %}>{{option.address_id_expanded}} {{option.date}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='visit_id' name='visit_id' class='pseudo-widget disabled'>
{{record.visit_id}}
</span>
{% else %}
<span id='visit_id' name='visit_id' class='pseudo-widget not-authorised'>
You are not permitted to view visit_id of followuprequests
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof %}
<select id='visit_id' name='visit_id'>
{% for option in visit_id %}<option value='{{option.id}}' {% ifequal record.visit_id option.id%}selected='selected'{% endifequal %}>{{option.address_id_expanded}} {{option.date}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='visit_id' name='visit_id' class='pseudo-widget disabled'>
{{record.visit_id}}
</span>
{% else %}
<span id='visit_id' name='visit_id' class='pseudo-widget not-authorised'>
You are not permitted to view visit_id of followuprequests
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='issue_id'>
Issue_id
</label>
{% if {{record.issue_id}} %}
{% ifmemberof %}
<select id='issue_id' name='issue_id'>
{% for option in issue_id %}<option value='{{option.id}}' {% ifequal record.issue_id option.id%}selected='selected'{% endifequal %}>{{option.id}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='issue_id' name='issue_id' class='pseudo-widget disabled'>
{{record.issue_id}}
</span>
{% else %}
<span id='issue_id' name='issue_id' class='pseudo-widget not-authorised'>
You are not permitted to view issue_id of followuprequests
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof %}
<select id='issue_id' name='issue_id'>
{% for option in issue_id %}<option value='{{option.id}}' {% ifequal record.issue_id option.id%}selected='selected'{% endifequal %}>{{option.id}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='issue_id' name='issue_id' class='pseudo-widget disabled'>
{{record.issue_id}}
</span>
{% else %}
<span id='issue_id' name='issue_id' class='pseudo-widget not-authorised'>
You are not permitted to view issue_id of followuprequests
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='method_id'>
Method_id
</label>
{% if {{record.method_id}} %}
{% ifmemberof %}
<select id='method_id' name='method_id'>
{% for option in method_id %}<option value='{{option.id}}' {% ifequal record.method_id option.id%}selected='selected'{% endifequal %}>{{option.id}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='method_id' name='method_id' class='pseudo-widget disabled'>
{{record.method_id}}
</span>
{% else %}
<span id='method_id' name='method_id' class='pseudo-widget not-authorised'>
You are not permitted to view method_id of followuprequests
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof %}
<select id='method_id' name='method_id'>
{% for option in method_id %}<option value='{{option.id}}' {% ifequal record.method_id option.id%}selected='selected'{% endifequal %}>{{option.id}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='method_id' name='method_id' class='pseudo-widget disabled'>
{{record.method_id}}
</span>
{% else %}
<span id='method_id' name='method_id' class='pseudo-widget not-authorised'>
You are not permitted to view method_id of followuprequests
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
{% ifmemberof %}
<p class='widget action-safe'>
<label for='save-button' class='action-safe'>
To save this followuprequests record
</label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p>
{% endifmemberof %}
{% ifmemberof %}
<p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'>
To delete this followuprequests record
</label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p>
{% endifmemberof %}
</form>
</div>
{% endblock %}
{% block extra-tail %}
<script type='text/javascript'>
/**
* selectize one select widget. Substitute the actual id of the widget for `elector_id`,
* and the current value for {{record.elector_id}}.
*/
$('#elector_id').selectize({
valueField: 'id',
labelField: 'name',
searchField: 'name',
hideSelected: false,
create: false,
load: function(query, callback) {
console.log('Desperately seeking ' + query);
if (query === null || !query.length) return callback();
$.ajax({
url: '/json/auto/search-strings-electors?name=' + query,
type: 'GET',
dataType: 'jsonp',
error: function() {
console.log( 'Query ' + query + ' failed.');
callback();
},
success: function(res) {
console.log('Received ' + res + ' records for ' + query);
callback(res);
}
});
}
})[0].selectize.setValue({{record.elector_id}}, true);
/**
* selectize one select widget. Substitute the actual id of the widget for `visit_id`,
* and the current value for {{record.visit_id}}.
*/
$('#visit_id').selectize({
valueField: 'id',
labelField: 'name',
searchField: 'name',
hideSelected: false,
create: false,
load: function(query, callback) {
console.log('Desperately seeking ' + query);
if (query === null || !query.length) return callback();
$.ajax({
url: '/json/auto/search-strings-electors?name=' + query,
type: 'GET',
dataType: 'jsonp',
error: function() {
console.log( 'Query ' + query + ' failed.');
callback();
},
success: function(res) {
console.log('Received ' + res + ' records for ' + query);
callback(res);
}
});
}
})[0].selectize.setValue({{record.visit_id}}, true);
</script>
{% endblock %}

View file

@ -1,71 +0,0 @@
{% extends "base.html" %}
<!-- File form-genders-Gender.html generated 2018-07-15T19:59:46.638Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% endblock %}
{% block content %}
<div id='content' class='edit'>
<form action='{{servlet-context}}/form-genders-Gender' method='POST'>
{% csrf-field %}
<p class='widget'>
<label for='id'>
Id
</label>
{% if {{record.id}} %}
{% ifmemberof admin %}
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='32' size='32'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% else %}
<span id='id' name='id' class='pseudo-widget not-authorised'>
You are not permitted to view id of genders
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='32' size='32'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% else %}
<span id='id' name='id' class='pseudo-widget not-authorised'>
You are not permitted to view id of genders
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
{% ifmemberof admin %}
<p class='widget action-safe'>
<label for='save-button' class='action-safe'>
To save this genders record
</label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p>
{% endifmemberof %}
{% ifmemberof admin %}
<p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'>
To delete this genders record
</label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p>
{% endifmemberof %}
</form>
</div>
{% endblock %}
{% block extra-tail %}
<script type='text/javascript'>
</script>
{% endblock %}

View file

@ -1,247 +0,0 @@
{% extends "base.html" %}
<!-- File form-intentions-Intention.html generated 2018-07-15T19:59:46.664Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% script "/js/lib/node_modules/selectize/dist/js/standalone/selectize.min.js" %}
{% style "/js/lib/node_modules/selectize/dist/css/selectize.css" %}
{% endblock %}
{% block content %}
<div id='content' class='edit'>
<form action='{{servlet-context}}/form-intentions-Intention' method='POST'>
{% csrf-field %}
<p class='widget'>
<label for='visit_id'>
Visit_id
</label>
{% if {{record.visit_id}} %}
{% ifmemberof %}
<select id='visit_id' name='visit_id'>
{% for option in visit_id %}<option value='{{option.id}}' {% ifequal record.visit_id option.id%}selected='selected'{% endifequal %}>{{option.address_id_expanded}} {{option.date}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers analysts admin %}
<span id='visit_id' name='visit_id' class='pseudo-widget disabled'>
{{record.visit_id}}
</span>
{% else %}
<span id='visit_id' name='visit_id' class='pseudo-widget not-authorised'>
You are not permitted to view visit_id of intentions
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof %}
<select id='visit_id' name='visit_id'>
{% for option in visit_id %}<option value='{{option.id}}' {% ifequal record.visit_id option.id%}selected='selected'{% endifequal %}>{{option.address_id_expanded}} {{option.date}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers analysts admin %}
<span id='visit_id' name='visit_id' class='pseudo-widget disabled'>
{{record.visit_id}}
</span>
{% else %}
<span id='visit_id' name='visit_id' class='pseudo-widget not-authorised'>
You are not permitted to view visit_id of intentions
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='elector_id'>
Elector_id
</label>
{% if {{record.elector_id}} %}
{% ifmemberof %}
<select id='elector_id' name='elector_id'>
{% for option in elector_id %}<option value='{{option.id}}' {% ifequal record.elector_id option.id%}selected='selected'{% endifequal %}>{{option.name}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers analysts admin %}
<span id='elector_id' name='elector_id' class='pseudo-widget disabled'>
{{record.elector_id}}
</span>
{% else %}
<span id='elector_id' name='elector_id' class='pseudo-widget not-authorised'>
You are not permitted to view elector_id of intentions
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof %}
<select id='elector_id' name='elector_id'>
{% for option in elector_id %}<option value='{{option.id}}' {% ifequal record.elector_id option.id%}selected='selected'{% endifequal %}>{{option.name}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers analysts admin %}
<span id='elector_id' name='elector_id' class='pseudo-widget disabled'>
{{record.elector_id}}
</span>
{% else %}
<span id='elector_id' name='elector_id' class='pseudo-widget not-authorised'>
You are not permitted to view elector_id of intentions
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='option_id'>
Option_id
</label>
{% if {{record.option_id}} %}
{% ifmemberof %}
<select id='option_id' name='option_id'>
{% for option in option_id %}<option value='{{option.id}}' {% ifequal record.option_id option.id%}selected='selected'{% endifequal %}>{{option.id}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers analysts admin %}
<span id='option_id' name='option_id' class='pseudo-widget disabled'>
{{record.option_id}}
</span>
{% else %}
<span id='option_id' name='option_id' class='pseudo-widget not-authorised'>
You are not permitted to view option_id of intentions
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof %}
<select id='option_id' name='option_id'>
{% for option in option_id %}<option value='{{option.id}}' {% ifequal record.option_id option.id%}selected='selected'{% endifequal %}>{{option.id}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers analysts admin %}
<span id='option_id' name='option_id' class='pseudo-widget disabled'>
{{record.option_id}}
</span>
{% else %}
<span id='option_id' name='option_id' class='pseudo-widget not-authorised'>
You are not permitted to view option_id of intentions
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='locality'>
Locality
</label>
{% if {{record.locality}} %}
{% ifmemberof %}
<input id='locality' name='locality' type='number' value='{{record.locality}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers analysts admin %}
<span id='locality' name='locality' class='pseudo-widget disabled'>
{{record.locality}}
</span>
{% else %}
<span id='locality' name='locality' class='pseudo-widget not-authorised'>
You are not permitted to view locality of intentions
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof %}
<input id='locality' name='locality' type='number' value='{{record.locality}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers analysts admin %}
<span id='locality' name='locality' class='pseudo-widget disabled'>
{{record.locality}}
</span>
{% else %}
<span id='locality' name='locality' class='pseudo-widget not-authorised'>
You are not permitted to view locality of intentions
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
{% ifmemberof %}
<p class='widget action-safe'>
<label for='save-button' class='action-safe'>
To save this intentions record
</label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p>
{% endifmemberof %}
{% ifmemberof %}
<p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'>
To delete this intentions record
</label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p>
{% endifmemberof %}
</form>
</div>
{% endblock %}
{% block extra-tail %}
<script type='text/javascript'>
/**
* selectize one select widget. Substitute the actual id of the widget for `visit_id`,
* and the current value for {{record.visit_id}}.
*/
$('#visit_id').selectize({
valueField: 'id',
labelField: 'name',
searchField: 'name',
hideSelected: false,
create: false,
load: function(query, callback) {
console.log('Desperately seeking ' + query);
if (query === null || !query.length) return callback();
$.ajax({
url: '/json/auto/search-strings-electors?name=' + query,
type: 'GET',
dataType: 'jsonp',
error: function() {
console.log( 'Query ' + query + ' failed.');
callback();
},
success: function(res) {
console.log('Received ' + res + ' records for ' + query);
callback(res);
}
});
}
})[0].selectize.setValue({{record.visit_id}}, true);
/**
* selectize one select widget. Substitute the actual id of the widget for `elector_id`,
* and the current value for {{record.elector_id}}.
*/
$('#elector_id').selectize({
valueField: 'id',
labelField: 'name',
searchField: 'name',
hideSelected: false,
create: false,
load: function(query, callback) {
console.log('Desperately seeking ' + query);
if (query === null || !query.length) return callback();
$.ajax({
url: '/json/auto/search-strings-electors?name=' + query,
type: 'GET',
dataType: 'jsonp',
error: function() {
console.log( 'Query ' + query + ' failed.');
callback();
},
success: function(res) {
console.log('Received ' + res + ' records for ' + query);
callback(res);
}
});
}
})[0].selectize.setValue({{record.elector_id}}, true);
</script>
{% endblock %}

View file

@ -1,199 +0,0 @@
{% extends "base.html" %}
<!-- File form-issues-Issue.html generated 2018-07-15T19:59:46.646Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% script "js/lib/node_modules/simplemde/dist/simplemde.min.js" %}
{% style "js/lib/node_modules/simplemde/dist/simplemde.min.css" %}
{% script "/js/lib/node_modules/selectize/dist/js/standalone/selectize.min.js" %}
{% style "/js/lib/node_modules/selectize/dist/css/selectize.css" %}
{% endblock %}
{% block content %}
<div id='content' class='edit'>
<form action='{{servlet-context}}/form-issues-Issue' method='POST'>
{% csrf-field %}
<p class='widget'>
<label for='id'>
Id
</label>
{% if {{record.id}} %}
{% ifmemberof issueeditors admin %}
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='32' size='32'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% else %}
<span id='id' name='id' class='pseudo-widget not-authorised'>
You are not permitted to view id of issues
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof issueeditors admin %}
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='32' size='32'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% else %}
<span id='id' name='id' class='pseudo-widget not-authorised'>
You are not permitted to view id of issues
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='url'>
Url
</label>
{% if {{record.url}} %}
{% ifmemberof issueeditors admin %}
<input id='url' name='url' type='string' value='{{record.url}}' maxlength='256' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='url' name='url' class='pseudo-widget disabled'>
{{record.url}}
</span>
{% else %}
<span id='url' name='url' class='pseudo-widget not-authorised'>
You are not permitted to view url of issues
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof issueeditors admin %}
<input id='url' name='url' type='string' value='{{record.url}}' maxlength='256' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='url' name='url' class='pseudo-widget disabled'>
{{record.url}}
</span>
{% else %}
<span id='url' name='url' class='pseudo-widget not-authorised'>
You are not permitted to view url of issues
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='current'>
Current
</label>
{% if {{record.current}} %}
{% ifmemberof issueeditors admin %}
<input id='current' name='current' type='checkbox' value='{{record.current}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='current' name='current' class='pseudo-widget disabled'>
{{record.current}}
</span>
{% else %}
<span id='current' name='current' class='pseudo-widget not-authorised'>
You are not permitted to view current of issues
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof issueeditors admin %}
<input id='current' name='current' type='checkbox' value='{{record.current}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='current' name='current' class='pseudo-widget disabled'>
{{record.current}}
</span>
{% else %}
<span id='current' name='current' class='pseudo-widget not-authorised'>
You are not permitted to view current of issues
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='brief'>
Brief
</label>
{% if {{record.brief}} %}
{% ifmemberof issueeditors admin %}
<textarea rows='8' cols='60' id='brief' name='brief'>
{{record.brief}}
</textarea>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='brief' name='brief' class='pseudo-widget disabled'>
{{record.brief}}
</span>
{% else %}
<span id='brief' name='brief' class='pseudo-widget not-authorised'>
You are not permitted to view brief of issues
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof issueeditors admin %}
<textarea rows='8' cols='60' id='brief' name='brief'>
{{record.brief}}
</textarea>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='brief' name='brief' class='pseudo-widget disabled'>
{{record.brief}}
</span>
{% else %}
<span id='brief' name='brief' class='pseudo-widget not-authorised'>
You are not permitted to view brief of issues
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
{% ifmemberof issueeditors admin %}
<p class='widget action-safe'>
<label for='save-button' class='action-safe'>
To save this issues record
</label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p>
{% endifmemberof %}
{% ifmemberof issueeditors admin %}
<p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'>
To delete this issues record
</label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p>
{% endifmemberof %}
</form>
</div>
{% endblock %}
{% block extra-tail %}
<script type='text/javascript'>
var simplemde = new SimpleMDE({
autosave: {
enabled: true,
uniqueId: "Smeagol-{{page}}",
delay: 1000,
},
indentWithTabs: true,
insertTexts: {
horizontalRule: ["", "\n\n-----\n\n"],
image: ["![](http://", ")"],
link: ["[", "](http://)"],
table: ["", "\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text | Text | Text |\n\n"],
},
showIcons: ["code"], //, "table"], - sadly, markdown-clj does not support tables
spellChecker: true,
status: ["autosave", "lines", "words", "cursor"]
});
</script>
{% endblock %}

View file

@ -1,71 +0,0 @@
{% extends "base.html" %}
<!-- File form-options-Option.html generated 2018-07-15T19:59:46.664Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% endblock %}
{% block content %}
<div id='content' class='edit'>
<form action='{{servlet-context}}/form-options-Option' method='POST'>
{% csrf-field %}
<p class='widget'>
<label for='id'>
Id
</label>
{% if {{record.id}} %}
{% ifmemberof admin %}
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='32' size='32'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% else %}
<span id='id' name='id' class='pseudo-widget not-authorised'>
You are not permitted to view id of options
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='32' size='32'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% else %}
<span id='id' name='id' class='pseudo-widget not-authorised'>
You are not permitted to view id of options
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
{% ifmemberof admin %}
<p class='widget action-safe'>
<label for='save-button' class='action-safe'>
To save this options record
</label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p>
{% endifmemberof %}
{% ifmemberof admin %}
<p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'>
To delete this options record
</label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p>
{% endifmemberof %}
</form>
</div>
{% endblock %}
{% block extra-tail %}
<script type='text/javascript'>
</script>
{% endblock %}

View file

@ -1,112 +0,0 @@
{% extends "base.html" %}
<!-- File form-roles-Role.html generated 2018-07-15T19:59:46.647Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% script "/js/lib/node_modules/selectize/dist/js/standalone/selectize.min.js" %}
{% style "/js/lib/node_modules/selectize/dist/css/selectize.css" %}
{% endblock %}
{% block content %}
<div id='content' class='edit'>
<form action='{{servlet-context}}/form-roles-Role' method='POST'>
{% csrf-field %}
<input id='id' name='id' type='hidden' value='{{record.id}}'/>
<p class='widget'>
<label for='name'>
Name
</label>
{% if {{record.name}} %}
{% ifmemberof admin %}
<input id='name' name='name' type='string' value='{{record.name}}' maxlength='64' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='name' name='name' class='pseudo-widget disabled'>
{{record.name}}
</span>
{% else %}
<span id='name' name='name' class='pseudo-widget not-authorised'>
You are not permitted to view name of roles
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<input id='name' name='name' type='string' value='{{record.name}}' maxlength='64' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='name' name='name' class='pseudo-widget disabled'>
{{record.name}}
</span>
{% else %}
<span id='name' name='name' class='pseudo-widget not-authorised'>
You are not permitted to view name of roles
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='members'>
Members
</label>
{% if {{record.members}} %}
{% ifmemberof admin %}
<select id='members' name='members' multiple='multiple'>
{% for option in members %}<option value='{{option.id}}' {% ifequal record.members option.id%}selected='selected'{% endifequal %}>{{option.username}} {{option.fullname}} {{option.address_id_expanded}} {{option.phone}} {{option.email}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='members' name='members' class='pseudo-widget disabled'>
{{record.members}}
</span>
{% else %}
<span id='members' name='members' class='pseudo-widget not-authorised'>
You are not permitted to view members of roles
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<select id='members' name='members' multiple='multiple'>
{% for option in members %}<option value='{{option.id}}' {% ifequal record.members option.id%}selected='selected'{% endifequal %}>{{option.username}} {{option.fullname}} {{option.address_id_expanded}} {{option.phone}} {{option.email}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='members' name='members' class='pseudo-widget disabled'>
{{record.members}}
</span>
{% else %}
<span id='members' name='members' class='pseudo-widget not-authorised'>
You are not permitted to view members of roles
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
{% ifmemberof admin %}
<p class='widget action-safe'>
<label for='save-button' class='action-safe'>
To save this roles record
</label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p>
{% endifmemberof %}
{% ifmemberof admin %}
<p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'>
To delete this roles record
</label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p>
{% endifmemberof %}
</form>
</div>
{% endblock %}
{% block extra-tail %}
<script type='text/javascript'>
</script>
{% endblock %}

View file

@ -1,384 +0,0 @@
{% extends "base.html" %}
<!-- File form-teams-Team.html generated 2018-07-15T19:59:46.652Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% script "/js/lib/node_modules/selectize/dist/js/standalone/selectize.min.js" %}
{% style "/js/lib/node_modules/selectize/dist/css/selectize.css" %}
{% endblock %}
{% block content %}
<div id='content' class='edit'>
<form action='{{servlet-context}}/form-teams-Team' method='POST'>
{% csrf-field %}
<input id='id' name='id' type='hidden' value='{{record.id}}'/>
<p class='widget'>
<label for='name'>
Name
</label>
{% if {{record.name}} %}
{% ifmemberof teamorganisers admin teamorganisers admin %}
<input id='name' name='name' type='string' value='{{record.name}}' maxlength='64' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
<span id='name' name='name' class='pseudo-widget disabled'>
{{record.name}}
</span>
{% else %}
<span id='name' name='name' class='pseudo-widget not-authorised'>
You are not permitted to view name of teams
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof teamorganisers admin teamorganisers admin %}
<input id='name' name='name' type='string' value='{{record.name}}' maxlength='64' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
<span id='name' name='name' class='pseudo-widget disabled'>
{{record.name}}
</span>
{% else %}
<span id='name' name='name' class='pseudo-widget not-authorised'>
You are not permitted to view name of teams
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='district_id'>
District_id
</label>
{% if {{record.district_id}} %}
{% ifmemberof teamorganisers admin teamorganisers admin %}
<select id='district_id' name='district_id'>
{% for option in district_id %}<option value='{{option.id}}' {% ifequal record.district_id option.id%}selected='selected'{% endifequal %}>{{option.name}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
<span id='district_id' name='district_id' class='pseudo-widget disabled'>
{{record.district_id}}
</span>
{% else %}
<span id='district_id' name='district_id' class='pseudo-widget not-authorised'>
You are not permitted to view district_id of teams
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof teamorganisers admin teamorganisers admin %}
<select id='district_id' name='district_id'>
{% for option in district_id %}<option value='{{option.id}}' {% ifequal record.district_id option.id%}selected='selected'{% endifequal %}>{{option.name}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
<span id='district_id' name='district_id' class='pseudo-widget disabled'>
{{record.district_id}}
</span>
{% else %}
<span id='district_id' name='district_id' class='pseudo-widget not-authorised'>
You are not permitted to view district_id of teams
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='latitude'>
Latitude
</label>
{% if {{record.latitude}} %}
{% ifmemberof teamorganisers admin teamorganisers admin %}
<input id='latitude' name='latitude' type='number' value='{{record.latitude}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
<span id='latitude' name='latitude' class='pseudo-widget disabled'>
{{record.latitude}}
</span>
{% else %}
<span id='latitude' name='latitude' class='pseudo-widget not-authorised'>
You are not permitted to view latitude of teams
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof teamorganisers admin teamorganisers admin %}
<input id='latitude' name='latitude' type='number' value='{{record.latitude}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
<span id='latitude' name='latitude' class='pseudo-widget disabled'>
{{record.latitude}}
</span>
{% else %}
<span id='latitude' name='latitude' class='pseudo-widget not-authorised'>
You are not permitted to view latitude of teams
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='members'>
Members
</label>
{% if {{record.members}} %}
{% ifmemberof teamorganisers admin teamorganisers admin %}
<select id='members' name='members' multiple='multiple'>
{% for option in members %}<option value='{{option.id}}' {% ifequal record.members option.id%}selected='selected'{% endifequal %}>{{option.username}} {{option.fullname}} {{option.address_id_expanded}} {{option.phone}} {{option.email}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
<span id='members' name='members' class='pseudo-widget disabled'>
{{record.members}}
</span>
{% else %}
<span id='members' name='members' class='pseudo-widget not-authorised'>
You are not permitted to view members of teams
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof teamorganisers admin teamorganisers admin %}
<select id='members' name='members' multiple='multiple'>
{% for option in members %}<option value='{{option.id}}' {% ifequal record.members option.id%}selected='selected'{% endifequal %}>{{option.username}} {{option.fullname}} {{option.address_id_expanded}} {{option.phone}} {{option.email}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
<span id='members' name='members' class='pseudo-widget disabled'>
{{record.members}}
</span>
{% else %}
<span id='members' name='members' class='pseudo-widget not-authorised'>
You are not permitted to view members of teams
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='organisers'>
Organisers
</label>
{% if {{record.organisers}} %}
{% ifmemberof teamorganisers admin teamorganisers admin %}
<select id='organisers' name='organisers' multiple='multiple'>
{% for option in organisers %}<option value='{{option.id}}' {% ifequal record.organisers option.id%}selected='selected'{% endifequal %}>{{option.username}} {{option.fullname}} {{option.address_id_expanded}} {{option.phone}} {{option.email}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
<span id='organisers' name='organisers' class='pseudo-widget disabled'>
{{record.organisers}}
</span>
{% else %}
<span id='organisers' name='organisers' class='pseudo-widget not-authorised'>
You are not permitted to view organisers of teams
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof teamorganisers admin teamorganisers admin %}
<select id='organisers' name='organisers' multiple='multiple'>
{% for option in organisers %}<option value='{{option.id}}' {% ifequal record.organisers option.id%}selected='selected'{% endifequal %}>{{option.username}} {{option.fullname}} {{option.address_id_expanded}} {{option.phone}} {{option.email}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
<span id='organisers' name='organisers' class='pseudo-widget disabled'>
{{record.organisers}}
</span>
{% else %}
<span id='organisers' name='organisers' class='pseudo-widget not-authorised'>
You are not permitted to view organisers of teams
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='longitude'>
Longitude
</label>
{% if {{record.longitude}} %}
{% ifmemberof teamorganisers admin teamorganisers admin %}
<input id='longitude' name='longitude' type='number' value='{{record.longitude}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
<span id='longitude' name='longitude' class='pseudo-widget disabled'>
{{record.longitude}}
</span>
{% else %}
<span id='longitude' name='longitude' class='pseudo-widget not-authorised'>
You are not permitted to view longitude of teams
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof teamorganisers admin teamorganisers admin %}
<input id='longitude' name='longitude' type='number' value='{{record.longitude}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
<span id='longitude' name='longitude' class='pseudo-widget disabled'>
{{record.longitude}}
</span>
{% else %}
<span id='longitude' name='longitude' class='pseudo-widget not-authorised'>
You are not permitted to view longitude of teams
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
{% ifmemberof teamorganisers admin teamorganisers admin %}
<p class='widget action-safe'>
<label for='save-button' class='action-safe'>
To save this teams record
</label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p>
{% endifmemberof %}
{% ifmemberof teamorganisers admin teamorganisers admin %}
<p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'>
To delete this teams record
</label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p>
{% endifmemberof %}
</form>
<div class='auxlist'>
<h2>
Organisers
</h2>
<table>
<thead>
<tr>
<th>
Id
</th>
<th>
Fullname
</th>
<th>
Email
</th>
<th>
Phone
</th>
<th>
&nbsp;
</th>
</tr>
</thead>
<tbody>
{% for record in organisers %}
<tr>
<td>
{{ record.id }}
</td>
<td>
{{ record.fullname }}
</td>
<td>
{{ record.email }}
</td>
<td>
{{ record.phone }}
</td>
<td>
<a href='{{servlet-context}}/form-canvassers-Canvasser?id={{ record.id }}'>
View
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class='auxlist'>
<h2>
Members
</h2>
<table>
<thead>
<tr>
<th>
Id
</th>
<th>
Fullname
</th>
<th>
Email
</th>
<th>
Phone
</th>
<th>
&nbsp;
</th>
</tr>
</thead>
<tbody>
{% for record in members %}
<tr>
<td>
{{ record.id }}
</td>
<td>
{{ record.fullname }}
</td>
<td>
{{ record.email }}
</td>
<td>
{{ record.phone }}
</td>
<td>
<a href='{{servlet-context}}/form-canvassers-Canvasser?id={{ record.id }}'>
View
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endblock %}
{% block extra-tail %}
<script type='text/javascript'>
/**
* selectize one select widget. Substitute the actual id of the widget for `district_id`,
* and the current value for {{record.district_id}}.
*/
$('#district_id').selectize({
valueField: 'id',
labelField: 'name',
searchField: 'name',
hideSelected: false,
create: false,
load: function(query, callback) {
console.log('Desperately seeking ' + query);
if (query === null || !query.length) return callback();
$.ajax({
url: '/json/auto/search-strings-electors?name=' + query,
type: 'GET',
dataType: 'jsonp',
error: function() {
console.log( 'Query ' + query + ' failed.');
callback();
},
success: function(res) {
console.log('Received ' + res + ' records for ' + query);
callback(res);
}
});
}
})[0].selectize.setValue({{record.district_id}}, true);
</script>
{% endblock %}

View file

@ -1,243 +0,0 @@
{% extends "base.html" %}
<!-- File form-visits-Visit.html generated 2018-07-15T19:59:46.650Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% script "/js/lib/node_modules/selectize/dist/js/standalone/selectize.min.js" %}
{% style "/js/lib/node_modules/selectize/dist/css/selectize.css" %}
{% endblock %}
{% block content %}
<div id='content' class='edit'>
<form action='{{servlet-context}}/form-visits-Visit' method='POST'>
{% csrf-field %}
<p class='widget'>
<label for='id'>
Id
</label>
{% if {{record.id}} %}
{% ifmemberof admin %}
<input id='id' name='id' type='number' value='{{record.id}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% else %}
<span id='id' name='id' class='pseudo-widget not-authorised'>
You are not permitted to view id of visits
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<input id='id' name='id' type='number' value='{{record.id}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
{% else %}
<span id='id' name='id' class='pseudo-widget not-authorised'>
You are not permitted to view id of visits
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='address_id'>
Address_id
</label>
{% if {{record.address_id}} %}
{% ifmemberof admin %}
<select id='address_id' name='address_id'>
{% for option in address_id %}<option value='{{option.id}}' {% ifequal record.address_id option.id%}selected='selected'{% endifequal %}>{{option.address}} {{option.postcode}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers admin %}
<span id='address_id' name='address_id' class='pseudo-widget disabled'>
{{record.address_id}}
</span>
{% else %}
<span id='address_id' name='address_id' class='pseudo-widget not-authorised'>
You are not permitted to view address_id of visits
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<select id='address_id' name='address_id'>
{% for option in address_id %}<option value='{{option.id}}' {% ifequal record.address_id option.id%}selected='selected'{% endifequal %}>{{option.address}} {{option.postcode}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers admin %}
<span id='address_id' name='address_id' class='pseudo-widget disabled'>
{{record.address_id}}
</span>
{% else %}
<span id='address_id' name='address_id' class='pseudo-widget not-authorised'>
You are not permitted to view address_id of visits
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='canvasser_id'>
Canvasser_id
</label>
{% if {{record.canvasser_id}} %}
{% ifmemberof admin %}
<select id='canvasser_id' name='canvasser_id'>
{% for option in canvasser_id %}<option value='{{option.id}}' {% ifequal record.canvasser_id option.id%}selected='selected'{% endifequal %}>{{option.username}} {{option.fullname}} {{option.address_id_expanded}} {{option.phone}} {{option.email}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers admin %}
<span id='canvasser_id' name='canvasser_id' class='pseudo-widget disabled'>
{{record.canvasser_id}}
</span>
{% else %}
<span id='canvasser_id' name='canvasser_id' class='pseudo-widget not-authorised'>
You are not permitted to view canvasser_id of visits
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<select id='canvasser_id' name='canvasser_id'>
{% for option in canvasser_id %}<option value='{{option.id}}' {% ifequal record.canvasser_id option.id%}selected='selected'{% endifequal %}>{{option.username}} {{option.fullname}} {{option.address_id_expanded}} {{option.phone}} {{option.email}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers admin %}
<span id='canvasser_id' name='canvasser_id' class='pseudo-widget disabled'>
{{record.canvasser_id}}
</span>
{% else %}
<span id='canvasser_id' name='canvasser_id' class='pseudo-widget not-authorised'>
You are not permitted to view canvasser_id of visits
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='date'>
Date
</label>
{% if {{record.date}} %}
{% ifmemberof admin %}
<input id='date' name='date' type='string' value='{{record.date}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers admin %}
<span id='date' name='date' class='pseudo-widget disabled'>
{{record.date}}
</span>
{% else %}
<span id='date' name='date' class='pseudo-widget not-authorised'>
You are not permitted to view date of visits
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof admin %}
<input id='date' name='date' type='string' value='{{record.date}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers admin %}
<span id='date' name='date' class='pseudo-widget disabled'>
{{record.date}}
</span>
{% else %}
<span id='date' name='date' class='pseudo-widget not-authorised'>
You are not permitted to view date of visits
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
{% ifmemberof admin %}
<p class='widget action-safe'>
<label for='save-button' class='action-safe'>
To save this visits record
</label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p>
{% endifmemberof %}
{% ifmemberof admin %}
<p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'>
To delete this visits record
</label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p>
{% endifmemberof %}
</form>
</div>
{% endblock %}
{% block extra-tail %}
<script type='text/javascript'>
/**
* selectize one select widget. Substitute the actual id of the widget for `address_id`,
* and the current value for {{record.address_id}}.
*/
$('#address_id').selectize({
valueField: 'id',
labelField: 'name',
searchField: 'name',
hideSelected: false,
create: false,
load: function(query, callback) {
console.log('Desperately seeking ' + query);
if (query === null || !query.length) return callback();
$.ajax({
url: '/json/auto/search-strings-electors?name=' + query,
type: 'GET',
dataType: 'jsonp',
error: function() {
console.log( 'Query ' + query + ' failed.');
callback();
},
success: function(res) {
console.log('Received ' + res + ' records for ' + query);
callback(res);
}
});
}
})[0].selectize.setValue({{record.address_id}}, true);
/**
* selectize one select widget. Substitute the actual id of the widget for `canvasser_id`,
* and the current value for {{record.canvasser_id}}.
*/
$('#canvasser_id').selectize({
valueField: 'id',
labelField: 'name',
searchField: 'name',
hideSelected: false,
create: false,
load: function(query, callback) {
console.log('Desperately seeking ' + query);
if (query === null || !query.length) return callback();
$.ajax({
url: '/json/auto/search-strings-electors?name=' + query,
type: 'GET',
dataType: 'jsonp',
error: function() {
console.log( 'Query ' + query + ' failed.');
callback();
},
success: function(res) {
console.log('Received ' + res + ' records for ' + query);
callback(res);
}
});
}
})[0].selectize.setValue({{record.canvasser_id}}, true);
</script>
{% endblock %}

View file

@ -1,158 +0,0 @@
{% extends "base.html" %}
<!-- File list-addresses-Addresses.html generated 2018-07-15T19:59:46.657Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block back-links %}
<div>
<div class='back-link-container'>
<a id='prev-selector' class='back-link'>
Previous
</a>
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof admin %}
<div class='big-link-container'>
<a href='{{servlet-context}}/form-addresses-Address' class='big-link'>
Add a new Address
</a>
</div>
{% endifmemberof %}
</div>
{% endblock %}
{% block content %}
<form id='list-addresses-Addresses' class='list' action='{{servlet-context}}/list-addresses-Addresses' method='POST'>
{% csrf-field %}
<input id='offset' name='offset' type='text' value='{{params.offset|default:0}}'/>
<input id='limit' name='limit' type='text' value='{{params.limit|default:50}}'/>
<table caption='addresses'>
<thead>
<tr>
<th>
Id
</th>
<th>
Address
</th>
<th>
Postcode
</th>
<th>
Phone
</th>
<th>
District_id
</th>
<th>
Latitude
</th>
<th>
Longitude
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
<input id='id' type='text' name='id' value='{{ params.id }}'/>
</th>
<th>
<input id='address' type='text' name='address' value='{{ params.address }}'/>
</th>
<th>
<input id='postcode' type='text' name='postcode' value='{{ params.postcode }}'/>
</th>
<th>
<input id='phone' type='text' name='phone' value='{{ params.phone }}'/>
</th>
<th>
<input id='district_id' type='text' name='district_id' value='{{ params.district_id }}'/>
</th>
<th>
<input id='latitude' type='number' name='latitude' value='{{ params.latitude }}'/>
</th>
<th>
<input id='longitude' type='number' name='longitude' value='{{ params.longitude }}'/>
</th>
<th>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
<tbody>
{% for record in records %}
<tr>
<td>
{{ record.id }}
</td>
<td>
{{ record.address }}
</td>
<td>
{{ record.postcode }}
</td>
<td>
{{ record.phone }}
</td>
<td>
<a href='{{servlet-context}}/form-districts-District?id={{ record.district_id }}'>
{{ record.district_id_expanded }}
</a>
</td>
<td>
{{ record.latitude }}
</td>
<td>
{{ record.longitude }}
</td>
<td>
<a href='{{servlet-context}}/form-addresses-Address?id={{ record.id }}'>
View
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</form>
{% endblock %}
{% block extra-script %}
var form = document.getElementById('list-addresses-Addresses');
var ow = document.getElementById('offset');
var lw = document.getElementById('limit');
form.addEventListener('submit', function() {
ow.value='0';
});
var prevSelector = document.getElementById('prev-selector');
if (prevSelector != null) {
prevSelector.addEventListener('click', function () {
if (parseInt(ow.value)===0) {
window.location = '{{servlet-context}}/admin';
} else {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
}
});
}
document.getElementById('next-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)+parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endblock %}

View file

@ -1,129 +0,0 @@
{% extends "base.html" %}
<!-- File list-authorities-Authorities.html generated 2018-07-15T19:59:46.641Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block back-links %}
<div>
<div class='back-link-container'>
<a id='prev-selector' class='back-link'>
Previous
</a>
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof admin %}
<div class='big-link-container'>
<a href='{{servlet-context}}/form-authorities-Authority' class='big-link'>
Add a new Authority
</a>
</div>
{% endifmemberof %}
</div>
{% endblock %}
{% block content %}
<form id='list-authorities-Authorities' class='list' action='{{servlet-context}}/list-authorities-Authorities' method='POST'>
{% csrf-field %}
<input id='offset' name='offset' type='text' value='{{params.offset|default:0}}'/>
<input id='limit' name='limit' type='text' value='{{params.limit|default:50}}'/>
<table caption='authorities'>
<thead>
<tr>
<th>
Id
</th>
<th>
Request-token-uri
</th>
<th>
Access-token-uri
</th>
<th>
Authorize-uri
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
<input id='id' type='text' name='id' value='{{ params.id }}'/>
</th>
<th>
<input id='request_token_uri' type='text' name='request_token_uri' value='{{ params.request_token_uri }}'/>
</th>
<th>
<input id='access_token_uri' type='text' name='access_token_uri' value='{{ params.access_token_uri }}'/>
</th>
<th>
<input id='authorize_uri' type='text' name='authorize_uri' value='{{ params.authorize_uri }}'/>
</th>
<th>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
<tbody>
{% for record in records %}
<tr>
<td>
{{ record.id }}
</td>
<td>
{{ record.request_token_uri }}
</td>
<td>
{{ record.access_token_uri }}
</td>
<td>
{{ record.authorize_uri }}
</td>
<td>
<a href='{{servlet-context}}/form-authorities-Authority?id={{ record.id }}'>
View
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</form>
{% endblock %}
{% block extra-script %}
var form = document.getElementById('list-authorities-Authorities');
var ow = document.getElementById('offset');
var lw = document.getElementById('limit');
form.addEventListener('submit', function() {
ow.value='0';
});
var prevSelector = document.getElementById('prev-selector');
if (prevSelector != null) {
prevSelector.addEventListener('click', function () {
if (parseInt(ow.value)===0) {
window.location = '{{servlet-context}}/admin';
} else {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
}
});
}
document.getElementById('next-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)+parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endblock %}

View file

@ -1,151 +0,0 @@
{% extends "base.html" %}
<!-- File list-canvassers-Canvassers.html generated 2018-07-15T19:59:46.666Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block back-links %}
<div>
<div class='back-link-container'>
<a id='prev-selector' class='back-link'>
Previous
</a>
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<div class='big-link-container'>
<a href='{{servlet-context}}/form-canvassers-Canvasser' class='big-link'>
Add a new Canvasser
</a>
</div>
{% endifmemberof %}
</div>
{% endblock %}
{% block content %}
<form id='list-canvassers-Canvassers' class='list' action='{{servlet-context}}/list-canvassers-Canvassers' method='POST'>
{% csrf-field %}
<input id='offset' name='offset' type='text' value='{{params.offset|default:0}}'/>
<input id='limit' name='limit' type='text' value='{{params.limit|default:50}}'/>
<table caption='canvassers'>
<thead>
<tr>
<th>
Id
</th>
<th>
Username
</th>
<th>
Fullname
</th>
<th>
Address_id
</th>
<th>
Authority_id
</th>
<th>
Authorised
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
<input id='id' type='text' name='id' value='{{ params.id }}'/>
</th>
<th>
<input id='username' type='text' name='username' value='{{ params.username }}'/>
</th>
<th>
<input id='fullname' type='text' name='fullname' value='{{ params.fullname }}'/>
</th>
<th>
<input id='address_id' type='text' name='address_id' value='{{ params.address_id }}'/>
</th>
<th>
<input id='authority_id' type='text' name='authority_id' value='{{ params.authority_id }}'/>
</th>
<th>
<input id='authorised' type='text' name='authorised' value='{{ params.authorised }}'/>
</th>
<th>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
<tbody>
{% for record in records %}
<tr>
<td>
{{ record.id }}
</td>
<td>
{{ record.username }}
</td>
<td>
{{ record.fullname }}
</td>
<td>
<a href='{{servlet-context}}/form-addresses-Address?id={{ record.address_id }}'>
{{ record.address_id_expanded }}
</a>
</td>
<td>
<a href='{{servlet-context}}/form-authorities-Authority?id={{ record.authority_id }}'>
{{ record.authority_id_expanded }}
</a>
</td>
<td>
{{ record.authorised }}
</td>
<td>
<a href='{{servlet-context}}/form-canvassers-Canvasser?id={{ record.id }}'>
View
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</form>
{% endblock %}
{% block extra-script %}
var form = document.getElementById('list-canvassers-Canvassers');
var ow = document.getElementById('offset');
var lw = document.getElementById('limit');
form.addEventListener('submit', function() {
ow.value='0';
});
var prevSelector = document.getElementById('prev-selector');
if (prevSelector != null) {
prevSelector.addEventListener('click', function () {
if (parseInt(ow.value)===0) {
window.location = '{{servlet-context}}/admin';
} else {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
}
});
}
document.getElementById('next-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)+parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endblock %}

View file

@ -1,111 +0,0 @@
{% extends "base.html" %}
<!-- File list-districts-Districts.html generated 2018-07-15T19:59:46.662Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block back-links %}
<div>
<div class='back-link-container'>
<a id='prev-selector' class='back-link'>
Previous
</a>
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof admin %}
<div class='big-link-container'>
<a href='{{servlet-context}}/form-districts-District' class='big-link'>
Add a new District
</a>
</div>
{% endifmemberof %}
</div>
{% endblock %}
{% block content %}
<form id='list-districts-Districts' class='list' action='{{servlet-context}}/list-districts-Districts' method='POST'>
{% csrf-field %}
<input id='offset' name='offset' type='text' value='{{params.offset|default:0}}'/>
<input id='limit' name='limit' type='text' value='{{params.limit|default:50}}'/>
<table caption='districts'>
<thead>
<tr>
<th>
Id
</th>
<th>
Name
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
<input id='id' type='text' name='id' value='{{ params.id }}'/>
</th>
<th>
<input id='name' type='text' name='name' value='{{ params.name }}'/>
</th>
<th>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
<tbody>
{% for record in records %}
<tr>
<td>
{{ record.id }}
</td>
<td>
{{ record.name }}
</td>
<td>
<a href='{{servlet-context}}/form-districts-District?id={{ record.id }}'>
View
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</form>
{% endblock %}
{% block extra-script %}
var form = document.getElementById('list-districts-Districts');
var ow = document.getElementById('offset');
var lw = document.getElementById('limit');
form.addEventListener('submit', function() {
ow.value='0';
});
var prevSelector = document.getElementById('prev-selector');
if (prevSelector != null) {
prevSelector.addEventListener('click', function () {
if (parseInt(ow.value)===0) {
window.location = '{{servlet-context}}/admin';
} else {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
}
});
}
document.getElementById('next-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)+parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endblock %}

View file

@ -1,122 +0,0 @@
{% extends "base.html" %}
<!-- File list-dwellings-Dwellings.html generated 2018-07-15T19:59:46.655Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block back-links %}
<div>
<div class='back-link-container'>
<a id='prev-selector' class='back-link'>
Previous
</a>
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof admin %}
<div class='big-link-container'>
<a href='{{servlet-context}}/form-dwellings-Dwelling' class='big-link'>
Add a new Dwelling
</a>
</div>
{% endifmemberof %}
</div>
{% endblock %}
{% block content %}
<form id='list-dwellings-Dwellings' class='list' action='{{servlet-context}}/list-dwellings-Dwellings' method='POST'>
{% csrf-field %}
<input id='offset' name='offset' type='text' value='{{params.offset|default:0}}'/>
<input id='limit' name='limit' type='text' value='{{params.limit|default:50}}'/>
<table caption='dwellings'>
<thead>
<tr>
<th>
Id
</th>
<th>
Address_id
</th>
<th>
Sub-address
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
<input id='id' type='text' name='id' value='{{ params.id }}'/>
</th>
<th>
<input id='address_id' type='text' name='address_id' value='{{ params.address_id }}'/>
</th>
<th>
<input id='sub_address' type='text' name='sub_address' value='{{ params.sub_address }}'/>
</th>
<th>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
<tbody>
{% for record in records %}
<tr>
<td>
{{ record.id }}
</td>
<td>
<a href='{{servlet-context}}/form-addresses-Address?id={{ record.address_id }}'>
{{ record.address_id_expanded }}
</a>
</td>
<td>
{{ record.sub_address }}
</td>
<td>
<a href='{{servlet-context}}/form-dwellings-Dwelling?id={{ record.id }}'>
View
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</form>
{% endblock %}
{% block extra-script %}
var form = document.getElementById('list-dwellings-Dwellings');
var ow = document.getElementById('offset');
var lw = document.getElementById('limit');
form.addEventListener('submit', function() {
ow.value='0';
});
var prevSelector = document.getElementById('prev-selector');
if (prevSelector != null) {
prevSelector.addEventListener('click', function () {
if (parseInt(ow.value)===0) {
window.location = '{{servlet-context}}/admin';
} else {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
}
});
}
document.getElementById('next-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)+parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endblock %}

View file

@ -1,151 +0,0 @@
{% extends "base.html" %}
<!-- File list-electors-Electors.html generated 2018-07-15T19:59:46.645Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block back-links %}
<div>
<div class='back-link-container'>
<a id='prev-selector' class='back-link'>
Previous
</a>
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof admin %}
<div class='big-link-container'>
<a href='{{servlet-context}}/form-electors-Elector' class='big-link'>
Add a new Elector
</a>
</div>
{% endifmemberof %}
</div>
{% endblock %}
{% block content %}
<form id='list-electors-Electors' class='list' action='{{servlet-context}}/list-electors-Electors' method='POST'>
{% csrf-field %}
<input id='offset' name='offset' type='text' value='{{params.offset|default:0}}'/>
<input id='limit' name='limit' type='text' value='{{params.limit|default:50}}'/>
<table caption='electors'>
<thead>
<tr>
<th>
Id
</th>
<th>
Name
</th>
<th>
Dwelling_id
</th>
<th>
Phone
</th>
<th>
Email
</th>
<th>
Gender
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
<input id='id' type='text' name='id' value='{{ params.id }}'/>
</th>
<th>
<input id='name' type='text' name='name' value='{{ params.name }}'/>
</th>
<th>
<input id='dwelling_id' type='text' name='dwelling_id' value='{{ params.dwelling_id }}'/>
</th>
<th>
<input id='phone' type='text' name='phone' value='{{ params.phone }}'/>
</th>
<th>
<input id='email' type='text' name='email' value='{{ params.email }}'/>
</th>
<th>
<input id='gender' type='text' name='gender' value='{{ params.gender }}'/>
</th>
<th>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
<tbody>
{% for record in records %}
<tr>
<td>
{{ record.id }}
</td>
<td>
{{ record.name }}
</td>
<td>
<a href='{{servlet-context}}/form-dwellings-Dwelling?id={{ record.dwelling_id }}'>
{{ record.dwelling_id_expanded }}
</a>
</td>
<td>
{{ record.phone }}
</td>
<td>
{{ record.email }}
</td>
<td>
<a href='{{servlet-context}}/form-genders-Gender?id={{ record.gender }}'>
{{ record.gender_expanded }}
</a>
</td>
<td>
<a href='{{servlet-context}}/form-electors-Elector?id={{ record.id }}'>
View
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</form>
{% endblock %}
{% block extra-script %}
var form = document.getElementById('list-electors-Electors');
var ow = document.getElementById('offset');
var lw = document.getElementById('limit');
form.addEventListener('submit', function() {
ow.value='0';
});
var prevSelector = document.getElementById('prev-selector');
if (prevSelector != null) {
prevSelector.addEventListener('click', function () {
if (parseInt(ow.value)===0) {
window.location = '{{servlet-context}}/admin';
} else {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
}
});
}
document.getElementById('next-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)+parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endblock %}

View file

@ -1,147 +0,0 @@
{% extends "base.html" %}
<!-- File list-events-Events.html generated 2018-07-15T19:59:46.662Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block back-links %}
<div>
<div class='back-link-container'>
<a id='prev-selector' class='back-link'>
Previous
</a>
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof teamorganisers admin %}
<div class='big-link-container'>
<a href='{{servlet-context}}/form-events-Events' class='big-link'>
Add a new Event
</a>
</div>
{% endifmemberof %}
</div>
{% endblock %}
{% block content %}
<form id='list-events-Events' class='list' action='{{servlet-context}}/list-events-Events' method='POST'>
{% csrf-field %}
<input id='offset' name='offset' type='text' value='{{params.offset|default:0}}'/>
<input id='limit' name='limit' type='text' value='{{params.limit|default:50}}'/>
<table caption='events'>
<thead>
<tr>
<th>
Id
</th>
<th>
Name
</th>
<th>
Date
</th>
<th>
Time
</th>
<th>
Decription
</th>
<th>
Cancelled
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
<input id='id' type='text' name='id' value='{{ params.id }}'/>
</th>
<th>
<input id='name' type='text' name='name' value='{{ params.name }}'/>
</th>
<th>
<input id='date' type='date' name='date' value='{{ params.date }}'/>
</th>
<th>
<input id='time' type='time' name='time' value='{{ params.time }}'/>
</th>
<th>
<input id='decription' type='text' name='decription' value='{{ params.decription }}'/>
</th>
<th>
<input id='cancelled' type='text' name='cancelled' value='{{ params.cancelled }}'/>
</th>
<th>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
<tbody>
{% for record in records %}
<tr>
<td>
{{ record.id }}
</td>
<td>
{{ record.name }}
</td>
<td>
{{ record.date }}
</td>
<td>
{{ record.time }}
</td>
<td>
{{ record.decription }}
</td>
<td>
{{ record.cancelled }}
</td>
<td>
<a href='{{servlet-context}}/form-events-Events?id={{ record.id }}'>
View
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</form>
{% endblock %}
{% block extra-script %}
var form = document.getElementById('list-events-Events');
var ow = document.getElementById('offset');
var lw = document.getElementById('limit');
form.addEventListener('submit', function() {
ow.value='0';
});
var prevSelector = document.getElementById('prev-selector');
if (prevSelector != null) {
prevSelector.addEventListener('click', function () {
if (parseInt(ow.value)===0) {
window.location = '{{servlet-context}}/admin';
} else {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
}
});
}
document.getElementById('next-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)+parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endblock %}

View file

@ -1,142 +0,0 @@
{% extends "base.html" %}
<!-- File list-followupactions-Followupactions.html generated 2018-07-15T19:59:46.665Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block back-links %}
<div>
<div class='back-link-container'>
<a id='prev-selector' class='back-link'>
Previous
</a>
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof admin %}
<div class='big-link-container'>
<a href='{{servlet-context}}/form-followupactions-Followupaction' class='big-link'>
Add a new Followupaction
</a>
</div>
{% endifmemberof %}
</div>
{% endblock %}
{% block content %}
<form id='list-followupactions-Followupactions' class='list' action='{{servlet-context}}/list-followupactions-Followupactions' method='POST'>
{% csrf-field %}
<input id='offset' name='offset' type='text' value='{{params.offset|default:0}}'/>
<input id='limit' name='limit' type='text' value='{{params.limit|default:50}}'/>
<table caption='followupactions'>
<thead>
<tr>
<th>
Id
</th>
<th>
Request_id
</th>
<th>
Actor
</th>
<th>
Date
</th>
<th>
Closed
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
<input id='id' type='text' name='id' value='{{ params.id }}'/>
</th>
<th>
<input id='request_id' type='text' name='request_id' value='{{ params.request_id }}'/>
</th>
<th>
<input id='actor' type='text' name='actor' value='{{ params.actor }}'/>
</th>
<th>
<input id='date' type='date' name='date' value='{{ params.date }}'/>
</th>
<th>
<input id='closed' type='text' name='closed' value='{{ params.closed }}'/>
</th>
<th>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
<tbody>
{% for record in records %}
<tr>
<td>
{{ record.id }}
</td>
<td>
<a href='{{servlet-context}}/form-followuprequests-Followuprequest?id={{ record.request_id }}'>
{{ record.request_id_expanded }}
</a>
</td>
<td>
<a href='{{servlet-context}}/form-canvassers-Canvasser?id={{ record.actor }}'>
{{ record.actor_expanded }}
</a>
</td>
<td>
{{ record.date }}
</td>
<td>
{{ record.closed }}
</td>
<td>
<a href='{{servlet-context}}/form-followupactions-Followupaction?id={{ record.id }}'>
View
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</form>
{% endblock %}
{% block extra-script %}
var form = document.getElementById('list-followupactions-Followupactions');
var ow = document.getElementById('offset');
var lw = document.getElementById('limit');
form.addEventListener('submit', function() {
ow.value='0';
});
var prevSelector = document.getElementById('prev-selector');
if (prevSelector != null) {
prevSelector.addEventListener('click', function () {
if (parseInt(ow.value)===0) {
window.location = '{{servlet-context}}/admin';
} else {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
}
});
}
document.getElementById('next-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)+parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endblock %}

View file

@ -1,102 +0,0 @@
{% extends "base.html" %}
<!-- File list-followupmethods-Followupmethods.html generated 2018-07-15T19:59:46.649Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block back-links %}
<div>
<div class='back-link-container'>
<a id='prev-selector' class='back-link'>
Previous
</a>
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof admin %}
<div class='big-link-container'>
<a href='{{servlet-context}}/form-followupmethods-Followupmethod' class='big-link'>
Add a new Followupmethod
</a>
</div>
{% endifmemberof %}
</div>
{% endblock %}
{% block content %}
<form id='list-followupmethods-Followupmethods' class='list' action='{{servlet-context}}/list-followupmethods-Followupmethods' method='POST'>
{% csrf-field %}
<input id='offset' name='offset' type='text' value='{{params.offset|default:0}}'/>
<input id='limit' name='limit' type='text' value='{{params.limit|default:50}}'/>
<table caption='followupmethods'>
<thead>
<tr>
<th>
Id
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
<input id='id' type='text' name='id' value='{{ params.id }}'/>
</th>
<th>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
<tbody>
{% for record in records %}
<tr>
<td>
{{ record.id }}
</td>
<td>
<a href='{{servlet-context}}/form-followupmethods-Followupmethod?id={{ record.id }}'>
View
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</form>
{% endblock %}
{% block extra-script %}
var form = document.getElementById('list-followupmethods-Followupmethods');
var ow = document.getElementById('offset');
var lw = document.getElementById('limit');
form.addEventListener('submit', function() {
ow.value='0';
});
var prevSelector = document.getElementById('prev-selector');
if (prevSelector != null) {
prevSelector.addEventListener('click', function () {
if (parseInt(ow.value)===0) {
window.location = '{{servlet-context}}/admin';
} else {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
}
});
}
document.getElementById('next-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)+parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endblock %}

View file

@ -1,146 +0,0 @@
{% extends "base.html" %}
<!-- File list-followuprequests-Followuprequests.html generated 2018-07-15T19:59:46.638Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block back-links %}
<div>
<div class='back-link-container'>
<a id='prev-selector' class='back-link'>
Previous
</a>
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof %}
<div class='big-link-container'>
<a href='{{servlet-context}}/form-followuprequests-Followuprequest' class='big-link'>
Add a new Followuprequest
</a>
</div>
{% endifmemberof %}
</div>
{% endblock %}
{% block content %}
<form id='list-followuprequests-Followuprequests' class='list' action='{{servlet-context}}/list-followuprequests-Followuprequests' method='POST'>
{% csrf-field %}
<input id='offset' name='offset' type='text' value='{{params.offset|default:0}}'/>
<input id='limit' name='limit' type='text' value='{{params.limit|default:50}}'/>
<table caption='followuprequests'>
<thead>
<tr>
<th>
Id
</th>
<th>
Elector_id
</th>
<th>
Visit_id
</th>
<th>
Issue_id
</th>
<th>
Method_id
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
<input id='id' type='text' name='id' value='{{ params.id }}'/>
</th>
<th>
<input id='elector_id' type='text' name='elector_id' value='{{ params.elector_id }}'/>
</th>
<th>
<input id='visit_id' type='text' name='visit_id' value='{{ params.visit_id }}'/>
</th>
<th>
<input id='issue_id' type='text' name='issue_id' value='{{ params.issue_id }}'/>
</th>
<th>
<input id='method_id' type='text' name='method_id' value='{{ params.method_id }}'/>
</th>
<th>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
<tbody>
{% for record in records %}
<tr>
<td>
{{ record.id }}
</td>
<td>
<a href='{{servlet-context}}/form-electors-Elector?id={{ record.elector_id }}'>
{{ record.elector_id_expanded }}
</a>
</td>
<td>
<a href='{{servlet-context}}/form-visits-Visit?id={{ record.visit_id }}'>
{{ record.visit_id_expanded }}
</a>
</td>
<td>
<a href='{{servlet-context}}/form-issues-Issue?id={{ record.issue_id }}'>
{{ record.issue_id_expanded }}
</a>
</td>
<td>
<a href='{{servlet-context}}/form-followupmethods-Followupmethod?id={{ record.method_id }}'>
{{ record.method_id_expanded }}
</a>
</td>
<td>
<a href='{{servlet-context}}/form-followuprequests-Followuprequest?id={{ record.id }}'>
View
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</form>
{% endblock %}
{% block extra-script %}
var form = document.getElementById('list-followuprequests-Followuprequests');
var ow = document.getElementById('offset');
var lw = document.getElementById('limit');
form.addEventListener('submit', function() {
ow.value='0';
});
var prevSelector = document.getElementById('prev-selector');
if (prevSelector != null) {
prevSelector.addEventListener('click', function () {
if (parseInt(ow.value)===0) {
window.location = '{{servlet-context}}/admin';
} else {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
}
});
}
document.getElementById('next-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)+parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endblock %}

View file

@ -1,102 +0,0 @@
{% extends "base.html" %}
<!-- File list-genders-Genders.html generated 2018-07-15T19:59:46.634Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block back-links %}
<div>
<div class='back-link-container'>
<a id='prev-selector' class='back-link'>
Previous
</a>
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof admin %}
<div class='big-link-container'>
<a href='{{servlet-context}}/form-genders-Gender' class='big-link'>
Add a new Gender
</a>
</div>
{% endifmemberof %}
</div>
{% endblock %}
{% block content %}
<form id='list-genders-Genders' class='list' action='{{servlet-context}}/list-genders-Genders' method='POST'>
{% csrf-field %}
<input id='offset' name='offset' type='text' value='{{params.offset|default:0}}'/>
<input id='limit' name='limit' type='text' value='{{params.limit|default:50}}'/>
<table caption='genders'>
<thead>
<tr>
<th>
Id
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
<input id='id' type='text' name='id' value='{{ params.id }}'/>
</th>
<th>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
<tbody>
{% for record in records %}
<tr>
<td>
{{ record.id }}
</td>
<td>
<a href='{{servlet-context}}/form-genders-Gender?id={{ record.id }}'>
View
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</form>
{% endblock %}
{% block extra-script %}
var form = document.getElementById('list-genders-Genders');
var ow = document.getElementById('offset');
var lw = document.getElementById('limit');
form.addEventListener('submit', function() {
ow.value='0';
});
var prevSelector = document.getElementById('prev-selector');
if (prevSelector != null) {
prevSelector.addEventListener('click', function () {
if (parseInt(ow.value)===0) {
window.location = '{{servlet-context}}/admin';
} else {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
}
});
}
document.getElementById('next-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)+parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endblock %}

View file

@ -1,135 +0,0 @@
{% extends "base.html" %}
<!-- File list-intentions-Intentions.html generated 2018-07-15T19:59:46.667Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block back-links %}
<div>
<div class='back-link-container'>
<a id='prev-selector' class='back-link'>
Previous
</a>
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof %}
<div class='big-link-container'>
<a href='{{servlet-context}}/form-intentions-Intention' class='big-link'>
Add a new Intention
</a>
</div>
{% endifmemberof %}
</div>
{% endblock %}
{% block content %}
<form id='list-intentions-Intentions' class='list' action='{{servlet-context}}/list-intentions-Intentions' method='POST'>
{% csrf-field %}
<input id='offset' name='offset' type='text' value='{{params.offset|default:0}}'/>
<input id='limit' name='limit' type='text' value='{{params.limit|default:50}}'/>
<table caption='intentions'>
<thead>
<tr>
<th>
Visit_id
</th>
<th>
Elector_id
</th>
<th>
Option_id
</th>
<th>
Locality
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
<input id='visit_id' type='text' name='visit_id' value='{{ params.visit_id }}'/>
</th>
<th>
<input id='elector_id' type='text' name='elector_id' value='{{ params.elector_id }}'/>
</th>
<th>
<input id='option_id' type='text' name='option_id' value='{{ params.option_id }}'/>
</th>
<th>
<input id='locality' type='number' name='locality' value='{{ params.locality }}'/>
</th>
<th>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
<tbody>
{% for record in records %}
<tr>
<td>
<a href='{{servlet-context}}/form-visits-Visit?id={{ record.visit_id }}'>
{{ record.visit_id_expanded }}
</a>
</td>
<td>
<a href='{{servlet-context}}/form-electors-Elector?id={{ record.elector_id }}'>
{{ record.elector_id_expanded }}
</a>
</td>
<td>
<a href='{{servlet-context}}/form-options-Option?id={{ record.option_id }}'>
{{ record.option_id_expanded }}
</a>
</td>
<td>
{{ record.locality }}
</td>
<td>
<a href='{{servlet-context}}/form-intentions-Intention?id={{ record.id }}'>
View
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</form>
{% endblock %}
{% block extra-script %}
var form = document.getElementById('list-intentions-Intentions');
var ow = document.getElementById('offset');
var lw = document.getElementById('limit');
form.addEventListener('submit', function() {
ow.value='0';
});
var prevSelector = document.getElementById('prev-selector');
if (prevSelector != null) {
prevSelector.addEventListener('click', function () {
if (parseInt(ow.value)===0) {
window.location = '{{servlet-context}}/admin';
} else {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
}
});
}
document.getElementById('next-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)+parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endblock %}

View file

@ -1,129 +0,0 @@
{% extends "base.html" %}
<!-- File list-issues-Issues.html generated 2018-07-15T19:59:46.663Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block back-links %}
<div>
<div class='back-link-container'>
<a id='prev-selector' class='back-link'>
Previous
</a>
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof issueeditors admin %}
<div class='big-link-container'>
<a href='{{servlet-context}}/form-issues-Issue' class='big-link'>
Add a new Issue
</a>
</div>
{% endifmemberof %}
</div>
{% endblock %}
{% block content %}
<form id='list-issues-Issues' class='list' action='{{servlet-context}}/list-issues-Issues' method='POST'>
{% csrf-field %}
<input id='offset' name='offset' type='text' value='{{params.offset|default:0}}'/>
<input id='limit' name='limit' type='text' value='{{params.limit|default:50}}'/>
<table caption='issues'>
<thead>
<tr>
<th>
Id
</th>
<th>
Url
</th>
<th>
Current
</th>
<th>
Brief
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
<input id='id' type='text' name='id' value='{{ params.id }}'/>
</th>
<th>
<input id='url' type='text' name='url' value='{{ params.url }}'/>
</th>
<th>
<input id='current' type='text' name='current' value='{{ params.current }}'/>
</th>
<th>
<input id='brief' type='text' name='brief' value='{{ params.brief }}'/>
</th>
<th>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
<tbody>
{% for record in records %}
<tr>
<td>
{{ record.id }}
</td>
<td>
{{ record.url }}
</td>
<td>
{{ record.current }}
</td>
<td>
{{ record.brief }}
</td>
<td>
<a href='{{servlet-context}}/form-issues-Issue?id={{ record.id }}'>
View
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</form>
{% endblock %}
{% block extra-script %}
var form = document.getElementById('list-issues-Issues');
var ow = document.getElementById('offset');
var lw = document.getElementById('limit');
form.addEventListener('submit', function() {
ow.value='0';
});
var prevSelector = document.getElementById('prev-selector');
if (prevSelector != null) {
prevSelector.addEventListener('click', function () {
if (parseInt(ow.value)===0) {
window.location = '{{servlet-context}}/admin';
} else {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
}
});
}
document.getElementById('next-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)+parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endblock %}

View file

@ -1,102 +0,0 @@
{% extends "base.html" %}
<!-- File list-options-Options.html generated 2018-07-15T19:59:46.639Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block back-links %}
<div>
<div class='back-link-container'>
<a id='prev-selector' class='back-link'>
Previous
</a>
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof admin %}
<div class='big-link-container'>
<a href='{{servlet-context}}/form-options-Option' class='big-link'>
Add a new Option
</a>
</div>
{% endifmemberof %}
</div>
{% endblock %}
{% block content %}
<form id='list-options-Options' class='list' action='{{servlet-context}}/list-options-Options' method='POST'>
{% csrf-field %}
<input id='offset' name='offset' type='text' value='{{params.offset|default:0}}'/>
<input id='limit' name='limit' type='text' value='{{params.limit|default:50}}'/>
<table caption='options'>
<thead>
<tr>
<th>
Id
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
<input id='id' type='text' name='id' value='{{ params.id }}'/>
</th>
<th>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
<tbody>
{% for record in records %}
<tr>
<td>
{{ record.id }}
</td>
<td>
<a href='{{servlet-context}}/form-options-Option?id={{ record.id }}'>
View
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</form>
{% endblock %}
{% block extra-script %}
var form = document.getElementById('list-options-Options');
var ow = document.getElementById('offset');
var lw = document.getElementById('limit');
form.addEventListener('submit', function() {
ow.value='0';
});
var prevSelector = document.getElementById('prev-selector');
if (prevSelector != null) {
prevSelector.addEventListener('click', function () {
if (parseInt(ow.value)===0) {
window.location = '{{servlet-context}}/admin';
} else {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
}
});
}
document.getElementById('next-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)+parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endblock %}

View file

@ -1,111 +0,0 @@
{% extends "base.html" %}
<!-- File list-roles-Roles.html generated 2018-07-15T19:59:46.648Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block back-links %}
<div>
<div class='back-link-container'>
<a id='prev-selector' class='back-link'>
Previous
</a>
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof admin %}
<div class='big-link-container'>
<a href='{{servlet-context}}/form-roles-Role' class='big-link'>
Add a new Role
</a>
</div>
{% endifmemberof %}
</div>
{% endblock %}
{% block content %}
<form id='list-roles-Roles' class='list' action='{{servlet-context}}/list-roles-Roles' method='POST'>
{% csrf-field %}
<input id='offset' name='offset' type='text' value='{{params.offset|default:0}}'/>
<input id='limit' name='limit' type='text' value='{{params.limit|default:50}}'/>
<table caption='roles'>
<thead>
<tr>
<th>
Id
</th>
<th>
Name
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
<input id='id' type='text' name='id' value='{{ params.id }}'/>
</th>
<th>
<input id='name' type='text' name='name' value='{{ params.name }}'/>
</th>
<th>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
<tbody>
{% for record in records %}
<tr>
<td>
{{ record.id }}
</td>
<td>
{{ record.name }}
</td>
<td>
<a href='{{servlet-context}}/form-roles-Role?id={{ record.id }}'>
View
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</form>
{% endblock %}
{% block extra-script %}
var form = document.getElementById('list-roles-Roles');
var ow = document.getElementById('offset');
var lw = document.getElementById('limit');
form.addEventListener('submit', function() {
ow.value='0';
});
var prevSelector = document.getElementById('prev-selector');
if (prevSelector != null) {
prevSelector.addEventListener('click', function () {
if (parseInt(ow.value)===0) {
window.location = '{{servlet-context}}/admin';
} else {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
}
});
}
document.getElementById('next-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)+parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endblock %}

View file

@ -1,140 +0,0 @@
{% extends "base.html" %}
<!-- File list-teams-Teams.html generated 2018-07-15T19:59:46.637Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block back-links %}
<div>
<div class='back-link-container'>
<a id='prev-selector' class='back-link'>
Previous
</a>
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof teamorganisers admin teamorganisers admin %}
<div class='big-link-container'>
<a href='{{servlet-context}}/form-teams-Team' class='big-link'>
Add a new Team
</a>
</div>
{% endifmemberof %}
</div>
{% endblock %}
{% block content %}
<form id='list-teams-Teams' class='list' action='{{servlet-context}}/list-teams-Teams' method='POST'>
{% csrf-field %}
<input id='offset' name='offset' type='text' value='{{params.offset|default:0}}'/>
<input id='limit' name='limit' type='text' value='{{params.limit|default:50}}'/>
<table caption='teams'>
<thead>
<tr>
<th>
Id
</th>
<th>
Name
</th>
<th>
District_id
</th>
<th>
Latitude
</th>
<th>
Longitude
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
<input id='id' type='text' name='id' value='{{ params.id }}'/>
</th>
<th>
<input id='name' type='text' name='name' value='{{ params.name }}'/>
</th>
<th>
<input id='district_id' type='text' name='district_id' value='{{ params.district_id }}'/>
</th>
<th>
<input id='latitude' type='number' name='latitude' value='{{ params.latitude }}'/>
</th>
<th>
<input id='longitude' type='number' name='longitude' value='{{ params.longitude }}'/>
</th>
<th>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
<tbody>
{% for record in records %}
<tr>
<td>
{{ record.id }}
</td>
<td>
{{ record.name }}
</td>
<td>
<a href='{{servlet-context}}/form-districts-District?id={{ record.district_id }}'>
{{ record.district_id_expanded }}
</a>
</td>
<td>
{{ record.latitude }}
</td>
<td>
{{ record.longitude }}
</td>
<td>
<a href='{{servlet-context}}/form-teams-Team?id={{ record.id }}'>
View
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</form>
{% endblock %}
{% block extra-script %}
var form = document.getElementById('list-teams-Teams');
var ow = document.getElementById('offset');
var lw = document.getElementById('limit');
form.addEventListener('submit', function() {
ow.value='0';
});
var prevSelector = document.getElementById('prev-selector');
if (prevSelector != null) {
prevSelector.addEventListener('click', function () {
if (parseInt(ow.value)===0) {
window.location = '{{servlet-context}}/admin';
} else {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
}
});
}
document.getElementById('next-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)+parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endblock %}

View file

@ -1,133 +0,0 @@
{% extends "base.html" %}
<!-- File list-visits-Visits.html generated 2018-07-15T19:59:46.635Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block back-links %}
<div>
<div class='back-link-container'>
<a id='prev-selector' class='back-link'>
Previous
</a>
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof admin %}
<div class='big-link-container'>
<a href='{{servlet-context}}/form-visits-Visit' class='big-link'>
Add a new Visit
</a>
</div>
{% endifmemberof %}
</div>
{% endblock %}
{% block content %}
<form id='list-visits-Visits' class='list' action='{{servlet-context}}/list-visits-Visits' method='POST'>
{% csrf-field %}
<input id='offset' name='offset' type='text' value='{{params.offset|default:0}}'/>
<input id='limit' name='limit' type='text' value='{{params.limit|default:50}}'/>
<table caption='visits'>
<thead>
<tr>
<th>
Id
</th>
<th>
Address_id
</th>
<th>
Canvasser_id
</th>
<th>
Date
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
<input id='id' type='text' name='id' value='{{ params.id }}'/>
</th>
<th>
<input id='address_id' type='text' name='address_id' value='{{ params.address_id }}'/>
</th>
<th>
<input id='canvasser_id' type='text' name='canvasser_id' value='{{ params.canvasser_id }}'/>
</th>
<th>
<input id='date' type='date' name='date' value='{{ params.date }}'/>
</th>
<th>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
<tbody>
{% for record in records %}
<tr>
<td>
{{ record.id }}
</td>
<td>
<a href='{{servlet-context}}/form-addresses-Address?id={{ record.address_id }}'>
{{ record.address_id_expanded }}
</a>
</td>
<td>
<a href='{{servlet-context}}/form-canvassers-Canvasser?id={{ record.canvasser_id }}'>
{{ record.canvasser_id_expanded }}
</a>
</td>
<td>
{{ record.date }}
</td>
<td>
<a href='{{servlet-context}}/form-visits-Visit?id={{ record.id }}'>
View
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</form>
{% endblock %}
{% block extra-script %}
var form = document.getElementById('list-visits-Visits');
var ow = document.getElementById('offset');
var lw = document.getElementById('limit');
form.addEventListener('submit', function() {
ow.value='0';
});
var prevSelector = document.getElementById('prev-selector');
if (prevSelector != null) {
prevSelector.addEventListener('click', function () {
if (parseInt(ow.value)===0) {
window.location = '{{servlet-context}}/admin';
} else {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
}
});
}
document.getElementById('next-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)+parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endblock %}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff