Extremely close to alpha release

This commit is contained in:
Simon Brooke 2018-07-05 11:16:48 +01:00
parent ff5c78d030
commit fc2bd86cff
43 changed files with 2375 additions and 719 deletions

View file

@ -1,2 +1,4 @@
{:production true
:port 3000}
:port 3000
:site-title "Project Hope"
:site-logo "img/ProjectHopeLogo.png"}

View file

@ -80,7 +80,9 @@
[datatables.net-dt "1.10.19"]
[jquery "3.3.1"]
[leaflet "0.7.3"] ;; old version works, new ["1.3.1"] doesn't
[signature_pad "2.3.2"]]
[selectize "0.12.5"]
[signature_pad "2.3.2"]
[simplemde "1.11.2"]]
:root "resources/public/js/lib"}
:uberwar

View file

@ -104,7 +104,7 @@ input, select {
padding: 0.25em 1.25em;
}
input.action {
input.action, input.action-safe {
color: white;
background-color: rgb( 50, 109, 177);
font-size: 125%;
@ -113,6 +113,7 @@ input.action {
input.action-dangerous {
color: white;
background-color: red;
font-size: 125%;
}
input.required:after {
@ -254,6 +255,10 @@ th {
border: thin solid silver;
}
.editor-toolbar {
background-color: silver;
}
.error {
width: 100%;
background-color: red;

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View file

@ -1,7 +1,7 @@
------------------------------------------------------------------------
-- File queries.sql
--
-- autogenerated by adl.to-hugsql-queries at 2018-07-03T23:08:18.480Z
-- autogenerated by adl.to-hugsql-queries at 2018-07-05T10:14:16.954Z
--
-- See [Application Description
-- Language](https://github.com/simon-brooke/adl).
@ -753,7 +753,7 @@ ORDER BY lv_visits.address_id,
lv_visits.date,
lv_visits.id
-- :name search-strings-address :? :1
-- :name search-strings-addresses :? :1
-- :doc selects existing address records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_addresses
WHERE false
@ -771,7 +771,7 @@ ORDER BY lv_addresses.address,
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-authority :? :1
-- :name search-strings-authorities :? :1
-- :doc selects existing authority records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_authorities
WHERE false
@ -784,7 +784,7 @@ WHERE false
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-canvasser :? :1
-- :name search-strings-canvassers :? :1
-- :doc selects existing canvasser records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_canvassers
WHERE false
@ -806,7 +806,7 @@ ORDER BY lv_canvassers.username,
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-district :? :1
-- :name search-strings-districts :? :1
-- :doc selects existing district records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_districts
WHERE false
@ -817,7 +817,7 @@ ORDER BY lv_districts.name,
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-dwelling :? :1
-- :name search-strings-dwellings :? :1
-- :doc selects existing dwelling records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_dwellings
WHERE false
@ -830,7 +830,7 @@ ORDER BY lv_dwellings.address_id,
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-elector :? :1
-- :name search-strings-electors :? :1
-- :doc selects existing elector records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_electors
WHERE false
@ -848,7 +848,7 @@ ORDER BY lv_electors.name,
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-followupaction :? :1
-- :name search-strings-followupactions :? :1
-- :doc selects existing followupaction records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_followupactions
WHERE false
@ -864,7 +864,7 @@ ORDER BY lv_followupactions.date,
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-followupmethod :? :1
-- :name search-strings-followupmethods :? :1
-- :doc selects existing followupmethod records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_followupmethods
WHERE false
@ -872,7 +872,7 @@ WHERE false
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-followuprequest :? :1
-- :name search-strings-followuprequests :? :1
-- :doc selects existing followuprequest records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_followuprequests
WHERE false
@ -888,7 +888,7 @@ ORDER BY lv_followuprequests.elector_id,
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-gender :? :1
-- :name search-strings-genders :? :1
-- :doc selects existing gender records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_genders
WHERE false
@ -896,7 +896,7 @@ WHERE false
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-intention :? :1
-- :name search-strings-intentions :? :1
-- :doc selects existing intention records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_intentions
WHERE false
@ -908,7 +908,7 @@ WHERE false
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-issue :? :1
-- :name search-strings-issues :? :1
-- :doc selects existing issue records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_issues
WHERE false
@ -919,7 +919,7 @@ WHERE false
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-option :? :1
-- :name search-strings-options :? :1
-- :doc selects existing option records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_options
WHERE false
@ -927,7 +927,7 @@ WHERE false
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-role :? :1
-- :name search-strings-roles :? :1
-- :doc selects existing role records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_roles
WHERE false
@ -938,7 +938,7 @@ ORDER BY lv_roles.name,
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-team :? :1
-- :name search-strings-teams :? :1
-- :doc selects existing team records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_teams
WHERE false
@ -952,7 +952,7 @@ ORDER BY lv_teams.name,
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-visit :? :1
-- :name search-strings-visits :? :1
-- :doc selects existing visit records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_visits
WHERE false
@ -1035,6 +1035,12 @@ SET request_id = :request_id,
closed = :closed
WHERE followupactions.id = :id
-- :name update-followupmethod! :! :n
-- :doc updates an existing followupmethod record
UPDATE followupmethods
SET id = :id
WHERE followupmethods.id = :id
-- :name update-followuprequest! :! :n
-- :doc updates an existing followuprequest record
UPDATE followuprequests
@ -1044,6 +1050,12 @@ SET elector_id = :elector_id,
method_id = :method_id
WHERE followuprequests.id = :id
-- :name update-gender! :! :n
-- :doc updates an existing gender record
UPDATE genders
SET id = :id
WHERE genders.id = :id
-- :name update-intention! :! :n
-- :doc updates an existing intention record
UPDATE intentions
@ -1062,6 +1074,12 @@ SET url = :url,
id = :id
WHERE issues.id = :id
-- :name update-option! :! :n
-- :doc updates an existing option record
UPDATE options
SET id = :id
WHERE options.id = :id
-- :name update-role! :! :n
-- :doc updates an existing role record
UPDATE roles

View file

@ -5,7 +5,7 @@
--
-- auto-generated by [Application Description Language framework]
--
-- (https://github.com/simon-brooke/adl) at 20180703T230819.494Z
-- (https://github.com/simon-brooke/adl) at 20180705T101417.868Z
--
--
-- A web-app intended to be used by canvassers campaigning for a

View file

@ -1,55 +1,74 @@
{% extends "base.html" %}
<!-- File application-index.html generated 2018-07-03T23:08:20.049Z by adl.to-selmer-templates.
<!-- File application-index.html generated 2018-07-05T10:14:18.460Z 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='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='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='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='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='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
@ -60,110 +79,155 @@ All dwellings within addresses in the system; a dwelling is a
</p>
</dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dt>
<a href='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 issueexperts canvassers analysts issueeditors admin %}
<dt>
<a href='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='list-followupmethods-Followupmethods'>
Followupmethod
</a>
</dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dd>
</dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dt>
<a href='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='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='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='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='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='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='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 %}
<dt>
<a href='list-visits-Visits'>
Visit
</a>
</dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers %}
<dd>
<p>
All visits made by canvassers to dwellings in which opinions were recorded.
</p>
</dd>
{% endifmemberof %}
</dl>
{% endblock %}

View file

@ -1,8 +1,11 @@
{% extends "base.html" %}
<!-- File form-addresses-Address.html generated 2018-07-03T23:08:20.032Z by adl.to-selmer-templates.
<!-- File form-addresses-Address.html generated 2018-07-05T10:14:18.448Z 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-addresses-Address' method='POST'>
@ -12,7 +15,7 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
id
</label>
{% ifmemberof admin %}
<input id='id' name='id' type='text' value='{{record.id}}' maxlength='' size='16'/>
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
@ -30,7 +33,7 @@ You are not permitted to view id of addresses
address
</label>
{% ifmemberof admin %}
<input id='address' name='address' type='text' value='{{record.address}}' maxlength='256' size='60'/>
<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'>
@ -48,7 +51,7 @@ You are not permitted to view address of addresses
postcode
</label>
{% ifmemberof admin %}
<input id='postcode' name='postcode' type='text' value='{{record.postcode}}' maxlength='16' size='16'/>
<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'>
@ -66,7 +69,7 @@ You are not permitted to view postcode of addresses
phone
</label>
{% ifmemberof admin %}
<input id='phone' name='phone' type='text' value='{{record.phone}}' maxlength='16' size='16'/>
<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'>
@ -84,12 +87,13 @@ You are not permitted to view phone of addresses
district_id
</label>
{% ifmemberof admin %}
<div class='select-box' farside='districts' found='true'>
<input name='district_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='district_id' name='district_id' comment='JavaScript stuff to fix up aynchronous loading'>
<span class='select-box' farside='districts' found='true'>
<input name='district_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-districts?name=" + district_id_search_box.text, null, function (data) {updateMenuOptions("district_id", "id", ["name"], data);})'/>
<br/>
<select id='district_id' name='district_id'>
{% for r in districts %}<option value='{{r.id}}' {% ifequal record.district_id r.id%}selected{% endifequal %}>{{r.name}}</option>{% endfor %}
</select>
</div>
</span>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='district_id' name='district_id' class='pseudo-widget disabled'>
@ -138,19 +142,43 @@ You are not permitted to view longitude of addresses
{% endifmemberof %}
{% endifmemberof %}
</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'>
/**
* update the select menu with id `wid` from this `data` whose fields include
* this `entity_key` and these `fields`
*/
function updateMenuOptions(wid, entity_key, fields, data){
$('#' + wid).children().filter(function(){
return $(this).attr('selected') === undefined;
}).remove().end();
$.each(data, function(key, entry){
$('#' + wid).append(
$('<option></option>').attr('value', key).text(entry));
});
}
</script>
{% endblock %}

View file

@ -1,8 +1,11 @@
{% extends "base.html" %}
<!-- File form-authorities-Authority.html generated 2018-07-03T23:08:20.060Z by adl.to-selmer-templates.
<!-- File form-authorities-Authority.html generated 2018-07-05T10:14:18.468Z 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'>
@ -12,7 +15,7 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
id
</label>
{% ifmemberof admin %}
<input id='id' name='id' type='text' value='{{record.id}}' maxlength='' size='16'/>
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
@ -26,108 +29,117 @@ You are not permitted to view id of authorities
{% endifmemberof %}
</p>
<p class='widget'>
<label for='request-token-uri'>
<label for='request_token_uri'>
request-token-uri
</label>
{% ifmemberof admin %}
<input id='request-token-uri' name='request-token-uri' type='text' value='{{record.request-token-uri}}' maxlength='256' size='60'/>
<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 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 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 %}
</p>
<p class='widget'>
<label for='access-token-uri'>
<label for='access_token_uri'>
access-token-uri
</label>
{% ifmemberof admin %}
<input id='access-token-uri' name='access-token-uri' type='text' value='{{record.access-token-uri}}' maxlength='256' size='60'/>
<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 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 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 %}
</p>
<p class='widget'>
<label for='authorize-uri'>
<label for='authorize_uri'>
authorize-uri
</label>
{% ifmemberof admin %}
<input id='authorize-uri' name='authorize-uri' type='text' value='{{record.authorize-uri}}' maxlength='256' size='60'/>
<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 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 id='authorize_uri' name='authorize_uri' class='pseudo-widget not-authorised'>
You are not permitted to view authorize_uri of authorities
</span>
{% endifmemberof %}
{% endifmemberof %}
</p>
<p class='widget'>
<label for='consumer-key'>
<label for='consumer_key'>
consumer-key
</label>
{% ifmemberof admin %}
<input id='consumer-key' name='consumer-key' type='text' value='{{record.consumer-key}}' maxlength='32' size='32'/>
<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 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 id='consumer_key' name='consumer_key' class='pseudo-widget not-authorised'>
You are not permitted to view consumer_key of authorities
</span>
{% endifmemberof %}
{% endifmemberof %}
</p>
<p class='widget'>
<label for='consumer-secret'>
<label for='consumer_secret'>
consumer-secret
</label>
{% ifmemberof admin %}
<input id='consumer-secret' name='consumer-secret' type='text' value='{{record.consumer-secret}}' maxlength='256' size='60'/>
<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 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 id='consumer_secret' name='consumer_secret' class='pseudo-widget not-authorised'>
You are not permitted to view consumer_secret of authorities
</span>
{% endifmemberof %}
{% endifmemberof %}
</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,8 +1,11 @@
{% extends "base.html" %}
<!-- File form-canvassers-Canvasser.html generated 2018-07-03T23:08:20.065Z by adl.to-selmer-templates.
<!-- File form-canvassers-Canvasser.html generated 2018-07-05T10:14:18.471Z 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-canvassers-Canvasser' method='POST'>
@ -12,7 +15,7 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
id
</label>
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<input id='id' name='id' type='text' value='{{record.id}}' maxlength='' size='16'/>
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
@ -30,7 +33,7 @@ You are not permitted to view id of canvassers
username
</label>
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<input id='username' name='username' type='text' value='{{record.username}}' maxlength='32' size='32'/>
<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'>
@ -48,7 +51,7 @@ You are not permitted to view username of canvassers
fullname
</label>
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<input id='fullname' name='fullname' type='text' value='{{record.fullname}}' maxlength='64' size='60'/>
<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'>
@ -66,12 +69,13 @@ You are not permitted to view fullname of canvassers
elector_id
</label>
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<div class='select-box' farside='electors' found='true'>
<input name='elector_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='elector_id' name='elector_id' comment='JavaScript stuff to fix up aynchronous loading'>
<span class='select-box' farside='electors' found='true'>
<input name='elector_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-electors?gender=" + elector_id_search_box.text + "&amp;email=" + elector_id_search_box.text + "&amp;name=" + elector_id_search_box.text + "&amp;phone=" + elector_id_search_box.text, null, function (data) {updateMenuOptions("elector_id", "id", ["gender", "email", "name", "phone"], data);})'/>
<br/>
<select id='elector_id' name='elector_id'>
{% for r in electors %}<option value='{{r.id}}' {% ifequal record.elector_id r.id%}selected{% endifequal %}>{{r.name}} {{r.phone}} {{r.email}} {{r.gender}}</option>{% endfor %}
</select>
</div>
</span>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='elector_id' name='elector_id' class='pseudo-widget disabled'>
@ -89,12 +93,13 @@ You are not permitted to view elector_id of canvassers
address_id
</label>
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<div class='select-box' farside='addresses' found='true'>
<input name='address_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='address_id' name='address_id' comment='JavaScript stuff to fix up aynchronous loading'>
<span class='select-box' farside='addresses' found='true'>
<input name='address_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-addresses?postcode=" + address_id_search_box.text + "&amp;address=" + address_id_search_box.text, null, function (data) {updateMenuOptions("address_id", "id", ["postcode", "address"], data);})'/>
<br/>
<select id='address_id' name='address_id'>
{% for r in addresses %}<option value='{{r.id}}' {% ifequal record.address_id r.id%}selected{% endifequal %}>{{r.address}} {{r.postcode}}</option>{% endfor %}
</select>
</div>
</span>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='address_id' name='address_id' class='pseudo-widget disabled'>
@ -112,7 +117,7 @@ You are not permitted to view address_id of canvassers
phone
</label>
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<input id='phone' name='phone' type='text' value='{{record.phone}}' maxlength='16' size='16'/>
<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'>
@ -130,7 +135,7 @@ You are not permitted to view phone of canvassers
email
</label>
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<input id='email' name='email' type='text' value='{{record.email}}' maxlength='128' size='60'/>
<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'>
@ -148,12 +153,13 @@ You are not permitted to view email of canvassers
authority_id
</label>
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<div class='select-box' farside='authorities' found='true'>
<input name='authority_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='authority_id' name='authority_id' comment='JavaScript stuff to fix up aynchronous loading'>
<span class='select-box' farside='authorities' found='true'>
<input name='authority_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-authorities?id=" + authority_id_search_box.text, null, function (data) {updateMenuOptions("authority_id", "id", ["id"], data);})'/>
<br/>
<select id='authority_id' name='authority_id'>
{% for r in authorities %}<option value='{{r.id}}' {% ifequal record.authority_id r.id%}selected{% endifequal %}>{{r.id}}</option>{% endfor %}
</select>
</div>
</span>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='authority_id' name='authority_id' class='pseudo-widget disabled'>
@ -189,11 +195,11 @@ You are not permitted to view authorised of canvassers
roles
</label>
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<div class='select-box' farside='roles' found='true'>
<span class='select-box' farside='roles' found='true'>
<select id='roles' name='roles' multiple='multiple'>
{% for r in roles %}<option value='{{r.role_id}}' {% ifequal record.roles r.role_id%}selected{% endifequal %}>{{r.name}}</option>{% endfor %}
</select>
</div>
</span>
{% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='roles' name='roles' class='pseudo-widget disabled'>
@ -206,19 +212,43 @@ You are not permitted to view roles of canvassers
{% endifmemberof %}
{% endifmemberof %}
</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'>
/**
* update the select menu with id `wid` from this `data` whose fields include
* this `entity_key` and these `fields`
*/
function updateMenuOptions(wid, entity_key, fields, data){
$('#' + wid).children().filter(function(){
return $(this).attr('selected') === undefined;
}).remove().end();
$.each(data, function(key, entry){
$('#' + wid).append(
$('<option></option>').attr('value', key).text(entry));
});
}
</script>
{% endblock %}

View file

@ -1,8 +1,11 @@
{% extends "base.html" %}
<!-- File form-districts-District.html generated 2018-07-03T23:08:20.021Z by adl.to-selmer-templates.
<!-- File form-districts-District.html generated 2018-07-05T10:14:18.436Z 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'>
@ -11,10 +14,10 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
<label for='id'>
id
</label>
{% ifmemberof admin admin %}
<input id='id' name='id' type='text' value='{{record.id}}' maxlength='' size='16'/>
{% ifmemberof admin %}
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof public admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
{% ifmemberof public admin canvassers teamorganisers issueexperts analysts issueeditors %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
@ -29,10 +32,10 @@ You are not permitted to view id of districts
<label for='name'>
name
</label>
{% ifmemberof admin admin %}
<input id='name' name='name' type='text' value='{{record.name}}' maxlength='64' size='60'/>
{% 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 admin %}
{% ifmemberof public admin canvassers teamorganisers issueexperts analysts issueeditors %}
<span id='name' name='name' class='pseudo-widget disabled'>
{{record.name}}
</span>
@ -43,19 +46,28 @@ You are not permitted to view name of districts
{% endifmemberof %}
{% endifmemberof %}
</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,8 +1,11 @@
{% extends "base.html" %}
<!-- File form-dwellings-Dwelling.html generated 2018-07-03T23:08:20.081Z by adl.to-selmer-templates.
<!-- File form-dwellings-Dwelling.html generated 2018-07-05T10:14:18.485Z 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-dwellings-Dwelling' method='POST'>
@ -12,7 +15,7 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
id
</label>
{% ifmemberof admin %}
<input id='id' name='id' type='text' value='{{record.id}}' maxlength='' size='16'/>
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
@ -30,12 +33,13 @@ You are not permitted to view id of dwellings
address_id
</label>
{% ifmemberof admin %}
<div class='select-box' farside='addresses' found='true'>
<input name='address_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='address_id' name='address_id' comment='JavaScript stuff to fix up aynchronous loading'>
<span class='select-box' farside='addresses' found='true'>
<input name='address_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-addresses?postcode=" + address_id_search_box.text + "&amp;address=" + address_id_search_box.text, null, function (data) {updateMenuOptions("address_id", "id", ["postcode", "address"], data);})'/>
<br/>
<select id='address_id' name='address_id'>
{% for r in addresses %}<option value='{{r.id}}' {% ifequal record.address_id r.id%}selected{% endifequal %}>{{r.address}} {{r.postcode}}</option>{% endfor %}
</select>
</div>
</span>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='address_id' name='address_id' class='pseudo-widget disabled'>
@ -49,36 +53,60 @@ You are not permitted to view address_id of dwellings
{% endifmemberof %}
</p>
<p class='widget'>
<label for='sub-address'>
<label for='sub_address'>
sub-address
</label>
{% ifmemberof admin %}
<input id='sub-address' name='sub-address' type='text' value='{{record.sub-address}}' maxlength='32' size='32'/>
<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 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 id='sub_address' name='sub_address' class='pseudo-widget not-authorised'>
You are not permitted to view sub_address of dwellings
</span>
{% endifmemberof %}
{% endifmemberof %}
</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'>
/**
* update the select menu with id `wid` from this `data` whose fields include
* this `entity_key` and these `fields`
*/
function updateMenuOptions(wid, entity_key, fields, data){
$('#' + wid).children().filter(function(){
return $(this).attr('selected') === undefined;
}).remove().end();
$.each(data, function(key, entry){
$('#' + wid).append(
$('<option></option>').attr('value', key).text(entry));
});
}
</script>
{% endblock %}

View file

@ -1,8 +1,11 @@
{% extends "base.html" %}
<!-- File form-electors-Elector.html generated 2018-07-03T23:08:20.055Z by adl.to-selmer-templates.
<!-- File form-electors-Elector.html generated 2018-07-05T10:14:18.465Z 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-electors-Elector' method='POST'>
@ -12,7 +15,7 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
id
</label>
{% ifmemberof admin %}
<input id='id' name='id' type='text' value='{{record.id}}' maxlength='' size='16'/>
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
@ -30,7 +33,7 @@ You are not permitted to view id of electors
name
</label>
{% ifmemberof admin %}
<input id='name' name='name' type='text' value='{{record.name}}' maxlength='64' size='60'/>
<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'>
@ -48,12 +51,13 @@ You are not permitted to view name of electors
dwelling_id
</label>
{% ifmemberof admin %}
<div class='select-box' farside='dwellings' found='true'>
<input name='dwelling_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='dwelling_id' name='dwelling_id' comment='JavaScript stuff to fix up aynchronous loading'>
<span class='select-box' farside='dwellings' found='true'>
<input name='dwelling_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-dwellings?sub-address=" + dwelling_id_search_box.text + "&amp;address_id=" + dwelling_id_search_box.text, null, function (data) {updateMenuOptions("dwelling_id", "id", ["sub-address", "address_id"], data);})'/>
<br/>
<select id='dwelling_id' name='dwelling_id'>
{% for r in dwellings %}<option value='{{r.id}}' {% ifequal record.dwelling_id r.id%}selected{% endifequal %}>{{r.address_id}} {{r.sub-address}}</option>{% endfor %}
</select>
</div>
</span>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='dwelling_id' name='dwelling_id' class='pseudo-widget disabled'>
@ -71,7 +75,7 @@ You are not permitted to view dwelling_id of electors
phone
</label>
{% ifmemberof admin %}
<input id='phone' name='phone' type='text' value='{{record.phone}}' maxlength='16' size='16'/>
<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'>
@ -89,7 +93,7 @@ You are not permitted to view phone of electors
email
</label>
{% ifmemberof admin %}
<input id='email' name='email' type='text' value='{{record.email}}' maxlength='128' size='60'/>
<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'>
@ -107,11 +111,11 @@ You are not permitted to view email of electors
gender
</label>
{% ifmemberof admin %}
<div class='select-box' farside='genders' found='true'>
<span class='select-box' farside='genders' found='true'>
<select id='gender' name='gender'>
{% for r in genders %}<option value='{{r.id}}' {% ifequal record.gender r.id%}selected{% endifequal %}>{{r.id}}</option>{% endfor %}
</select>
</div>
</span>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='gender' name='gender' class='pseudo-widget disabled'>
@ -124,19 +128,43 @@ You are not permitted to view gender of electors
{% endifmemberof %}
{% endifmemberof %}
</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'>
/**
* update the select menu with id `wid` from this `data` whose fields include
* this `entity_key` and these `fields`
*/
function updateMenuOptions(wid, entity_key, fields, data){
$('#' + wid).children().filter(function(){
return $(this).attr('selected') === undefined;
}).remove().end();
$.each(data, function(key, entry){
$('#' + wid).append(
$('<option></option>').attr('value', key).text(entry));
});
}
</script>
{% endblock %}

View file

@ -1,8 +1,12 @@
{% extends "base.html" %}
<!-- File form-followupactions-Followupaction.html generated 2018-07-03T23:08:20.084Z by adl.to-selmer-templates.
<!-- File form-followupactions-Followupaction.html generated 2018-07-05T10:14:18.488Z 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" %}
{% endblock %}
{% block content %}
<div id='content' class='edit'>
<form action='{{servlet-context}}/form-followupactions-Followupaction' method='POST'>
@ -12,7 +16,7 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
id
</label>
{% ifmemberof admin %}
<input id='id' name='id' type='text' value='{{record.id}}' maxlength='' size='16'/>
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof issueexperts canvassers analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
@ -30,12 +34,13 @@ You are not permitted to view id of followupactions
request_id
</label>
{% ifmemberof admin %}
<div class='select-box' farside='followuprequests' found='true'>
<input name='request_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='request_id' name='request_id' comment='JavaScript stuff to fix up aynchronous loading'>
<span class='select-box' farside='followuprequests' found='true'>
<input name='request_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-followuprequests?elector_id=" + request_id_search_box.text + "&amp;issue_id=" + request_id_search_box.text + "&amp;visit_id=" + request_id_search_box.text, null, function (data) {updateMenuOptions("request_id", "id", ["elector_id", "issue_id", "visit_id"], data);})'/>
<br/>
<select id='request_id' name='request_id'>
{% for r in followuprequests %}<option value='{{r.id}}' {% ifequal record.request_id r.id%}selected{% endifequal %}>{{r.elector_id}} {{r.visit_id}} {{r.issue_id}}</option>{% endfor %}
</select>
</div>
</span>
{% else %}
{% ifmemberof issueexperts canvassers analysts issueeditors admin %}
<span id='request_id' name='request_id' class='pseudo-widget disabled'>
@ -53,12 +58,13 @@ You are not permitted to view request_id of followupactions
actor
</label>
{% ifmemberof admin %}
<div class='select-box' farside='canvassers' found='true'>
<input name='actor-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='actor' name='actor' comment='JavaScript stuff to fix up aynchronous loading'>
<span class='select-box' farside='canvassers' found='true'>
<input name='actor_search_box' onchange='$.getJSON("/auto/json/seach-strings-canvassers?=" + actor_search_box.text, null, function (data) {updateMenuOptions("actor", "", [""], data);})'/>
<br/>
<select id='actor' name='actor'>
{% for r in canvassers %}<option value='{{r.id}}' {% ifequal record.actor r.id%}selected{% endifequal %}>{{r.username}} {{r.fullname}} {{r.address_id}} {{r.phone}} {{r.email}}</option>{% endfor %}
</select>
</div>
</span>
{% else %}
{% ifmemberof issueexperts canvassers analysts issueeditors admin %}
<span id='actor' name='actor' class='pseudo-widget disabled'>
@ -76,7 +82,7 @@ You are not permitted to view actor of followupactions
date
</label>
{% ifmemberof admin %}
<input id='date' name='date' type='text' value='{{record.date}}' maxlength='' size='16'/>
<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'>
@ -94,7 +100,9 @@ You are not permitted to view date of followupactions
notes
</label>
{% ifmemberof admin %}
<input id='notes' name='notes' type='text' value='{{record.notes}}' maxlength='' size='16'/>
<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'>
@ -125,19 +133,61 @@ You are not permitted to view closed of followupactions
{% endifmemberof %}
{% endifmemberof %}
</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'>
/**
* update the select menu with id `wid` from this `data` whose fields include
* this `entity_key` and these `fields`
*/
function updateMenuOptions(wid, entity_key, fields, data){
$('#' + wid).children().filter(function(){
return $(this).attr('selected') === undefined;
}).remove().end();
$.each(data, function(key, entry){
$('#' + wid).append(
$('<option></option>').attr('value', key).text(entry));
});
}
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,8 +1,11 @@
{% extends "base.html" %}
<!-- File form-followupmethods-Followupmethod.html generated 2018-07-03T23:08:20.087Z by adl.to-selmer-templates.
<!-- File form-followupmethods-Followupmethod.html generated 2018-07-05T10:14:18.491Z 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'>
@ -12,7 +15,7 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
id
</label>
{% ifmemberof admin %}
<input id='id' name='id' type='text' value='{{record.id}}' maxlength='' size='16'/>
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
@ -25,19 +28,28 @@ You are not permitted to view id of followupmethods
{% endifmemberof %}
{% endifmemberof %}
</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,8 +1,11 @@
{% extends "base.html" %}
<!-- File form-followuprequests-Followuprequest.html generated 2018-07-03T23:08:20.025Z by adl.to-selmer-templates.
<!-- File form-followuprequests-Followuprequest.html generated 2018-07-05T10:14:18.440Z 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-followuprequests-Followuprequest' method='POST'>
@ -12,7 +15,7 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
id
</label>
{% ifmemberof admin %}
<input id='id' name='id' type='text' value='{{record.id}}' maxlength='' size='16'/>
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
@ -30,12 +33,13 @@ You are not permitted to view id of followuprequests
elector_id
</label>
{% ifmemberof admin %}
<div class='select-box' farside='electors' found='true'>
<input name='elector_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='elector_id' name='elector_id' comment='JavaScript stuff to fix up aynchronous loading'>
<span class='select-box' farside='electors' found='true'>
<input name='elector_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-electors?gender=" + elector_id_search_box.text + "&amp;email=" + elector_id_search_box.text + "&amp;name=" + elector_id_search_box.text + "&amp;phone=" + elector_id_search_box.text, null, function (data) {updateMenuOptions("elector_id", "id", ["gender", "email", "name", "phone"], data);})'/>
<br/>
<select id='elector_id' name='elector_id'>
{% for r in electors %}<option value='{{r.id}}' {% ifequal record.elector_id r.id%}selected{% endifequal %}>{{r.name}} {{r.phone}} {{r.email}} {{r.gender}}</option>{% endfor %}
</select>
</div>
</span>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='elector_id' name='elector_id' class='pseudo-widget disabled'>
@ -53,12 +57,13 @@ You are not permitted to view elector_id of followuprequests
visit_id
</label>
{% ifmemberof admin %}
<div class='select-box' farside='visits' found='true'>
<input name='visit_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='visit_id' name='visit_id' comment='JavaScript stuff to fix up aynchronous loading'>
<span class='select-box' farside='visits' found='true'>
<input name='visit_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-visits?address_id=" + visit_id_search_box.text + "&amp;date=" + visit_id_search_box.text, null, function (data) {updateMenuOptions("visit_id", "id", ["address_id", "date"], data);})'/>
<br/>
<select id='visit_id' name='visit_id'>
{% for r in visits %}<option value='{{r.id}}' {% ifequal record.visit_id r.id%}selected{% endifequal %}>{{r.address_id}} {{r.date}}</option>{% endfor %}
</select>
</div>
</span>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='visit_id' name='visit_id' class='pseudo-widget disabled'>
@ -76,11 +81,11 @@ You are not permitted to view visit_id of followuprequests
issue_id
</label>
{% ifmemberof admin %}
<div class='select-box' farside='issues' found='true'>
<span class='select-box' farside='issues' found='true'>
<select id='issue_id' name='issue_id'>
{% for r in issues %}<option value='{{r.id}}' {% ifequal record.issue_id r.id%}selected{% endifequal %}>{{r.id}}</option>{% endfor %}
</select>
</div>
</span>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='issue_id' name='issue_id' class='pseudo-widget disabled'>
@ -98,11 +103,11 @@ You are not permitted to view issue_id of followuprequests
method_id
</label>
{% ifmemberof admin %}
<div class='select-box' farside='followupmethods' found='true'>
<span class='select-box' farside='followupmethods' found='true'>
<select id='method_id' name='method_id'>
{% for r in followupmethods %}<option value='{{r.id}}' {% ifequal record.method_id r.id%}selected{% endifequal %}>{{r.id}}</option>{% endfor %}
</select>
</div>
</span>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='method_id' name='method_id' class='pseudo-widget disabled'>
@ -115,19 +120,43 @@ You are not permitted to view method_id of followuprequests
{% endifmemberof %}
{% endifmemberof %}
</p>
{% ifmemberof admin %}
<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 admin %}
<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'>
/**
* update the select menu with id `wid` from this `data` whose fields include
* this `entity_key` and these `fields`
*/
function updateMenuOptions(wid, entity_key, fields, data){
$('#' + wid).children().filter(function(){
return $(this).attr('selected') === undefined;
}).remove().end();
$.each(data, function(key, entry){
$('#' + wid).append(
$('<option></option>').attr('value', key).text(entry));
});
}
</script>
{% endblock %}

View file

@ -1,8 +1,11 @@
{% extends "base.html" %}
<!-- File form-genders-Gender.html generated 2018-07-03T23:08:20.014Z by adl.to-selmer-templates.
<!-- File form-genders-Gender.html generated 2018-07-05T10:14:18.432Z 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'>
@ -12,7 +15,7 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
id
</label>
{% ifmemberof admin %}
<input id='id' name='id' type='text' value='{{record.id}}' maxlength='' size='16'/>
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
@ -25,19 +28,28 @@ You are not permitted to view id of genders
{% endifmemberof %}
{% endifmemberof %}
</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,8 +1,11 @@
{% extends "base.html" %}
<!-- File form-intentions-Intention.html generated 2018-07-03T23:08:20.075Z by adl.to-selmer-templates.
<!-- File form-intentions-Intention.html generated 2018-07-05T10:14:18.481Z 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-intentions-Intention' method='POST'>
@ -12,12 +15,13 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
visit_id
</label>
{% ifmemberof admin %}
<div class='select-box' farside='visits' found='true'>
<input name='visit_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='visit_id' name='visit_id' comment='JavaScript stuff to fix up aynchronous loading'>
<span class='select-box' farside='visits' found='true'>
<input name='visit_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-visits?address_id=" + visit_id_search_box.text + "&amp;date=" + visit_id_search_box.text, null, function (data) {updateMenuOptions("visit_id", "id", ["address_id", "date"], data);})'/>
<br/>
<select id='visit_id' name='visit_id'>
{% for r in visits %}<option value='{{r.id}}' {% ifequal record.visit_id r.id%}selected{% endifequal %}>{{r.address_id}} {{r.date}}</option>{% endfor %}
</select>
</div>
</span>
{% else %}
{% ifmemberof canvassers analysts admin %}
<span id='visit_id' name='visit_id' class='pseudo-widget disabled'>
@ -35,12 +39,13 @@ You are not permitted to view visit_id of intentions
elector_id
</label>
{% ifmemberof admin %}
<div class='select-box' farside='electors' found='true'>
<input name='elector_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='elector_id' name='elector_id' comment='JavaScript stuff to fix up aynchronous loading'>
<span class='select-box' farside='electors' found='true'>
<input name='elector_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-electors?gender=" + elector_id_search_box.text + "&amp;email=" + elector_id_search_box.text + "&amp;name=" + elector_id_search_box.text + "&amp;phone=" + elector_id_search_box.text, null, function (data) {updateMenuOptions("elector_id", "id", ["gender", "email", "name", "phone"], data);})'/>
<br/>
<select id='elector_id' name='elector_id'>
{% for r in electors %}<option value='{{r.id}}' {% ifequal record.elector_id r.id%}selected{% endifequal %}>{{r.name}} {{r.phone}} {{r.email}} {{r.gender}}</option>{% endfor %}
</select>
</div>
</span>
{% else %}
{% ifmemberof canvassers analysts admin %}
<span id='elector_id' name='elector_id' class='pseudo-widget disabled'>
@ -58,11 +63,11 @@ You are not permitted to view elector_id of intentions
option_id
</label>
{% ifmemberof admin %}
<div class='select-box' farside='options' found='true'>
<span class='select-box' farside='options' found='true'>
<select id='option_id' name='option_id'>
{% for r in options %}<option value='{{r.id}}' {% ifequal record.option_id r.id%}selected{% endifequal %}>{{r.id}}</option>{% endfor %}
</select>
</div>
</span>
{% else %}
{% ifmemberof canvassers analysts admin %}
<span id='option_id' name='option_id' class='pseudo-widget disabled'>
@ -93,19 +98,43 @@ You are not permitted to view locality of intentions
{% endifmemberof %}
{% endifmemberof %}
</p>
{% ifmemberof admin %}
<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 admin %}
<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'>
/**
* update the select menu with id `wid` from this `data` whose fields include
* this `entity_key` and these `fields`
*/
function updateMenuOptions(wid, entity_key, fields, data){
$('#' + wid).children().filter(function(){
return $(this).attr('selected') === undefined;
}).remove().end();
$.each(data, function(key, entry){
$('#' + wid).append(
$('<option></option>').attr('value', key).text(entry));
});
}
</script>
{% endblock %}

View file

@ -1,8 +1,12 @@
{% extends "base.html" %}
<!-- File form-issues-Issue.html generated 2018-07-03T23:08:20.039Z by adl.to-selmer-templates.
<!-- File form-issues-Issue.html generated 2018-07-05T10:14:18.452Z 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" %}
{% endblock %}
{% block content %}
<div id='content' class='edit'>
<form action='{{servlet-context}}/form-issues-Issue' method='POST'>
@ -12,7 +16,7 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
id
</label>
{% ifmemberof issueeditors admin %}
<input id='id' name='id' type='text' value='{{record.id}}' maxlength='' size='16'/>
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
@ -30,7 +34,7 @@ You are not permitted to view id of issues
url
</label>
{% ifmemberof issueeditors admin %}
<input id='url' name='url' type='text' value='{{record.url}}' maxlength='256' size='60'/>
<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'>
@ -66,7 +70,9 @@ You are not permitted to view current of issues
brief
</label>
{% ifmemberof issueeditors admin %}
<input id='brief' name='brief' type='text' value='{{record.brief}}' maxlength='' size='16'/>
<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'>
@ -79,19 +85,46 @@ You are not permitted to view brief of issues
{% endifmemberof %}
{% endifmemberof %}
</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,8 +1,11 @@
{% extends "base.html" %}
<!-- File form-options-Option.html generated 2018-07-03T23:08:20.074Z by adl.to-selmer-templates.
<!-- File form-options-Option.html generated 2018-07-05T10:14:18.481Z 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'>
@ -12,7 +15,7 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
id
</label>
{% ifmemberof admin %}
<input id='id' name='id' type='text' value='{{record.id}}' maxlength='' size='16'/>
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
@ -25,19 +28,28 @@ You are not permitted to view id of options
{% endifmemberof %}
{% endifmemberof %}
</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,8 +1,11 @@
{% extends "base.html" %}
<!-- File form-roles-Role.html generated 2018-07-03T23:08:20.042Z by adl.to-selmer-templates.
<!-- File form-roles-Role.html generated 2018-07-05T10:14:18.454Z 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-roles-Role' method='POST'>
@ -12,7 +15,7 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
id
</label>
{% ifmemberof admin %}
<input id='id' name='id' type='text' value='{{record.id}}' maxlength='' size='16'/>
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
@ -30,7 +33,7 @@ You are not permitted to view id of roles
name
</label>
{% ifmemberof admin %}
<input id='name' name='name' type='text' value='{{record.name}}' maxlength='64' size='60'/>
<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'>
@ -48,12 +51,13 @@ You are not permitted to view name of roles
members
</label>
{% ifmemberof admin %}
<div class='select-box' farside='canvassers' found='true'>
<input name='members-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='members' name='members' multiple='multiple' comment='JavaScript stuff to fix up aynchronous loading'>
<span class='select-box' farside='canvassers' found='true'>
<input name='members_search_box' onchange='$.getJSON("/auto/json/seach-strings-canvassers?=" + members_search_box.text, null, function (data) {updateMenuOptions("members", "", [""], data);})'/>
<br/>
<select id='members' name='members' multiple='multiple'>
{% for r in canvassers %}<option value='{{r.id}}' {% ifequal record.members r.id%}selected{% endifequal %}>{{r.username}} {{r.fullname}} {{r.address_id}} {{r.phone}} {{r.email}}</option>{% endfor %}
</select>
</div>
</span>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='members' name='members' class='pseudo-widget disabled'>
@ -66,19 +70,43 @@ You are not permitted to view members of roles
{% endifmemberof %}
{% endifmemberof %}
</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'>
/**
* update the select menu with id `wid` from this `data` whose fields include
* this `entity_key` and these `fields`
*/
function updateMenuOptions(wid, entity_key, fields, data){
$('#' + wid).children().filter(function(){
return $(this).attr('selected') === undefined;
}).remove().end();
$.each(data, function(key, entry){
$('#' + wid).append(
$('<option></option>').attr('value', key).text(entry));
});
}
</script>
{% endblock %}

View file

@ -1,8 +1,11 @@
{% extends "base.html" %}
<!-- File form-teams-Team.html generated 2018-07-03T23:08:20.050Z by adl.to-selmer-templates.
<!-- File form-teams-Team.html generated 2018-07-05T10:14:18.461Z 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-teams-Team' method='POST'>
@ -12,9 +15,9 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
id
</label>
{% ifmemberof teamorganisers admin teamorganisers admin %}
<input id='id' name='id' type='text' value='{{record.id}}' maxlength='' size='16'/>
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
@ -30,9 +33,9 @@ You are not permitted to view id of teams
name
</label>
{% ifmemberof teamorganisers admin teamorganisers admin %}
<input id='name' name='name' type='text' value='{{record.name}}' maxlength='64' size='60'/>
<input id='name' name='name' type='string' value='{{record.name}}' maxlength='64' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
<span id='name' name='name' class='pseudo-widget disabled'>
{{record.name}}
</span>
@ -48,14 +51,15 @@ You are not permitted to view name of teams
district_id
</label>
{% ifmemberof teamorganisers admin teamorganisers admin %}
<div class='select-box' farside='districts' found='true'>
<input name='district_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='district_id' name='district_id' comment='JavaScript stuff to fix up aynchronous loading'>
<span class='select-box' farside='districts' found='true'>
<input name='district_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-districts?name=" + district_id_search_box.text, null, function (data) {updateMenuOptions("district_id", "id", ["name"], data);})'/>
<br/>
<select id='district_id' name='district_id'>
{% for r in districts %}<option value='{{r.id}}' {% ifequal record.district_id r.id%}selected{% endifequal %}>{{r.name}}</option>{% endfor %}
</select>
</div>
</span>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
<span id='district_id' name='district_id' class='pseudo-widget disabled'>
{{record.district_id}}
</span>
@ -73,7 +77,7 @@ 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 canvassers teamorganisers issueexperts analysts issueeditors admin %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
<span id='latitude' name='latitude' class='pseudo-widget disabled'>
{{record.latitude}}
</span>
@ -89,14 +93,15 @@ You are not permitted to view latitude of teams
members
</label>
{% ifmemberof teamorganisers admin teamorganisers admin %}
<div class='select-box' farside='canvassers' found='true'>
<input name='members-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='members' name='members' multiple='multiple' comment='JavaScript stuff to fix up aynchronous loading'>
<span class='select-box' farside='canvassers' found='true'>
<input name='members_search_box' onchange='$.getJSON("/auto/json/seach-strings-canvassers?=" + members_search_box.text, null, function (data) {updateMenuOptions("members", "", [""], data);})'/>
<br/>
<select id='members' name='members' multiple='multiple'>
{% for r in canvassers %}<option value='{{r.id}}' {% ifequal record.members r.id%}selected{% endifequal %}>{{r.username}} {{r.fullname}} {{r.address_id}} {{r.phone}} {{r.email}}</option>{% endfor %}
</select>
</div>
</span>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
<span id='members' name='members' class='pseudo-widget disabled'>
{{record.members}}
</span>
@ -112,14 +117,15 @@ You are not permitted to view members of teams
organisers
</label>
{% ifmemberof teamorganisers admin teamorganisers admin %}
<div class='select-box' farside='canvassers' found='true'>
<input name='organisers-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='organisers' name='organisers' multiple='multiple' comment='JavaScript stuff to fix up aynchronous loading'>
<span class='select-box' farside='canvassers' found='true'>
<input name='organisers_search_box' onchange='$.getJSON("/auto/json/seach-strings-canvassers?=" + organisers_search_box.text, null, function (data) {updateMenuOptions("organisers", "", [""], data);})'/>
<br/>
<select id='organisers' name='organisers' multiple='multiple'>
{% for r in canvassers %}<option value='{{r.id}}' {% ifequal record.organisers r.id%}selected{% endifequal %}>{{r.username}} {{r.fullname}} {{r.address_id}} {{r.phone}} {{r.email}}</option>{% endfor %}
</select>
</div>
</span>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
<span id='organisers' name='organisers' class='pseudo-widget disabled'>
{{record.organisers}}
</span>
@ -137,7 +143,7 @@ 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 canvassers teamorganisers issueexperts analysts issueeditors admin %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
<span id='longitude' name='longitude' class='pseudo-widget disabled'>
{{record.longitude}}
</span>
@ -148,19 +154,43 @@ You are not permitted to view longitude of teams
{% endifmemberof %}
{% endifmemberof %}
</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>
{% endblock %}
{% block extra-tail %}
<script type='text/javascript'>
/**
* update the select menu with id `wid` from this `data` whose fields include
* this `entity_key` and these `fields`
*/
function updateMenuOptions(wid, entity_key, fields, data){
$('#' + wid).children().filter(function(){
return $(this).attr('selected') === undefined;
}).remove().end();
$.each(data, function(key, entry){
$('#' + wid).append(
$('<option></option>').attr('value', key).text(entry));
});
}
</script>
{% endblock %}

View file

@ -1,8 +1,11 @@
{% extends "base.html" %}
<!-- File form-visits-Visit.html generated 2018-07-03T23:08:20.046Z by adl.to-selmer-templates.
<!-- File form-visits-Visit.html generated 2018-07-05T10:14:18.457Z 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-visits-Visit' method='POST'>
@ -11,10 +14,10 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
<label for='id'>
id
</label>
{% ifmemberof admin admin %}
<input id='id' name='id' type='text' value='{{record.id}}' maxlength='' size='16'/>
{% ifmemberof admin %}
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
@ -29,15 +32,16 @@ You are not permitted to view id of visits
<label for='address_id'>
address_id
</label>
{% ifmemberof admin admin %}
<div class='select-box' farside='addresses' found='true'>
<input name='address_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='address_id' name='address_id' comment='JavaScript stuff to fix up aynchronous loading'>
{% ifmemberof admin %}
<span class='select-box' farside='addresses' found='true'>
<input name='address_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-addresses?postcode=" + address_id_search_box.text + "&amp;address=" + address_id_search_box.text, null, function (data) {updateMenuOptions("address_id", "id", ["postcode", "address"], data);})'/>
<br/>
<select id='address_id' name='address_id'>
{% for r in addresses %}<option value='{{r.id}}' {% ifequal record.address_id r.id%}selected{% endifequal %}>{{r.address}} {{r.postcode}}</option>{% endfor %}
</select>
</div>
</span>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers %}
<span id='address_id' name='address_id' class='pseudo-widget disabled'>
{{record.address_id}}
</span>
@ -52,15 +56,16 @@ You are not permitted to view address_id of visits
<label for='canvasser_id'>
canvasser_id
</label>
{% ifmemberof admin admin %}
<div class='select-box' farside='canvassers' found='true'>
<input name='canvasser_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='canvasser_id' name='canvasser_id' comment='JavaScript stuff to fix up aynchronous loading'>
{% ifmemberof admin %}
<span class='select-box' farside='canvassers' found='true'>
<input name='canvasser_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-canvassers?=" + canvasser_id_search_box.text, null, function (data) {updateMenuOptions("canvasser_id", "", [""], data);})'/>
<br/>
<select id='canvasser_id' name='canvasser_id'>
{% for r in canvassers %}<option value='{{r.id}}' {% ifequal record.canvasser_id r.id%}selected{% endifequal %}>{{r.username}} {{r.fullname}} {{r.address_id}} {{r.phone}} {{r.email}}</option>{% endfor %}
</select>
</div>
</span>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers %}
<span id='canvasser_id' name='canvasser_id' class='pseudo-widget disabled'>
{{record.canvasser_id}}
</span>
@ -75,10 +80,10 @@ You are not permitted to view canvasser_id of visits
<label for='date'>
date
</label>
{% ifmemberof admin admin %}
<input id='date' name='date' type='text' value='{{record.date}}' maxlength='' size='16'/>
{% 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 issueexperts analysts issueeditors admin %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers %}
<span id='date' name='date' class='pseudo-widget disabled'>
{{record.date}}
</span>
@ -89,19 +94,43 @@ You are not permitted to view date of visits
{% endifmemberof %}
{% endifmemberof %}
</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'>
/**
* update the select menu with id `wid` from this `data` whose fields include
* this `entity_key` and these `fields`
*/
function updateMenuOptions(wid, entity_key, fields, data){
$('#' + wid).children().filter(function(){
return $(this).attr('selected') === undefined;
}).remove().end();
$.each(data, function(key, entry){
$('#' + wid).append(
$('<option></option>').attr('value', key).text(entry));
});
}
</script>
{% endblock %}

View file

@ -1,15 +1,46 @@
{% extends "base.html" %}
<!-- File list-addresses-Addresses.html generated 2018-07-03T23:08:20.064Z by adl.to-selmer-templates.
<!-- File list-addresses-Addresses.html generated 2018-07-05T10:14:18.471Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %}
<form id='content' class='list'>
{% block back-links %}
<div>
<div class='back-link-container'>
{% ifequal params.offset "0" %}
<a id='back-link' class='back-link' href='{{servlet-context}}/admin'>
Back
</a>
{% else %}
<a id='prev-selector' class='back-link'>
Previous
</a>
{% endifunequal %}
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a href='form-addresses-Address'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof admin %}
<div class='big-link-container'>
<a href='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' type='hidden' value='{{params.offset|default:0}}'/>
<input id='limit' type='hidden' value='{{params.limit|default:50}}'/>
<table caption='addresses'>
<thead>
<tr>
@ -34,6 +65,9 @@ latitude
<th>
longitude
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
@ -58,7 +92,7 @@ longitude
<input id='longitude' type='number' name='longitude' value='{{ params.longitude }}'/>
</th>
<th>
<input type='submit' id='search' value='Search'/>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
@ -96,15 +130,30 @@ View
</tr>
{% endfor %}
</tbody>
<tfoot>
<div class='back-link-container'>
<input id='page' name='page' disabled='{% ifequal offset 0 %} false {% else %} true {% endifequal %}' value='Previous'/>
</div>
<div class='big-link-container'>
<input id='page' name='page' disabled='false' value='Next'/>
</div>
</tfoot>
</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';
});
{% ifunequal params.offset "0" %}
document.getElementById('prev-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endifunequal %}
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,15 +1,46 @@
{% extends "base.html" %}
<!-- File list-authorities-Authorities.html generated 2018-07-03T23:08:20.023Z by adl.to-selmer-templates.
<!-- File list-authorities-Authorities.html generated 2018-07-05T10:14:18.439Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %}
<form id='content' class='list'>
{% block back-links %}
<div>
<div class='back-link-container'>
{% ifequal params.offset "0" %}
<a id='back-link' class='back-link' href='{{servlet-context}}/admin'>
Back
</a>
{% else %}
<a id='prev-selector' class='back-link'>
Previous
</a>
{% endifunequal %}
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a href='form-authorities-Authority'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof admin %}
<div class='big-link-container'>
<a href='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' type='hidden' value='{{params.offset|default:0}}'/>
<input id='limit' type='hidden' value='{{params.limit|default:50}}'/>
<table caption='authorities'>
<thead>
<tr>
@ -25,6 +56,9 @@ access-token-uri
<th>
authorize-uri
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
@ -40,7 +74,7 @@ authorize-uri
<input id='authorize_uri' type='text' name='authorize_uri' value='{{ params.authorize_uri }}'/>
</th>
<th>
<input type='submit' id='search' value='Search'/>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
@ -67,15 +101,30 @@ View
</tr>
{% endfor %}
</tbody>
<tfoot>
<div class='back-link-container'>
<input id='page' name='page' disabled='{% ifequal offset 0 %} false {% else %} true {% endifequal %}' value='Previous'/>
</div>
<div class='big-link-container'>
<input id='page' name='page' disabled='false' value='Next'/>
</div>
</tfoot>
</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';
});
{% ifunequal params.offset "0" %}
document.getElementById('prev-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endifunequal %}
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,15 +1,46 @@
{% extends "base.html" %}
<!-- File list-canvassers-Canvassers.html generated 2018-07-03T23:08:20.079Z by adl.to-selmer-templates.
<!-- File list-canvassers-Canvassers.html generated 2018-07-05T10:14:18.485Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %}
<form id='content' class='list'>
{% block back-links %}
<div>
<div class='back-link-container'>
{% ifequal params.offset "0" %}
<a id='back-link' class='back-link' href='{{servlet-context}}/admin'>
Back
</a>
{% else %}
<a id='prev-selector' class='back-link'>
Previous
</a>
{% endifunequal %}
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a href='form-canvassers-Canvasser'>
<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='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' type='hidden' value='{{params.offset|default:0}}'/>
<input id='limit' type='hidden' value='{{params.limit|default:50}}'/>
<table caption='canvassers'>
<thead>
<tr>
@ -40,6 +71,9 @@ authority_id
<th>
authorised
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
@ -70,7 +104,7 @@ authorised
<input id='authorised' type='text' name='authorised' value='{{ params.authorised }}'/>
</th>
<th>
<input type='submit' id='search' value='Search'/>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
@ -118,15 +152,30 @@ View
</tr>
{% endfor %}
</tbody>
<tfoot>
<div class='back-link-container'>
<input id='page' name='page' disabled='{% ifequal offset 0 %} false {% else %} true {% endifequal %}' value='Previous'/>
</div>
<div class='big-link-container'>
<input id='page' name='page' disabled='false' value='Next'/>
</div>
</tfoot>
</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';
});
{% ifunequal params.offset "0" %}
document.getElementById('prev-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endifunequal %}
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,15 +1,46 @@
{% extends "base.html" %}
<!-- File list-districts-Districts.html generated 2018-07-03T23:08:20.072Z by adl.to-selmer-templates.
<!-- File list-districts-Districts.html generated 2018-07-05T10:14:18.479Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %}
<form id='content' class='list'>
{% block back-links %}
<div>
<div class='back-link-container'>
{% ifequal params.offset "0" %}
<a id='back-link' class='back-link' href='{{servlet-context}}/admin'>
Back
</a>
{% else %}
<a id='prev-selector' class='back-link'>
Previous
</a>
{% endifunequal %}
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a href='form-districts-District'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof admin %}
<div class='big-link-container'>
<a href='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' type='hidden' value='{{params.offset|default:0}}'/>
<input id='limit' type='hidden' value='{{params.limit|default:50}}'/>
<table caption='districts'>
<thead>
<tr>
@ -19,6 +50,9 @@ id
<th>
name
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
@ -28,7 +62,7 @@ name
<input id='name' type='text' name='name' value='{{ params.name }}'/>
</th>
<th>
<input type='submit' id='search' value='Search'/>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
@ -49,15 +83,30 @@ View
</tr>
{% endfor %}
</tbody>
<tfoot>
<div class='back-link-container'>
<input id='page' name='page' disabled='{% ifequal offset 0 %} false {% else %} true {% endifequal %}' value='Previous'/>
</div>
<div class='big-link-container'>
<input id='page' name='page' disabled='false' value='Next'/>
</div>
</tfoot>
</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';
});
{% ifunequal params.offset "0" %}
document.getElementById('prev-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endifunequal %}
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,15 +1,46 @@
{% extends "base.html" %}
<!-- File list-dwellings-Dwellings.html generated 2018-07-03T23:08:20.059Z by adl.to-selmer-templates.
<!-- File list-dwellings-Dwellings.html generated 2018-07-05T10:14:18.468Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %}
<form id='content' class='list'>
{% block back-links %}
<div>
<div class='back-link-container'>
{% ifequal params.offset "0" %}
<a id='back-link' class='back-link' href='{{servlet-context}}/admin'>
Back
</a>
{% else %}
<a id='prev-selector' class='back-link'>
Previous
</a>
{% endifunequal %}
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a href='form-dwellings-Dwelling'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof admin %}
<div class='big-link-container'>
<a href='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' type='hidden' value='{{params.offset|default:0}}'/>
<input id='limit' type='hidden' value='{{params.limit|default:50}}'/>
<table caption='dwellings'>
<thead>
<tr>
@ -22,6 +53,9 @@ address_id
<th>
sub-address
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
@ -34,7 +68,7 @@ sub-address
<input id='sub_address' type='text' name='sub_address' value='{{ params.sub_address }}'/>
</th>
<th>
<input type='submit' id='search' value='Search'/>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
@ -60,15 +94,30 @@ View
</tr>
{% endfor %}
</tbody>
<tfoot>
<div class='back-link-container'>
<input id='page' name='page' disabled='{% ifequal offset 0 %} false {% else %} true {% endifequal %}' value='Previous'/>
</div>
<div class='big-link-container'>
<input id='page' name='page' disabled='false' value='Next'/>
</div>
</tfoot>
</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';
});
{% ifunequal params.offset "0" %}
document.getElementById('prev-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endifunequal %}
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,15 +1,46 @@
{% extends "base.html" %}
<!-- File list-electors-Electors.html generated 2018-07-03T23:08:20.038Z by adl.to-selmer-templates.
<!-- File list-electors-Electors.html generated 2018-07-05T10:14:18.451Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %}
<form id='content' class='list'>
{% block back-links %}
<div>
<div class='back-link-container'>
{% ifequal params.offset "0" %}
<a id='back-link' class='back-link' href='{{servlet-context}}/admin'>
Back
</a>
{% else %}
<a id='prev-selector' class='back-link'>
Previous
</a>
{% endifunequal %}
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a href='form-electors-Elector'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof admin %}
<div class='big-link-container'>
<a href='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' type='hidden' value='{{params.offset|default:0}}'/>
<input id='limit' type='hidden' value='{{params.limit|default:50}}'/>
<table caption='electors'>
<thead>
<tr>
@ -31,6 +62,9 @@ email
<th>
gender
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
@ -52,7 +86,7 @@ gender
<input id='gender_expanded' type='text' name='gender_expanded' value='{{ params.gender_expanded }}'/>
</th>
<th>
<input type='submit' id='search' value='Search'/>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
@ -89,15 +123,30 @@ View
</tr>
{% endfor %}
</tbody>
<tfoot>
<div class='back-link-container'>
<input id='page' name='page' disabled='{% ifequal offset 0 %} false {% else %} true {% endifequal %}' value='Previous'/>
</div>
<div class='big-link-container'>
<input id='page' name='page' disabled='false' value='Next'/>
</div>
</tfoot>
</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';
});
{% ifunequal params.offset "0" %}
document.getElementById('prev-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endifunequal %}
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,15 +1,46 @@
{% extends "base.html" %}
<!-- File list-followupactions-Followupactions.html generated 2018-07-03T23:08:20.078Z by adl.to-selmer-templates.
<!-- File list-followupactions-Followupactions.html generated 2018-07-05T10:14:18.484Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %}
<form id='content' class='list'>
{% block back-links %}
<div>
<div class='back-link-container'>
{% ifequal params.offset "0" %}
<a id='back-link' class='back-link' href='{{servlet-context}}/admin'>
Back
</a>
{% else %}
<a id='prev-selector' class='back-link'>
Previous
</a>
{% endifunequal %}
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a href='form-followupactions-Followupaction'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof admin %}
<div class='big-link-container'>
<a href='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' type='hidden' value='{{params.offset|default:0}}'/>
<input id='limit' type='hidden' value='{{params.limit|default:50}}'/>
<table caption='followupactions'>
<thead>
<tr>
@ -31,6 +62,9 @@ notes
<th>
closed
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
@ -52,7 +86,7 @@ closed
<input id='closed' type='text' name='closed' value='{{ params.closed }}'/>
</th>
<th>
<input type='submit' id='search' value='Search'/>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
@ -89,15 +123,30 @@ View
</tr>
{% endfor %}
</tbody>
<tfoot>
<div class='back-link-container'>
<input id='page' name='page' disabled='{% ifequal offset 0 %} false {% else %} true {% endifequal %}' value='Previous'/>
</div>
<div class='big-link-container'>
<input id='page' name='page' disabled='false' value='Next'/>
</div>
</tfoot>
</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';
});
{% ifunequal params.offset "0" %}
document.getElementById('prev-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endifunequal %}
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,28 +1,62 @@
{% extends "base.html" %}
<!-- File list-followupmethods-Followupmethods.html generated 2018-07-03T23:08:20.045Z by adl.to-selmer-templates.
<!-- File list-followupmethods-Followupmethods.html generated 2018-07-05T10:14:18.456Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %}
<form id='content' class='list'>
{% block back-links %}
<div>
<div class='back-link-container'>
{% ifequal params.offset "0" %}
<a id='back-link' class='back-link' href='{{servlet-context}}/admin'>
Back
</a>
{% else %}
<a id='prev-selector' class='back-link'>
Previous
</a>
{% endifunequal %}
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a href='form-followupmethods-Followupmethod'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof admin %}
<div class='big-link-container'>
<a href='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' type='hidden' value='{{params.offset|default:0}}'/>
<input id='limit' type='hidden' 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' value='Search'/>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
@ -40,15 +74,30 @@ View
</tr>
{% endfor %}
</tbody>
<tfoot>
<div class='back-link-container'>
<input id='page' name='page' disabled='{% ifequal offset 0 %} false {% else %} true {% endifequal %}' value='Previous'/>
</div>
<div class='big-link-container'>
<input id='page' name='page' disabled='false' value='Next'/>
</div>
</tfoot>
</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';
});
{% ifunequal params.offset "0" %}
document.getElementById('prev-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endifunequal %}
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,15 +1,46 @@
{% extends "base.html" %}
<!-- File list-followuprequests-Followuprequests.html generated 2018-07-03T23:08:20.018Z by adl.to-selmer-templates.
<!-- File list-followuprequests-Followuprequests.html generated 2018-07-05T10:14:18.434Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %}
<form id='content' class='list'>
{% block back-links %}
<div>
<div class='back-link-container'>
{% ifequal params.offset "0" %}
<a id='back-link' class='back-link' href='{{servlet-context}}/admin'>
Back
</a>
{% else %}
<a id='prev-selector' class='back-link'>
Previous
</a>
{% endifunequal %}
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a href='form-followuprequests-Followuprequest'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof admin %}
<div class='big-link-container'>
<a href='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' type='hidden' value='{{params.offset|default:0}}'/>
<input id='limit' type='hidden' value='{{params.limit|default:50}}'/>
<table caption='followuprequests'>
<thead>
<tr>
@ -28,6 +59,9 @@ issue_id
<th>
method_id
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
@ -46,7 +80,7 @@ method_id
<input id='method_id_expanded' type='text' name='method_id_expanded' value='{{ params.method_id_expanded }}'/>
</th>
<th>
<input type='submit' id='search' value='Search'/>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
@ -84,15 +118,30 @@ View
</tr>
{% endfor %}
</tbody>
<tfoot>
<div class='back-link-container'>
<input id='page' name='page' disabled='{% ifequal offset 0 %} false {% else %} true {% endifequal %}' value='Previous'/>
</div>
<div class='big-link-container'>
<input id='page' name='page' disabled='false' value='Next'/>
</div>
</tfoot>
</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';
});
{% ifunequal params.offset "0" %}
document.getElementById('prev-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endifunequal %}
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,28 +1,62 @@
{% extends "base.html" %}
<!-- File list-genders-Genders.html generated 2018-07-03T23:08:20.008Z by adl.to-selmer-templates.
<!-- File list-genders-Genders.html generated 2018-07-05T10:14:18.428Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %}
<form id='content' class='list'>
{% block back-links %}
<div>
<div class='back-link-container'>
{% ifequal params.offset "0" %}
<a id='back-link' class='back-link' href='{{servlet-context}}/admin'>
Back
</a>
{% else %}
<a id='prev-selector' class='back-link'>
Previous
</a>
{% endifunequal %}
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a href='form-genders-Gender'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof admin %}
<div class='big-link-container'>
<a href='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' type='hidden' value='{{params.offset|default:0}}'/>
<input id='limit' type='hidden' 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' value='Search'/>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
@ -40,15 +74,30 @@ View
</tr>
{% endfor %}
</tbody>
<tfoot>
<div class='back-link-container'>
<input id='page' name='page' disabled='{% ifequal offset 0 %} false {% else %} true {% endifequal %}' value='Previous'/>
</div>
<div class='big-link-container'>
<input id='page' name='page' disabled='false' value='Next'/>
</div>
</tfoot>
</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';
});
{% ifunequal params.offset "0" %}
document.getElementById('prev-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endifunequal %}
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,15 +1,46 @@
{% extends "base.html" %}
<!-- File list-intentions-Intentions.html generated 2018-07-03T23:08:20.083Z by adl.to-selmer-templates.
<!-- File list-intentions-Intentions.html generated 2018-07-05T10:14:18.487Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %}
<form id='content' class='list'>
{% block back-links %}
<div>
<div class='back-link-container'>
{% ifequal params.offset "0" %}
<a id='back-link' class='back-link' href='{{servlet-context}}/admin'>
Back
</a>
{% else %}
<a id='prev-selector' class='back-link'>
Previous
</a>
{% endifunequal %}
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a href='form-intentions-Intention'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof admin %}
<div class='big-link-container'>
<a href='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' type='hidden' value='{{params.offset|default:0}}'/>
<input id='limit' type='hidden' value='{{params.limit|default:50}}'/>
<table caption='intentions'>
<thead>
<tr>
@ -25,6 +56,9 @@ option_id
<th>
locality
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
@ -40,7 +74,7 @@ locality
<input id='locality' type='number' name='locality' value='{{ params.locality }}'/>
</th>
<th>
<input type='submit' id='search' value='Search'/>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
@ -73,15 +107,30 @@ View
</tr>
{% endfor %}
</tbody>
<tfoot>
<div class='back-link-container'>
<input id='page' name='page' disabled='{% ifequal offset 0 %} false {% else %} true {% endifequal %}' value='Previous'/>
</div>
<div class='big-link-container'>
<input id='page' name='page' disabled='false' value='Next'/>
</div>
</tfoot>
</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';
});
{% ifunequal params.offset "0" %}
document.getElementById('prev-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endifunequal %}
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,15 +1,46 @@
{% extends "base.html" %}
<!-- File list-issues-Issues.html generated 2018-07-03T23:08:20.073Z by adl.to-selmer-templates.
<!-- File list-issues-Issues.html generated 2018-07-05T10:14:18.480Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %}
<form id='content' class='list'>
{% block back-links %}
<div>
<div class='back-link-container'>
{% ifequal params.offset "0" %}
<a id='back-link' class='back-link' href='{{servlet-context}}/admin'>
Back
</a>
{% else %}
<a id='prev-selector' class='back-link'>
Previous
</a>
{% endifunequal %}
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a href='form-issues-Issue'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof issueeditors admin %}
<div class='big-link-container'>
<a href='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' type='hidden' value='{{params.offset|default:0}}'/>
<input id='limit' type='hidden' value='{{params.limit|default:50}}'/>
<table caption='issues'>
<thead>
<tr>
@ -25,6 +56,9 @@ current
<th>
brief
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
@ -40,7 +74,7 @@ brief
<input id='brief' type='text' name='brief' value='{{ params.brief }}'/>
</th>
<th>
<input type='submit' id='search' value='Search'/>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
@ -67,15 +101,30 @@ View
</tr>
{% endfor %}
</tbody>
<tfoot>
<div class='back-link-container'>
<input id='page' name='page' disabled='{% ifequal offset 0 %} false {% else %} true {% endifequal %}' value='Previous'/>
</div>
<div class='big-link-container'>
<input id='page' name='page' disabled='false' value='Next'/>
</div>
</tfoot>
</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';
});
{% ifunequal params.offset "0" %}
document.getElementById('prev-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endifunequal %}
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,28 +1,62 @@
{% extends "base.html" %}
<!-- File list-options-Options.html generated 2018-07-03T23:08:20.020Z by adl.to-selmer-templates.
<!-- File list-options-Options.html generated 2018-07-05T10:14:18.435Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %}
<form id='content' class='list'>
{% block back-links %}
<div>
<div class='back-link-container'>
{% ifequal params.offset "0" %}
<a id='back-link' class='back-link' href='{{servlet-context}}/admin'>
Back
</a>
{% else %}
<a id='prev-selector' class='back-link'>
Previous
</a>
{% endifunequal %}
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a href='form-options-Option'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof admin %}
<div class='big-link-container'>
<a href='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' type='hidden' value='{{params.offset|default:0}}'/>
<input id='limit' type='hidden' 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' value='Search'/>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
@ -40,15 +74,30 @@ View
</tr>
{% endfor %}
</tbody>
<tfoot>
<div class='back-link-container'>
<input id='page' name='page' disabled='{% ifequal offset 0 %} false {% else %} true {% endifequal %}' value='Previous'/>
</div>
<div class='big-link-container'>
<input id='page' name='page' disabled='false' value='Next'/>
</div>
</tfoot>
</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';
});
{% ifunequal params.offset "0" %}
document.getElementById('prev-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endifunequal %}
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,15 +1,46 @@
{% extends "base.html" %}
<!-- File list-roles-Roles.html generated 2018-07-03T23:08:20.044Z by adl.to-selmer-templates.
<!-- File list-roles-Roles.html generated 2018-07-05T10:14:18.456Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %}
<form id='content' class='list'>
{% block back-links %}
<div>
<div class='back-link-container'>
{% ifequal params.offset "0" %}
<a id='back-link' class='back-link' href='{{servlet-context}}/admin'>
Back
</a>
{% else %}
<a id='prev-selector' class='back-link'>
Previous
</a>
{% endifunequal %}
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a href='form-roles-Role'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof admin %}
<div class='big-link-container'>
<a href='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' type='hidden' value='{{params.offset|default:0}}'/>
<input id='limit' type='hidden' value='{{params.limit|default:50}}'/>
<table caption='roles'>
<thead>
<tr>
@ -19,6 +50,9 @@ id
<th>
name
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
@ -28,7 +62,7 @@ name
<input id='name' type='text' name='name' value='{{ params.name }}'/>
</th>
<th>
<input type='submit' id='search' value='Search'/>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
@ -49,15 +83,30 @@ View
</tr>
{% endfor %}
</tbody>
<tfoot>
<div class='back-link-container'>
<input id='page' name='page' disabled='{% ifequal offset 0 %} false {% else %} true {% endifequal %}' value='Previous'/>
</div>
<div class='big-link-container'>
<input id='page' name='page' disabled='false' value='Next'/>
</div>
</tfoot>
</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';
});
{% ifunequal params.offset "0" %}
document.getElementById('prev-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endifunequal %}
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,15 +1,46 @@
{% extends "base.html" %}
<!-- File list-teams-Teams.html generated 2018-07-03T23:08:20.012Z by adl.to-selmer-templates.
<!-- File list-teams-Teams.html generated 2018-07-05T10:14:18.431Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %}
<form id='content' class='list'>
{% block back-links %}
<div>
<div class='back-link-container'>
{% ifequal params.offset "0" %}
<a id='back-link' class='back-link' href='{{servlet-context}}/admin'>
Back
</a>
{% else %}
<a id='prev-selector' class='back-link'>
Previous
</a>
{% endifunequal %}
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a href='form-teams-Team'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof teamorganisers admin teamorganisers admin %}
<div class='big-link-container'>
<a href='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' type='hidden' value='{{params.offset|default:0}}'/>
<input id='limit' type='hidden' value='{{params.limit|default:50}}'/>
<table caption='teams'>
<thead>
<tr>
@ -28,6 +59,9 @@ latitude
<th>
longitude
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
@ -46,7 +80,7 @@ longitude
<input id='longitude' type='number' name='longitude' value='{{ params.longitude }}'/>
</th>
<th>
<input type='submit' id='search' value='Search'/>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
@ -78,15 +112,30 @@ View
</tr>
{% endfor %}
</tbody>
<tfoot>
<div class='back-link-container'>
<input id='page' name='page' disabled='{% ifequal offset 0 %} false {% else %} true {% endifequal %}' value='Previous'/>
</div>
<div class='big-link-container'>
<input id='page' name='page' disabled='false' value='Next'/>
</div>
</tfoot>
</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';
});
{% ifunequal params.offset "0" %}
document.getElementById('prev-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endifunequal %}
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,15 +1,46 @@
{% extends "base.html" %}
<!-- File list-visits-Visits.html generated 2018-07-03T23:08:20.010Z by adl.to-selmer-templates.
<!-- File list-visits-Visits.html generated 2018-07-05T10:14:18.430Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %}
<form id='content' class='list'>
{% block back-links %}
<div>
<div class='back-link-container'>
{% ifequal params.offset "0" %}
<a id='back-link' class='back-link' href='{{servlet-context}}/admin'>
Back
</a>
{% else %}
<a id='prev-selector' class='back-link'>
Previous
</a>
{% endifunequal %}
</div>
</div>
{% endblock %}
{% block big-links %}
<div>
<div class='big-link-container'>
<a href='form-visits-Visit'>
<a id='next-selector' role='button' class='big-link'>
Next
</a>
</div>
{% ifmemberof admin %}
<div class='big-link-container'>
<a href='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' type='hidden' value='{{params.offset|default:0}}'/>
<input id='limit' type='hidden' value='{{params.limit|default:50}}'/>
<table caption='visits'>
<thead>
<tr>
@ -25,6 +56,9 @@ canvasser_id
<th>
date
</th>
<th>
&nbsp;
</th>
</tr>
<tr>
<th>
@ -40,7 +74,7 @@ date
<input id='date' type='date' name='date' value='{{ params.date }}'/>
</th>
<th>
<input type='submit' id='search' value='Search'/>
<input type='submit' id='search-widget' value='Search'/>
</th>
</tr>
</thead>
@ -71,15 +105,30 @@ View
</tr>
{% endfor %}
</tbody>
<tfoot>
<div class='back-link-container'>
<input id='page' name='page' disabled='{% ifequal offset 0 %} false {% else %} true {% endifequal %}' value='Previous'/>
</div>
<div class='big-link-container'>
<input id='page' name='page' disabled='false' value='Next'/>
</div>
</tfoot>
</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';
});
{% ifunequal params.offset "0" %}
document.getElementById('prev-selector').addEventListener('click', function () {
ow.value=(parseInt(ow.value)-parseInt(lw.value));
console.log('Updated offset to ' + ow.value);
form.submit();
});
{% endifunequal %}
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

@ -9,6 +9,7 @@
<link rel="stylesheet" type="text/css" href="css/yyy-site.css" />
<link rel="stylesheet" type="text/css" href="css/spinner.css" />
<link href="https://fonts.googleapis.com/css?family=Archivo+Black|Archivo+Narrow" rel="stylesheet"/>
{% script "js/lib/node_modules/jquery/dist/jquery.min.js" %}
<title>{{site-title}}: {{title}}</title>
{% endblock %}
{% block extra-head %}
@ -37,6 +38,16 @@
</div>
<!-- img id="site-logo" src="{{site-logo}}" alt="{{site-title}}" width="64" height="64"/ -->
<h1>{{title}}</h1>
{% if message|not-empty %}
<div class="message">
{{ message }}
</div>
{% endif %}
{% if error|not-empty %}
<div class="error">
{{ error }}
</div>
{% endif %}
</header>
{% endblock %}
<div id="main-container" class="container">

View file

@ -8,12 +8,40 @@
</div>
{% endblock %}
{% block content %}
<img id="site-logo" src="img/ProjectHopeLogo4.png" alt="{{site-title}}" style="float: left;" height="345" width="345"/>
<h2>
Alpha test code
</h2>
<p>
Although addresses in the database mostly are real, all personal data in the database
is randomly generated and does not represent real people.
This is a voter intention information system intended to be used by the 'Yes' side in the next independence referendum.
Design documentation is <a href="https://github.com/simon-brooke/youyesyet/blob/master/doc/specification/userspec.md">here</a>.</p>
<p>Although addresses in the database mostly are real, all personal data in the database
is randomly generated and does not represent real people.</p>
<h3>
The Canvasser app
</h3>
<p>Because the canvasser app now loads data from the database and uses your current location, and the database currently only holds
data for the Castle Douglas area, you're unlikely to see any actual data in the app. A dummy of the app in which you can see
data is <a href="http://www.journeyman.cc/~simon/tmp/yyy-dummy-2/">here</a>.
</p>
<p>
The app currently works on the Chrome browser, and on Android phones. I don't yet know whether it works on iPhones. It does not at
present work with Firefox.
</p>
<h3>
The Admin system
</h3>
<p>'Save' and 'Delete' buttons on administrative pages do not work; this is intentional at this stage.
I want you to be able to see what different roles in the project can see, without actually being able
to mess up the database.</p>
<p>If you encounter problems, please submit a report <a href="https://github.com/simon-brooke/youyesyet/issues">here</a>.
General feedback on usability is also appreciated.</p>
</p>
{% endblock %}

View file

@ -1,9 +1,11 @@
(ns
youyesyet.routes.auto
"User interface routes for Youyesyet auto-generated by [Application Description Language framework](https://github.com/simon-brooke/adl) at 20180703T230819.733Z"
"User interface routes for Youyesyet auto-generated by [Application Description Language framework](https://github.com/simon-brooke/adl) at 20180705T101418.070Z"
(:require
[adl-support.core :as support]
[clojure.java.io :as io]
[clojure.set :refer [subset?]]
[clojure.tools.logging :as log]
[compojure.core :refer [defroutes GET POST]]
[hugsql.core :as hugsql]
[noir.response :as nresponse]
@ -29,13 +31,13 @@
(l/render
(support/resolve-template "list-addresses-Addresses.html")
(:session r)
{:title "Addresses",
:params p,
:records
(merge
{:title "Addresses", :params p}
{:records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-address db/*db* p)
(db/list-addresses db/*db* {}))})))
(db/search-strings-addresses db/*db* p)
(db/list-addresses db/*db* {}))}))))
(defn
form-addresses-Address
@ -45,11 +47,30 @@
(l/render
(support/resolve-template "form-addresses-Address.html")
(:session r)
{:title "Address",
:params p,
:record
(if (empty? (remove nil? (vals p))) [] (db/get-address db/*db* p)),
:districts (db/list-districts db/*db*)})))
(merge
{:title "Address", :params p}
(reduce
merge
(merge
(cond
(:save-button p)
(try
(if
(some #{"id"} (map name (keys p)))
(do
(db/update-address! db/*db* p)
{:message "Updated record"})
(do (db/create-address! db/*db* p) {:message "Saved record"}))
(catch
java.lang.Exception
any__2078__auto__
{:error (.getMessage any__2078__auto__)})))
{:record
(if
(empty? (remove nil? (vals p)))
[]
(db/get-address db/*db* p))})
(list {:districts (db/list-districts db/*db*)}))))))
(defn
list-authorities-Authorities
@ -59,13 +80,13 @@
(l/render
(support/resolve-template "list-authorities-Authorities.html")
(:session r)
{:title "Authorities",
:params p,
:records
(merge
{:title "Authorities", :params p}
{:records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-authority db/*db* p)
(db/list-authorities db/*db* {}))})))
(db/search-strings-authorities db/*db* p)
(db/list-authorities db/*db* {}))}))))
(defn
form-authorities-Authority
@ -75,13 +96,32 @@
(l/render
(support/resolve-template "form-authorities-Authority.html")
(:session r)
{:title "Authority",
:params p,
:record
(merge
{:title "Authority", :params p}
(reduce
merge
(merge
(cond
(:save-button p)
(try
(if
(some #{"id"} (map name (keys p)))
(do
(db/update-authority! db/*db* p)
{:message "Updated record"})
(do
(db/create-authority! db/*db* p)
{:message "Saved record"}))
(catch
java.lang.Exception
any__2078__auto__
{:error (.getMessage any__2078__auto__)})))
{:record
(if
(empty? (remove nil? (vals p)))
[]
(db/get-authority db/*db* p))})))
(db/get-authority db/*db* p))})
(list))))))
(defn
list-canvassers-Canvassers
@ -91,13 +131,13 @@
(l/render
(support/resolve-template "list-canvassers-Canvassers.html")
(:session r)
{:title "Canvassers",
:params p,
:records
(merge
{:title "Canvassers", :params p}
{:records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-canvasser db/*db* p)
(db/list-canvassers db/*db* {}))})))
(db/search-strings-canvassers db/*db* p)
(db/list-canvassers db/*db* {}))}))))
(defn
form-canvassers-Canvasser
@ -107,17 +147,36 @@
(l/render
(support/resolve-template "form-canvassers-Canvasser.html")
(:session r)
{:title "Canvasser",
:params p,
:record
(merge
{:title "Canvasser", :params p}
(reduce
merge
(merge
(cond
(:save-button p)
(try
(if
(some #{"id"} (map name (keys p)))
(do
(db/update-canvasser! db/*db* p)
{:message "Updated record"})
(do
(db/create-canvasser! db/*db* p)
{:message "Saved record"}))
(catch
java.lang.Exception
any__2078__auto__
{:error (.getMessage any__2078__auto__)})))
{:record
(if
(empty? (remove nil? (vals p)))
[]
(db/get-canvasser db/*db* p)),
:electors (db/list-electors db/*db*),
:addresses (db/list-addresses db/*db*),
:authorities (db/list-authorities db/*db*),
:roles (db/list-roles db/*db*)})))
(db/get-canvasser db/*db* p))})
(list
{:electors (db/list-electors db/*db*)}
{:addresses (db/list-addresses db/*db*)}
{:authorities (db/list-authorities db/*db*)}
{:roles (db/list-roles db/*db*)}))))))
(defn
list-districts-Districts
@ -127,13 +186,13 @@
(l/render
(support/resolve-template "list-districts-Districts.html")
(:session r)
{:title "Districts",
:params p,
:records
(merge
{:title "Districts", :params p}
{:records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-district db/*db* p)
(db/list-districts db/*db* {}))})))
(db/search-strings-districts db/*db* p)
(db/list-districts db/*db* {}))}))))
(defn
form-districts-District
@ -143,13 +202,32 @@
(l/render
(support/resolve-template "form-districts-District.html")
(:session r)
{:title "District",
:params p,
:record
(merge
{:title "District", :params p}
(reduce
merge
(merge
(cond
(:save-button p)
(try
(if
(some #{"id"} (map name (keys p)))
(do
(db/update-district! db/*db* p)
{:message "Updated record"})
(do
(db/create-district! db/*db* p)
{:message "Saved record"}))
(catch
java.lang.Exception
any__2078__auto__
{:error (.getMessage any__2078__auto__)})))
{:record
(if
(empty? (remove nil? (vals p)))
[]
(db/get-district db/*db* p))})))
(db/get-district db/*db* p))})
(list))))))
(defn
list-dwellings-Dwellings
@ -159,13 +237,13 @@
(l/render
(support/resolve-template "list-dwellings-Dwellings.html")
(:session r)
{:title "Dwellings",
:params p,
:records
(merge
{:title "Dwellings", :params p}
{:records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-dwelling db/*db* p)
(db/list-dwellings db/*db* {}))})))
(db/search-strings-dwellings db/*db* p)
(db/list-dwellings db/*db* {}))}))))
(defn
form-dwellings-Dwelling
@ -175,14 +253,32 @@
(l/render
(support/resolve-template "form-dwellings-Dwelling.html")
(:session r)
{:title "Dwelling",
:params p,
:record
(merge
{:title "Dwelling", :params p}
(reduce
merge
(merge
(cond
(:save-button p)
(try
(if
(some #{"id"} (map name (keys p)))
(do
(db/update-dwelling! db/*db* p)
{:message "Updated record"})
(do
(db/create-dwelling! db/*db* p)
{:message "Saved record"}))
(catch
java.lang.Exception
any__2078__auto__
{:error (.getMessage any__2078__auto__)})))
{:record
(if
(empty? (remove nil? (vals p)))
[]
(db/get-dwelling db/*db* p)),
:addresses (db/list-addresses db/*db*)})))
(db/get-dwelling db/*db* p))})
(list {:addresses (db/list-addresses db/*db*)}))))))
(defn
list-electors-Electors
@ -192,13 +288,13 @@
(l/render
(support/resolve-template "list-electors-Electors.html")
(:session r)
{:title "Electors",
:params p,
:records
(merge
{:title "Electors", :params p}
{:records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-elector db/*db* p)
(db/list-electors db/*db* {}))})))
(db/search-strings-electors db/*db* p)
(db/list-electors db/*db* {}))}))))
(defn
form-electors-Elector
@ -208,12 +304,32 @@
(l/render
(support/resolve-template "form-electors-Elector.html")
(:session r)
{:title "Elector",
:params p,
:record
(if (empty? (remove nil? (vals p))) [] (db/get-elector db/*db* p)),
:dwellings (db/list-dwellings db/*db*),
:genders (db/list-genders db/*db*)})))
(merge
{:title "Elector", :params p}
(reduce
merge
(merge
(cond
(:save-button p)
(try
(if
(some #{"id"} (map name (keys p)))
(do
(db/update-elector! db/*db* p)
{:message "Updated record"})
(do (db/create-elector! db/*db* p) {:message "Saved record"}))
(catch
java.lang.Exception
any__2078__auto__
{:error (.getMessage any__2078__auto__)})))
{:record
(if
(empty? (remove nil? (vals p)))
[]
(db/get-elector db/*db* p))})
(list
{:dwellings (db/list-dwellings db/*db*)}
{:genders (db/list-genders db/*db*)}))))))
(defn
list-followupactions-Followupactions
@ -224,13 +340,13 @@
(support/resolve-template
"list-followupactions-Followupactions.html")
(:session r)
{:title "Followupactions",
:params p,
:records
(merge
{:title "Followupactions", :params p}
{:records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-followupaction db/*db* p)
(db/list-followupactions db/*db* {}))})))
(db/search-strings-followupactions db/*db* p)
(db/list-followupactions db/*db* {}))}))))
(defn
form-followupactions-Followupaction
@ -241,15 +357,34 @@
(support/resolve-template
"form-followupactions-Followupaction.html")
(:session r)
{:title "Followupaction",
:params p,
:record
(merge
{:title "Followupaction", :params p}
(reduce
merge
(merge
(cond
(:save-button p)
(try
(if
(some #{"id"} (map name (keys p)))
(do
(db/update-followupaction! db/*db* p)
{:message "Updated record"})
(do
(db/create-followupaction! db/*db* p)
{:message "Saved record"}))
(catch
java.lang.Exception
any__2078__auto__
{:error (.getMessage any__2078__auto__)})))
{:record
(if
(empty? (remove nil? (vals p)))
[]
(db/get-followupaction db/*db* p)),
:followuprequests (db/list-followuprequests db/*db*),
:canvassers (db/list-canvassers db/*db*)})))
(db/get-followupaction db/*db* p))})
(list
{:followuprequests (db/list-followuprequests db/*db*)}
{:canvassers (db/list-canvassers db/*db*)}))))))
(defn
list-followupmethods-Followupmethods
@ -260,13 +395,13 @@
(support/resolve-template
"list-followupmethods-Followupmethods.html")
(:session r)
{:title "Followupmethods",
:params p,
:records
(merge
{:title "Followupmethods", :params p}
{:records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-followupmethod db/*db* p)
(db/list-followupmethods db/*db* {}))})))
(db/search-strings-followupmethods db/*db* p)
(db/list-followupmethods db/*db* {}))}))))
(defn
form-followupmethods-Followupmethod
@ -277,13 +412,32 @@
(support/resolve-template
"form-followupmethods-Followupmethod.html")
(:session r)
{:title "Followupmethod",
:params p,
:record
(merge
{:title "Followupmethod", :params p}
(reduce
merge
(merge
(cond
(:save-button p)
(try
(if
(some #{"id"} (map name (keys p)))
(do
(db/update-followupmethod! db/*db* p)
{:message "Updated record"})
(do
(db/create-followupmethod! db/*db* p)
{:message "Saved record"}))
(catch
java.lang.Exception
any__2078__auto__
{:error (.getMessage any__2078__auto__)})))
{:record
(if
(empty? (remove nil? (vals p)))
[]
(db/get-followupmethod db/*db* p))})))
(db/get-followupmethod db/*db* p))})
(list))))))
(defn
list-followuprequests-Followuprequests
@ -294,13 +448,13 @@
(support/resolve-template
"list-followuprequests-Followuprequests.html")
(:session r)
{:title "Followuprequests",
:params p,
:records
(merge
{:title "Followuprequests", :params p}
{:records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-followuprequest db/*db* p)
(db/list-followuprequests db/*db* {}))})))
(db/search-strings-followuprequests db/*db* p)
(db/list-followuprequests db/*db* {}))}))))
(defn
form-followuprequests-Followuprequest
@ -311,17 +465,36 @@
(support/resolve-template
"form-followuprequests-Followuprequest.html")
(:session r)
{:title "Followuprequest",
:params p,
:record
(merge
{:title "Followuprequest", :params p}
(reduce
merge
(merge
(cond
(:save-button p)
(try
(if
(some #{"id"} (map name (keys p)))
(do
(db/update-followuprequest! db/*db* p)
{:message "Updated record"})
(do
(db/create-followuprequest! db/*db* p)
{:message "Saved record"}))
(catch
java.lang.Exception
any__2078__auto__
{:error (.getMessage any__2078__auto__)})))
{:record
(if
(empty? (remove nil? (vals p)))
[]
(db/get-followuprequest db/*db* p)),
:electors (db/list-electors db/*db*),
:visits (db/list-visits db/*db*),
:issues (db/list-issues db/*db*),
:followupmethods (db/list-followupmethods db/*db*)})))
(db/get-followuprequest db/*db* p))})
(list
{:electors (db/list-electors db/*db*)}
{:visits (db/list-visits db/*db*)}
{:issues (db/list-issues db/*db*)}
{:followupmethods (db/list-followupmethods db/*db*)}))))))
(defn
list-genders-Genders
@ -331,13 +504,13 @@
(l/render
(support/resolve-template "list-genders-Genders.html")
(:session r)
{:title "Genders",
:params p,
:records
(merge
{:title "Genders", :params p}
{:records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-gender db/*db* p)
(db/list-genders db/*db* {}))})))
(db/search-strings-genders db/*db* p)
(db/list-genders db/*db* {}))}))))
(defn
form-genders-Gender
@ -347,13 +520,28 @@
(l/render
(support/resolve-template "form-genders-Gender.html")
(:session r)
{:title "Gender",
:params p,
:record
(merge
{:title "Gender", :params p}
(reduce
merge
(merge
(cond
(:save-button p)
(try
(if
(some #{"id"} (map name (keys p)))
(do (db/update-gender! db/*db* p) {:message "Updated record"})
(do (db/create-gender! db/*db* p) {:message "Saved record"}))
(catch
java.lang.Exception
any__2078__auto__
{:error (.getMessage any__2078__auto__)})))
{:record
(if
(empty? (remove nil? (vals p)))
[]
(db/get-gender db/*db* p))})))
(db/get-gender db/*db* p))})
(list))))))
(defn
list-intentions-Intentions
@ -363,13 +551,13 @@
(l/render
(support/resolve-template "list-intentions-Intentions.html")
(:session r)
{:title "Intentions",
:params p,
:records
(merge
{:title "Intentions", :params p}
{:records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-intention db/*db* p)
(db/list-intentions db/*db* {}))})))
(db/search-strings-intentions db/*db* p)
(db/list-intentions db/*db* {}))}))))
(defn
form-intentions-Intention
@ -379,16 +567,35 @@
(l/render
(support/resolve-template "form-intentions-Intention.html")
(:session r)
{:title "Intention",
:params p,
:record
(merge
{:title "Intention", :params p}
(reduce
merge
(merge
(cond
(:save-button p)
(try
(if
(some #{"Id"} (map name (keys p)))
(do
(db/update-intention! db/*db* p)
{:message "Updated record"})
(do
(db/create-intention! db/*db* p)
{:message "Saved record"}))
(catch
java.lang.Exception
any__2078__auto__
{:error (.getMessage any__2078__auto__)})))
{:record
(if
(empty? (remove nil? (vals p)))
[]
(db/get-intention db/*db* p)),
:visits (db/list-visits db/*db*),
:electors (db/list-electors db/*db*),
:options (db/list-options db/*db*)})))
(db/get-intention db/*db* p))})
(list
{:visits (db/list-visits db/*db*)}
{:electors (db/list-electors db/*db*)}
{:options (db/list-options db/*db*)}))))))
(defn
list-issues-Issues
@ -398,13 +605,13 @@
(l/render
(support/resolve-template "list-issues-Issues.html")
(:session r)
{:title "Issues",
:params p,
:records
(merge
{:title "Issues", :params p}
{:records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-issue db/*db* p)
(db/list-issues db/*db* {}))})))
(db/search-strings-issues db/*db* p)
(db/list-issues db/*db* {}))}))))
(defn
form-issues-Issue
@ -414,10 +621,28 @@
(l/render
(support/resolve-template "form-issues-Issue.html")
(:session r)
{:title "Issue",
:params p,
:record
(if (empty? (remove nil? (vals p))) [] (db/get-issue db/*db* p))})))
(merge
{:title "Issue", :params p}
(reduce
merge
(merge
(cond
(:save-button p)
(try
(if
(some #{"id"} (map name (keys p)))
(do (db/update-issue! db/*db* p) {:message "Updated record"})
(do (db/create-issue! db/*db* p) {:message "Saved record"}))
(catch
java.lang.Exception
any__2078__auto__
{:error (.getMessage any__2078__auto__)})))
{:record
(if
(empty? (remove nil? (vals p)))
[]
(db/get-issue db/*db* p))})
(list))))))
(defn
list-options-Options
@ -427,13 +652,13 @@
(l/render
(support/resolve-template "list-options-Options.html")
(:session r)
{:title "Options",
:params p,
:records
(merge
{:title "Options", :params p}
{:records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-option db/*db* p)
(db/list-options db/*db* {}))})))
(db/search-strings-options db/*db* p)
(db/list-options db/*db* {}))}))))
(defn
form-options-Option
@ -443,13 +668,28 @@
(l/render
(support/resolve-template "form-options-Option.html")
(:session r)
{:title "Option",
:params p,
:record
(merge
{:title "Option", :params p}
(reduce
merge
(merge
(cond
(:save-button p)
(try
(if
(some #{"id"} (map name (keys p)))
(do (db/update-option! db/*db* p) {:message "Updated record"})
(do (db/create-option! db/*db* p) {:message "Saved record"}))
(catch
java.lang.Exception
any__2078__auto__
{:error (.getMessage any__2078__auto__)})))
{:record
(if
(empty? (remove nil? (vals p)))
[]
(db/get-option db/*db* p))})))
(db/get-option db/*db* p))})
(list))))))
(defn
list-roles-Roles
@ -459,13 +699,13 @@
(l/render
(support/resolve-template "list-roles-Roles.html")
(:session r)
{:title "Roles",
:params p,
:records
(merge
{:title "Roles", :params p}
{:records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-role db/*db* p)
(db/list-roles db/*db* {}))})))
(db/search-strings-roles db/*db* p)
(db/list-roles db/*db* {}))}))))
(defn
form-roles-Role
@ -475,11 +715,28 @@
(l/render
(support/resolve-template "form-roles-Role.html")
(:session r)
{:title "Role",
:params p,
:record
(if (empty? (remove nil? (vals p))) [] (db/get-role db/*db* p)),
:canvassers (db/list-canvassers db/*db*)})))
(merge
{:title "Role", :params p}
(reduce
merge
(merge
(cond
(:save-button p)
(try
(if
(some #{"id"} (map name (keys p)))
(do (db/update-role! db/*db* p) {:message "Updated record"})
(do (db/create-role! db/*db* p) {:message "Saved record"}))
(catch
java.lang.Exception
any__2078__auto__
{:error (.getMessage any__2078__auto__)})))
{:record
(if
(empty? (remove nil? (vals p)))
[]
(db/get-role db/*db* p))})
(list {:canvassers (db/list-canvassers db/*db*)}))))))
(defn
list-teams-Teams
@ -489,13 +746,13 @@
(l/render
(support/resolve-template "list-teams-Teams.html")
(:session r)
{:title "Teams",
:params p,
:records
(merge
{:title "Teams", :params p}
{:records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-team db/*db* p)
(db/list-teams db/*db* {}))})))
(db/search-strings-teams db/*db* p)
(db/list-teams db/*db* {}))}))))
(defn
form-teams-Team
@ -505,12 +762,31 @@
(l/render
(support/resolve-template "form-teams-Team.html")
(:session r)
{:title "Team",
:params p,
:record
(if (empty? (remove nil? (vals p))) [] (db/get-team db/*db* p)),
:districts (db/list-districts db/*db*),
:canvassers (db/list-canvassers db/*db*)})))
(merge
{:title "Team", :params p}
(reduce
merge
(merge
(cond
(:save-button p)
(try
(if
(some #{"id"} (map name (keys p)))
(do (db/update-team! db/*db* p) {:message "Updated record"})
(do (db/create-team! db/*db* p) {:message "Saved record"}))
(catch
java.lang.Exception
any__2078__auto__
{:error (.getMessage any__2078__auto__)})))
{:record
(if
(empty? (remove nil? (vals p)))
[]
(db/get-team db/*db* p))})
(list
{:districts (db/list-districts db/*db*)}
{:canvassers (db/list-canvassers db/*db*)}
{:canvassers (db/list-canvassers db/*db*)}))))))
(defn
list-visits-Visits
@ -520,13 +796,13 @@
(l/render
(support/resolve-template "list-visits-Visits.html")
(:session r)
{:title "Visits",
:params p,
:records
(merge
{:title "Visits", :params p}
{:records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-visit db/*db* p)
(db/list-visits db/*db* {}))})))
(db/search-strings-visits db/*db* p)
(db/list-visits db/*db* {}))}))))
(defn
form-visits-Visit
@ -536,12 +812,30 @@
(l/render
(support/resolve-template "form-visits-Visit.html")
(:session r)
{:title "Visit",
:params p,
:record
(if (empty? (remove nil? (vals p))) [] (db/get-visit db/*db* p)),
:addresses (db/list-addresses db/*db*),
:canvassers (db/list-canvassers db/*db*)})))
(merge
{:title "Visit", :params p}
(reduce
merge
(merge
(cond
(:save-button p)
(try
(if
(some #{"id"} (map name (keys p)))
(do (db/update-visit! db/*db* p) {:message "Updated record"})
(do (db/create-visit! db/*db* p) {:message "Saved record"}))
(catch
java.lang.Exception
any__2078__auto__
{:error (.getMessage any__2078__auto__)})))
{:record
(if
(empty? (remove nil? (vals p)))
[]
(db/get-visit db/*db* p))})
(list
{:addresses (db/list-addresses db/*db*)}
{:canvassers (db/list-canvassers db/*db*)}))))))
(defn
raw-resolve-handler

View file

@ -1,10 +1,11 @@
(ns
youyesyet.routes.auto-json
"JSON routes for youyesyet auto-generated by [Application Description Language framework](https://github.com/simon-brooke/adl) at 20180703T230818.649Z"
"JSON routes for youyesyet auto-generated by [Application Description Language framework](https://github.com/simon-brooke/adl) at 20180705T101417.082Z"
(:require
[adl-support.core :as support]
[clojure.java.io :as io]
[clojure.core.memoize :as memo]
[clojure.java.io :as io]
[clojure.tools.logging :as log]
[compojure.core :refer [defroutes GET POST]]
[hugsql.core :as hugsql]
[noir.response :as nresponse]
@ -945,13 +946,13 @@
(do (db/list-visits-by-canvasser params)))
(def
search-strings-address
search-strings-addresses
(memo/ttl
(fn
[{:keys [params form-params]}]
(let
[result
(db/search-strings-address
(db/search-strings-addresses
db/*db*
(support/massage-params params form-params #{"id"}))]
(response/ok result)))
@ -959,13 +960,13 @@
1000000000))
(def
search-strings-authority
search-strings-authorities
(memo/ttl
(fn
[{:keys [params form-params]}]
(let
[result
(db/search-strings-authority
(db/search-strings-authorities
db/*db*
(support/massage-params params form-params #{"id"}))]
(response/ok result)))
@ -973,13 +974,13 @@
10000000000))
(def
search-strings-canvasser
search-strings-canvassers
(memo/ttl
(fn
[{:keys [params form-params]}]
(let
[result
(db/search-strings-canvasser
(db/search-strings-canvassers
db/*db*
(support/massage-params params form-params #{"id"}))]
(response/ok result)))
@ -987,13 +988,13 @@
10000000))
(def
search-strings-district
search-strings-districts
(memo/ttl
(fn
[{:keys [params form-params]}]
(let
[result
(db/search-strings-district
(db/search-strings-districts
db/*db*
(support/massage-params params form-params #{"id"}))]
(response/ok result)))
@ -1001,13 +1002,13 @@
10000000000))
(def
search-strings-dwelling
search-strings-dwellings
(memo/ttl
(fn
[{:keys [params form-params]}]
(let
[result
(db/search-strings-dwelling
(db/search-strings-dwellings
db/*db*
(support/massage-params params form-params #{"id"}))]
(response/ok result)))
@ -1015,13 +1016,13 @@
1000000000))
(def
search-strings-elector
search-strings-electors
(memo/ttl
(fn
[{:keys [params form-params]}]
(let
[result
(db/search-strings-elector
(db/search-strings-electors
db/*db*
(support/massage-params params form-params #{"id"}))]
(response/ok result)))
@ -1029,24 +1030,24 @@
100000000))
(defn
search-strings-followupaction
search-strings-followupactions
"Auto-generated method to select all records from the `followupactions` table with any text field matching the value of the key `:pattern` which should be in the request. If the keys `(:limit :offset)` are present in the request then they will be used to page through the data. Returns a sequence of maps each containing the following keys: `(:request_id :actor :date :notes :closed :id)`."
[{:keys [params form-params]}]
(let
[result
(db/search-strings-followupaction
(db/search-strings-followupactions
db/*db*
(support/massage-params params form-params #{"id"}))]
(response/ok result)))
(def
search-strings-followupmethod
search-strings-followupmethods
(memo/ttl
(fn
[{:keys [params form-params]}]
(let
[result
(db/search-strings-followupmethod
(db/search-strings-followupmethods
db/*db*
(support/massage-params params form-params #{"id"}))]
(response/ok result)))
@ -1054,13 +1055,13 @@
10000000000))
(def
search-strings-followuprequest
search-strings-followuprequests
(memo/ttl
(fn
[{:keys [params form-params]}]
(let
[result
(db/search-strings-followuprequest
(db/search-strings-followuprequests
db/*db*
(support/massage-params params form-params #{"id"}))]
(response/ok result)))
@ -1068,13 +1069,13 @@
100000))
(def
search-strings-gender
search-strings-genders
(memo/ttl
(fn
[{:keys [params form-params]}]
(let
[result
(db/search-strings-gender
(db/search-strings-genders
db/*db*
(support/massage-params params form-params #{"id"}))]
(response/ok result)))
@ -1082,13 +1083,13 @@
1000000000))
(def
search-strings-intention
search-strings-intentions
(memo/ttl
(fn
[{:keys [params form-params]}]
(let
[result
(db/search-strings-intention
(db/search-strings-intentions
db/*db*
(support/massage-params params form-params #{"Id"}))]
(response/ok result)))
@ -1096,13 +1097,13 @@
100000))
(def
search-strings-issue
search-strings-issues
(memo/ttl
(fn
[{:keys [params form-params]}]
(let
[result
(db/search-strings-issue
(db/search-strings-issues
db/*db*
(support/massage-params params form-params #{"id"}))]
(response/ok result)))
@ -1110,13 +1111,13 @@
1000000))
(def
search-strings-option
search-strings-options
(memo/ttl
(fn
[{:keys [params form-params]}]
(let
[result
(db/search-strings-option
(db/search-strings-options
db/*db*
(support/massage-params params form-params #{"id"}))]
(response/ok result)))
@ -1124,13 +1125,13 @@
10000000000))
(def
search-strings-role
search-strings-roles
(memo/ttl
(fn
[{:keys [params form-params]}]
(let
[result
(db/search-strings-role
(db/search-strings-roles
db/*db*
(support/massage-params params form-params #{"id"}))]
(response/ok result)))
@ -1138,13 +1139,13 @@
10000000000))
(def
search-strings-team
search-strings-teams
(memo/ttl
(fn
[{:keys [params form-params]}]
(let
[result
(db/search-strings-team
(db/search-strings-teams
db/*db*
(support/massage-params params form-params #{"id"}))]
(response/ok result)))
@ -1152,13 +1153,13 @@
10000000))
(def
search-strings-visit
search-strings-visits
(memo/ttl
(fn
[{:keys [params form-params]}]
(let
[result
(db/search-strings-visit
(db/search-strings-visits
db/*db*
(support/massage-params params form-params #{"id"}))]
(response/ok result)))
@ -1242,6 +1243,17 @@
(support/massage-params params form-params #{"id"}))]
(response/found "/")))
(defn
update-followupmethod!
"Auto-generated method to update one record in the `followupmethods` table. Expects the following key(s) to be present in `params`: `(:id)`."
[{:keys [params form-params]}]
(let
[result
(db/update-followupmethod!
db/*db*
(support/massage-params params form-params #{"id"}))]
(response/found "/")))
(defn
update-followuprequest!
"Auto-generated method to update one record in the `followuprequests` table. Expects the following key(s) to be present in `params`: `(:elector_id :id :issue_id :method_id :visit_id)`."
@ -1253,6 +1265,17 @@
(support/massage-params params form-params #{"id"}))]
(response/found "/")))
(defn
update-gender!
"Auto-generated method to update one record in the `genders` table. Expects the following key(s) to be present in `params`: `(:id)`."
[{:keys [params form-params]}]
(let
[result
(db/update-gender!
db/*db*
(support/massage-params params form-params #{"id"}))]
(response/found "/")))
(defn
update-intention!
"Auto-generated method to update one record in the `intentions` table. Expects the following key(s) to be present in `params`: `(:Id :elector_id :locality :option_id :visit_id)`."
@ -1275,6 +1298,17 @@
(support/massage-params params form-params #{"id"}))]
(response/found "/")))
(defn
update-option!
"Auto-generated method to update one record in the `options` table. Expects the following key(s) to be present in `params`: `(:id)`."
[{:keys [params form-params]}]
(let
[result
(db/update-option!
db/*db*
(support/massage-params params form-params #{"id"}))]
(response/found "/")))
(defn
update-role!
"Auto-generated method to update one record in the `roles` table. Expects the following key(s) to be present in `params`: `(:id :name)`."
@ -1663,69 +1697,69 @@
request
(route/restricted (list-visits-by-canvasser request)))
(GET
"/json/auto/search-strings-address"
"/json/auto/search-strings-addresses"
request
(route/restricted (search-strings-address request)))
(route/restricted (search-strings-addresses request)))
(GET
"/json/auto/search-strings-authority"
"/json/auto/search-strings-authorities"
request
(route/restricted (search-strings-authority request)))
(route/restricted (search-strings-authorities request)))
(GET
"/json/auto/search-strings-canvasser"
"/json/auto/search-strings-canvassers"
request
(route/restricted (search-strings-canvasser request)))
(route/restricted (search-strings-canvassers request)))
(GET
"/json/auto/search-strings-district"
"/json/auto/search-strings-districts"
request
(route/restricted (search-strings-district request)))
(route/restricted (search-strings-districts request)))
(GET
"/json/auto/search-strings-dwelling"
"/json/auto/search-strings-dwellings"
request
(route/restricted (search-strings-dwelling request)))
(route/restricted (search-strings-dwellings request)))
(GET
"/json/auto/search-strings-elector"
"/json/auto/search-strings-electors"
request
(route/restricted (search-strings-elector request)))
(route/restricted (search-strings-electors request)))
(GET
"/json/auto/search-strings-followupaction"
"/json/auto/search-strings-followupactions"
request
(route/restricted (search-strings-followupaction request)))
(route/restricted (search-strings-followupactions request)))
(GET
"/json/auto/search-strings-followupmethod"
"/json/auto/search-strings-followupmethods"
request
(route/restricted (search-strings-followupmethod request)))
(route/restricted (search-strings-followupmethods request)))
(GET
"/json/auto/search-strings-followuprequest"
"/json/auto/search-strings-followuprequests"
request
(route/restricted (search-strings-followuprequest request)))
(route/restricted (search-strings-followuprequests request)))
(GET
"/json/auto/search-strings-gender"
"/json/auto/search-strings-genders"
request
(route/restricted (search-strings-gender request)))
(route/restricted (search-strings-genders request)))
(GET
"/json/auto/search-strings-intention"
"/json/auto/search-strings-intentions"
request
(route/restricted (search-strings-intention request)))
(route/restricted (search-strings-intentions request)))
(GET
"/json/auto/search-strings-issue"
"/json/auto/search-strings-issues"
request
(route/restricted (search-strings-issue request)))
(route/restricted (search-strings-issues request)))
(GET
"/json/auto/search-strings-option"
"/json/auto/search-strings-options"
request
(route/restricted (search-strings-option request)))
(route/restricted (search-strings-options request)))
(GET
"/json/auto/search-strings-role"
"/json/auto/search-strings-roles"
request
(route/restricted (search-strings-role request)))
(route/restricted (search-strings-roles request)))
(GET
"/json/auto/search-strings-team"
"/json/auto/search-strings-teams"
request
(route/restricted (search-strings-team request)))
(route/restricted (search-strings-teams request)))
(GET
"/json/auto/search-strings-visit"
"/json/auto/search-strings-visits"
request
(route/restricted (search-strings-visit request)))
(route/restricted (search-strings-visits request)))
(POST
"/json/auto/update-address"
request
@ -1754,10 +1788,18 @@
"/json/auto/update-followupaction"
request
(route/restricted (update-followupaction! request)))
(POST
"/json/auto/update-followupmethod"
request
(route/restricted (update-followupmethod! request)))
(POST
"/json/auto/update-followuprequest"
request
(route/restricted (update-followuprequest! request)))
(POST
"/json/auto/update-gender"
request
(route/restricted (update-gender! request)))
(POST
"/json/auto/update-intention"
request
@ -1766,6 +1808,10 @@
"/json/auto/update-issue"
request
(route/restricted (update-issue! request)))
(POST
"/json/auto/update-option"
request
(route/restricted (update-option! request)))
(POST
"/json/auto/update-role"
request