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 {: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"] [datatables.net-dt "1.10.19"]
[jquery "3.3.1"] [jquery "3.3.1"]
[leaflet "0.7.3"] ;; old version works, new ["1.3.1"] doesn't [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"} :root "resources/public/js/lib"}
:uberwar :uberwar

View file

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View file

@ -1,7 +1,7 @@
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- File queries.sql -- 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 -- See [Application Description
-- Language](https://github.com/simon-brooke/adl). -- Language](https://github.com/simon-brooke/adl).
@ -753,7 +753,7 @@ ORDER BY lv_visits.address_id,
lv_visits.date, lv_visits.date,
lv_visits.id 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 -- :doc selects existing address records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_addresses SELECT DISTINCT * FROM lv_addresses
WHERE false WHERE false
@ -771,7 +771,7 @@ ORDER BY lv_addresses.address,
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (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 -- :doc selects existing authority records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_authorities SELECT DISTINCT * FROM lv_authorities
WHERE false WHERE false
@ -784,7 +784,7 @@ WHERE false
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (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 -- :doc selects existing canvasser records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_canvassers SELECT DISTINCT * FROM lv_canvassers
WHERE false WHERE false
@ -806,7 +806,7 @@ ORDER BY lv_canvassers.username,
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (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 -- :doc selects existing district records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_districts SELECT DISTINCT * FROM lv_districts
WHERE false WHERE false
@ -817,7 +817,7 @@ ORDER BY lv_districts.name,
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (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 -- :doc selects existing dwelling records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_dwellings SELECT DISTINCT * FROM lv_dwellings
WHERE false WHERE false
@ -830,7 +830,7 @@ ORDER BY lv_dwellings.address_id,
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (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 -- :doc selects existing elector records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_electors SELECT DISTINCT * FROM lv_electors
WHERE false WHERE false
@ -848,7 +848,7 @@ ORDER BY lv_electors.name,
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (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 -- :doc selects existing followupaction records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_followupactions SELECT DISTINCT * FROM lv_followupactions
WHERE false WHERE false
@ -864,7 +864,7 @@ ORDER BY lv_followupactions.date,
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (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 -- :doc selects existing followupmethod records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_followupmethods SELECT DISTINCT * FROM lv_followupmethods
WHERE false WHERE false
@ -872,7 +872,7 @@ WHERE false
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (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 -- :doc selects existing followuprequest records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_followuprequests SELECT DISTINCT * FROM lv_followuprequests
WHERE false WHERE false
@ -888,7 +888,7 @@ ORDER BY lv_followuprequests.elector_id,
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (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 -- :doc selects existing gender records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_genders SELECT DISTINCT * FROM lv_genders
WHERE false WHERE false
@ -896,7 +896,7 @@ WHERE false
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (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 -- :doc selects existing intention records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_intentions SELECT DISTINCT * FROM lv_intentions
WHERE false WHERE false
@ -908,7 +908,7 @@ WHERE false
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (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 -- :doc selects existing issue records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_issues SELECT DISTINCT * FROM lv_issues
WHERE false WHERE false
@ -919,7 +919,7 @@ WHERE false
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (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 -- :doc selects existing option records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_options SELECT DISTINCT * FROM lv_options
WHERE false WHERE false
@ -927,7 +927,7 @@ WHERE false
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (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 -- :doc selects existing role records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_roles SELECT DISTINCT * FROM lv_roles
WHERE false WHERE false
@ -938,7 +938,7 @@ ORDER BY lv_roles.name,
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (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 -- :doc selects existing team records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_teams SELECT DISTINCT * FROM lv_teams
WHERE false WHERE false
@ -952,7 +952,7 @@ ORDER BY lv_teams.name,
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (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 -- :doc selects existing visit records having any string field matching the parameter of the same name by substring match
SELECT DISTINCT * FROM lv_visits SELECT DISTINCT * FROM lv_visits
WHERE false WHERE false
@ -1035,6 +1035,12 @@ SET request_id = :request_id,
closed = :closed closed = :closed
WHERE followupactions.id = :id 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 -- :name update-followuprequest! :! :n
-- :doc updates an existing followuprequest record -- :doc updates an existing followuprequest record
UPDATE followuprequests UPDATE followuprequests
@ -1044,6 +1050,12 @@ SET elector_id = :elector_id,
method_id = :method_id method_id = :method_id
WHERE followuprequests.id = :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 -- :name update-intention! :! :n
-- :doc updates an existing intention record -- :doc updates an existing intention record
UPDATE intentions UPDATE intentions
@ -1062,6 +1074,12 @@ SET url = :url,
id = :id id = :id
WHERE issues.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 -- :name update-role! :! :n
-- :doc updates an existing role record -- :doc updates an existing role record
UPDATE roles UPDATE roles

View file

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

View file

@ -1,55 +1,74 @@
{% extends "base.html" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %} {% block content %}
<dl class='index'> <dl class='index'>
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dt> <dt>
<a href='list-addresses-Addresses'> <a href='list-addresses-Addresses'>
Address Address
</a> </a>
</dt> </dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dd> <dd>
<p> <p>
Addresses of all buildings which contain dwellings. Addresses of all buildings which contain dwellings.
</p> </p>
</dd> </dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dt> <dt>
<a href='list-authorities-Authorities'> <a href='list-authorities-Authorities'>
Authority Authority
</a> </a>
</dt> </dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dd> <dd>
<p> <p>
Authorities which may authenticate canvassers to the system. Authorities which may authenticate canvassers to the system.
</p> </p>
</dd> </dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dt> <dt>
<a href='list-canvassers-Canvassers'> <a href='list-canvassers-Canvassers'>
Canvasser Canvasser
</a> </a>
</dt> </dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dd> <dd>
<p> <p>
Primary users of the system: those actually interviewing electors. Primary users of the system: those actually interviewing electors.
</p> </p>
</dd> </dd>
{% endifmemberof %}
{% ifmemberof public admin canvassers teamorganisers issueexperts analysts issueeditors %}
<dt> <dt>
<a href='list-districts-Districts'> <a href='list-districts-Districts'>
District District
</a> </a>
</dt> </dt>
{% endifmemberof %}
{% ifmemberof public admin canvassers teamorganisers issueexperts analysts issueeditors %}
<dd> <dd>
<p> <p>
Electoral districts: TODO: Shape (polygon) information will need to be added, for use in maps. Electoral districts: TODO: Shape (polygon) information will need to be added, for use in maps.
</p> </p>
</dd> </dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dt> <dt>
<a href='list-dwellings-Dwellings'> <a href='list-dwellings-Dwellings'>
Dwelling Dwelling
</a> </a>
</dt> </dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dd> <dd>
<p> <p>
All dwellings within addresses in the system; a dwelling is a 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> </p>
</dd> </dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dt> <dt>
<a href='list-electors-Electors'> <a href='list-electors-Electors'>
Elector Elector
</a> </a>
</dt> </dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dd> <dd>
<p> <p>
All electors known to the system; electors are people believed to be entitled to vote in the current campaign. All electors known to the system; electors are people believed to be entitled to vote in the current campaign.
</p> </p>
</dd> </dd>
{% endifmemberof %}
{% ifmemberof issueexperts canvassers analysts issueeditors admin %}
<dt> <dt>
<a href='list-followupactions-Followupactions'> <a href='list-followupactions-Followupactions'>
Followupaction Followupaction
</a> </a>
</dt> </dt>
{% endifmemberof %}
{% ifmemberof issueexperts canvassers analysts issueeditors admin %}
<dd> <dd>
<p> <p>
Actions taken on followup requests. Actions taken on followup requests.
</p> </p>
</dd> </dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dt> <dt>
<a href='list-followupmethods-Followupmethods'> <a href='list-followupmethods-Followupmethods'>
Followupmethod Followupmethod
</a> </a>
</dt> </dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dd> <dd>
</dd> </dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dt> <dt>
<a href='list-followuprequests-Followuprequests'> <a href='list-followuprequests-Followuprequests'>
Followuprequest Followuprequest
</a> </a>
</dt> </dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dd> <dd>
<p> <p>
Requests for a followup with an issue expert Requests for a followup with an issue expert
</p> </p>
</dd> </dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dt> <dt>
<a href='list-genders-Genders'> <a href='list-genders-Genders'>
Gender Gender
</a> </a>
</dt> </dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dd> <dd>
<p> <p>
All genders which may be assigned to electors. All genders which may be assigned to electors.
</p> </p>
</dd> </dd>
{% endifmemberof %}
{% ifmemberof canvassers analysts admin %}
<dt> <dt>
<a href='list-intentions-Intentions'> <a href='list-intentions-Intentions'>
Intention Intention
</a> </a>
</dt> </dt>
{% endifmemberof %}
{% ifmemberof canvassers analysts admin %}
<dd> <dd>
<p> <p>
Intentions of electors to vote for options elicited in visits. Intentions of electors to vote for options elicited in visits.
</p> </p>
</dd> </dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dt> <dt>
<a href='list-issues-Issues'> <a href='list-issues-Issues'>
Issue Issue
</a> </a>
</dt> </dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dd> <dd>
<p> <p>
Issues believed to be of interest to electors, about which they may have questions. Issues believed to be of interest to electors, about which they may have questions.
</p> </p>
</dd> </dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dt> <dt>
<a href='list-options-Options'> <a href='list-options-Options'>
Option Option
</a> </a>
</dt> </dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dd> <dd>
<p> <p>
Options in the election or referendum being canvassed on Options in the election or referendum being canvassed on
</p> </p>
</dd> </dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dt> <dt>
<a href='list-roles-Roles'> <a href='list-roles-Roles'>
Role Role
</a> </a>
</dt> </dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<dd> <dd>
<p> <p>
A role (essentially, the same as a group, but application layer rather than database layer) of which a user may be a member. A role (essentially, the same as a group, but application layer rather than database layer) of which a user may be a member.
</p> </p>
</dd> </dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
<dt> <dt>
<a href='list-teams-Teams'> <a href='list-teams-Teams'>
Team Team
</a> </a>
</dt> </dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
<dd> <dd>
</dd> </dd>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers %}
<dt> <dt>
<a href='list-visits-Visits'> <a href='list-visits-Visits'>
Visit Visit
</a> </a>
</dt> </dt>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers %}
<dd> <dd>
<p> <p>
All visits made by canvassers to dwellings in which opinions were recorded. All visits made by canvassers to dwellings in which opinions were recorded.
</p> </p>
</dd> </dd>
{% endifmemberof %}
</dl> </dl>
{% endblock %} {% endblock %}

View file

@ -1,8 +1,11 @@
{% extends "base.html" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% endblock %}
{% block content %} {% block content %}
<div id='content' class='edit'> <div id='content' class='edit'>
<form action='{{servlet-context}}/form-addresses-Address' method='POST'> <form action='{{servlet-context}}/form-addresses-Address' method='POST'>
@ -12,7 +15,7 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
id id
</label> </label>
{% ifmemberof admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'> <span id='id' name='id' class='pseudo-widget disabled'>
@ -30,7 +33,7 @@ You are not permitted to view id of addresses
address address
</label> </label>
{% ifmemberof admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='address' name='address' class='pseudo-widget disabled'> <span id='address' name='address' class='pseudo-widget disabled'>
@ -48,7 +51,7 @@ You are not permitted to view address of addresses
postcode postcode
</label> </label>
{% ifmemberof admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='postcode' name='postcode' class='pseudo-widget disabled'> <span id='postcode' name='postcode' class='pseudo-widget disabled'>
@ -66,7 +69,7 @@ You are not permitted to view postcode of addresses
phone phone
</label> </label>
{% ifmemberof admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='phone' name='phone' class='pseudo-widget disabled'> <span id='phone' name='phone' class='pseudo-widget disabled'>
@ -84,12 +87,13 @@ You are not permitted to view phone of addresses
district_id district_id
</label> </label>
{% ifmemberof admin %} {% ifmemberof admin %}
<div class='select-box' farside='districts' found='true'> <span class='select-box' farside='districts' found='true'>
<input name='district_id-search-box' onchange='/* javascript to repopulate the select widget */'/> <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);})'/>
<select id='district_id' name='district_id' comment='JavaScript stuff to fix up aynchronous loading'> <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 %} {% for r in districts %}<option value='{{r.id}}' {% ifequal record.district_id r.id%}selected{% endifequal %}>{{r.name}}</option>{% endfor %}
</select> </select>
</div> </span>
{% else %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='district_id' name='district_id' class='pseudo-widget disabled'> <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 %}
{% endifmemberof %} {% endifmemberof %}
</p> </p>
{% ifmemberof admin %}
<p class='widget action-safe'> <p class='widget action-safe'>
<label for='save-button' class='action-safe'> <label for='save-button' class='action-safe'>
To save this addresses record To save this addresses record
</label> </label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/> <input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p> </p>
{% endifmemberof %}
{% ifmemberof admin %}
<p class='widget action-dangerous'> <p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'> <label for='delete-button' class='action-dangerous'>
To delete this addresses record To delete this addresses record
</label> </label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/> <input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p> </p>
{% endifmemberof %}
</form> </form>
</div> </div>
{% endblock %} {% 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" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% endblock %}
{% block content %} {% block content %}
<div id='content' class='edit'> <div id='content' class='edit'>
<form action='{{servlet-context}}/form-authorities-Authority' method='POST'> <form action='{{servlet-context}}/form-authorities-Authority' method='POST'>
@ -12,7 +15,7 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
id id
</label> </label>
{% ifmemberof admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'> <span id='id' name='id' class='pseudo-widget disabled'>
@ -26,108 +29,117 @@ You are not permitted to view id of authorities
{% endifmemberof %} {% endifmemberof %}
</p> </p>
<p class='widget'> <p class='widget'>
<label for='request-token-uri'> <label for='request_token_uri'>
request-token-uri request-token-uri
</label> </label>
{% ifmemberof admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='request-token-uri' name='request-token-uri' class='pseudo-widget disabled'> <span id='request_token_uri' name='request_token_uri' class='pseudo-widget disabled'>
{{record.request-token-uri}} {{record.request_token_uri}}
</span> </span>
{% else %} {% else %}
<span id='request-token-uri' name='request-token-uri' class='pseudo-widget not-authorised'> <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 You are not permitted to view request_token_uri of authorities
</span> </span>
{% endifmemberof %} {% endifmemberof %}
{% endifmemberof %} {% endifmemberof %}
</p> </p>
<p class='widget'> <p class='widget'>
<label for='access-token-uri'> <label for='access_token_uri'>
access-token-uri access-token-uri
</label> </label>
{% ifmemberof admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='access-token-uri' name='access-token-uri' class='pseudo-widget disabled'> <span id='access_token_uri' name='access_token_uri' class='pseudo-widget disabled'>
{{record.access-token-uri}} {{record.access_token_uri}}
</span> </span>
{% else %} {% else %}
<span id='access-token-uri' name='access-token-uri' class='pseudo-widget not-authorised'> <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 You are not permitted to view access_token_uri of authorities
</span> </span>
{% endifmemberof %} {% endifmemberof %}
{% endifmemberof %} {% endifmemberof %}
</p> </p>
<p class='widget'> <p class='widget'>
<label for='authorize-uri'> <label for='authorize_uri'>
authorize-uri authorize-uri
</label> </label>
{% ifmemberof admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='authorize-uri' name='authorize-uri' class='pseudo-widget disabled'> <span id='authorize_uri' name='authorize_uri' class='pseudo-widget disabled'>
{{record.authorize-uri}} {{record.authorize_uri}}
</span> </span>
{% else %} {% else %}
<span id='authorize-uri' name='authorize-uri' class='pseudo-widget not-authorised'> <span id='authorize_uri' name='authorize_uri' class='pseudo-widget not-authorised'>
You are not permitted to view authorize-uri of authorities You are not permitted to view authorize_uri of authorities
</span> </span>
{% endifmemberof %} {% endifmemberof %}
{% endifmemberof %} {% endifmemberof %}
</p> </p>
<p class='widget'> <p class='widget'>
<label for='consumer-key'> <label for='consumer_key'>
consumer-key consumer-key
</label> </label>
{% ifmemberof admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='consumer-key' name='consumer-key' class='pseudo-widget disabled'> <span id='consumer_key' name='consumer_key' class='pseudo-widget disabled'>
{{record.consumer-key}} {{record.consumer_key}}
</span> </span>
{% else %} {% else %}
<span id='consumer-key' name='consumer-key' class='pseudo-widget not-authorised'> <span id='consumer_key' name='consumer_key' class='pseudo-widget not-authorised'>
You are not permitted to view consumer-key of authorities You are not permitted to view consumer_key of authorities
</span> </span>
{% endifmemberof %} {% endifmemberof %}
{% endifmemberof %} {% endifmemberof %}
</p> </p>
<p class='widget'> <p class='widget'>
<label for='consumer-secret'> <label for='consumer_secret'>
consumer-secret consumer-secret
</label> </label>
{% ifmemberof admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='consumer-secret' name='consumer-secret' class='pseudo-widget disabled'> <span id='consumer_secret' name='consumer_secret' class='pseudo-widget disabled'>
{{record.consumer-secret}} {{record.consumer_secret}}
</span> </span>
{% else %} {% else %}
<span id='consumer-secret' name='consumer-secret' class='pseudo-widget not-authorised'> <span id='consumer_secret' name='consumer_secret' class='pseudo-widget not-authorised'>
You are not permitted to view consumer-secret of authorities You are not permitted to view consumer_secret of authorities
</span> </span>
{% endifmemberof %} {% endifmemberof %}
{% endifmemberof %} {% endifmemberof %}
</p> </p>
{% ifmemberof admin %}
<p class='widget action-safe'> <p class='widget action-safe'>
<label for='save-button' class='action-safe'> <label for='save-button' class='action-safe'>
To save this authorities record To save this authorities record
</label> </label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/> <input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p> </p>
{% endifmemberof %}
{% ifmemberof admin %}
<p class='widget action-dangerous'> <p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'> <label for='delete-button' class='action-dangerous'>
To delete this authorities record To delete this authorities record
</label> </label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/> <input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p> </p>
{% endifmemberof %}
</form> </form>
</div> </div>
{% endblock %} {% endblock %}
{% block extra-tail %}
<script type='text/javascript'>
</script>
{% endblock %}

View file

@ -1,8 +1,11 @@
{% extends "base.html" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% endblock %}
{% block content %} {% block content %}
<div id='content' class='edit'> <div id='content' class='edit'>
<form action='{{servlet-context}}/form-canvassers-Canvasser' method='POST'> <form action='{{servlet-context}}/form-canvassers-Canvasser' method='POST'>
@ -12,7 +15,7 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
id id
</label> </label>
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'> <span id='id' name='id' class='pseudo-widget disabled'>
@ -30,7 +33,7 @@ You are not permitted to view id of canvassers
username username
</label> </label>
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='username' name='username' class='pseudo-widget disabled'> <span id='username' name='username' class='pseudo-widget disabled'>
@ -48,7 +51,7 @@ You are not permitted to view username of canvassers
fullname fullname
</label> </label>
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='fullname' name='fullname' class='pseudo-widget disabled'> <span id='fullname' name='fullname' class='pseudo-widget disabled'>
@ -66,12 +69,13 @@ You are not permitted to view fullname of canvassers
elector_id elector_id
</label> </label>
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %} {% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<div class='select-box' farside='electors' found='true'> <span class='select-box' farside='electors' found='true'>
<input name='elector_id-search-box' onchange='/* javascript to repopulate the select widget */'/> <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);})'/>
<select id='elector_id' name='elector_id' comment='JavaScript stuff to fix up aynchronous loading'> <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 %} {% 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> </select>
</div> </span>
{% else %} {% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='elector_id' name='elector_id' class='pseudo-widget disabled'> <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 address_id
</label> </label>
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %} {% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<div class='select-box' farside='addresses' found='true'> <span class='select-box' farside='addresses' found='true'>
<input name='address_id-search-box' onchange='/* javascript to repopulate the select widget */'/> <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);})'/>
<select id='address_id' name='address_id' comment='JavaScript stuff to fix up aynchronous loading'> <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 %} {% for r in addresses %}<option value='{{r.id}}' {% ifequal record.address_id r.id%}selected{% endifequal %}>{{r.address}} {{r.postcode}}</option>{% endfor %}
</select> </select>
</div> </span>
{% else %} {% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='address_id' name='address_id' class='pseudo-widget disabled'> <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 phone
</label> </label>
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='phone' name='phone' class='pseudo-widget disabled'> <span id='phone' name='phone' class='pseudo-widget disabled'>
@ -130,7 +135,7 @@ You are not permitted to view phone of canvassers
email email
</label> </label>
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='email' name='email' class='pseudo-widget disabled'> <span id='email' name='email' class='pseudo-widget disabled'>
@ -148,12 +153,13 @@ You are not permitted to view email of canvassers
authority_id authority_id
</label> </label>
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %} {% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<div class='select-box' farside='authorities' found='true'> <span class='select-box' farside='authorities' found='true'>
<input name='authority_id-search-box' onchange='/* javascript to repopulate the select widget */'/> <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);})'/>
<select id='authority_id' name='authority_id' comment='JavaScript stuff to fix up aynchronous loading'> <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 %} {% for r in authorities %}<option value='{{r.id}}' {% ifequal record.authority_id r.id%}selected{% endifequal %}>{{r.id}}</option>{% endfor %}
</select> </select>
</div> </span>
{% else %} {% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='authority_id' name='authority_id' class='pseudo-widget disabled'> <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 roles
</label> </label>
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %} {% 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'> <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 %} {% for r in roles %}<option value='{{r.role_id}}' {% ifequal record.roles r.role_id%}selected{% endifequal %}>{{r.name}}</option>{% endfor %}
</select> </select>
</div> </span>
{% else %} {% else %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='roles' name='roles' class='pseudo-widget disabled'> <span id='roles' name='roles' class='pseudo-widget disabled'>
@ -206,19 +212,43 @@ You are not permitted to view roles of canvassers
{% endifmemberof %} {% endifmemberof %}
{% endifmemberof %} {% endifmemberof %}
</p> </p>
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<p class='widget action-safe'> <p class='widget action-safe'>
<label for='save-button' class='action-safe'> <label for='save-button' class='action-safe'>
To save this canvassers record To save this canvassers record
</label> </label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/> <input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p> </p>
{% endifmemberof %}
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
<p class='widget action-dangerous'> <p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'> <label for='delete-button' class='action-dangerous'>
To delete this canvassers record To delete this canvassers record
</label> </label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/> <input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p> </p>
{% endifmemberof %}
</form> </form>
</div> </div>
{% endblock %} {% 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" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% endblock %}
{% block content %} {% block content %}
<div id='content' class='edit'> <div id='content' class='edit'>
<form action='{{servlet-context}}/form-districts-District' method='POST'> <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'> <label for='id'>
id id
</label> </label>
{% ifmemberof admin admin %} {% 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 %} {% 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'> <span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}} {{record.id}}
</span> </span>
@ -29,10 +32,10 @@ You are not permitted to view id of districts
<label for='name'> <label for='name'>
name name
</label> </label>
{% ifmemberof admin admin %} {% 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 %} {% 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'> <span id='name' name='name' class='pseudo-widget disabled'>
{{record.name}} {{record.name}}
</span> </span>
@ -43,19 +46,28 @@ You are not permitted to view name of districts
{% endifmemberof %} {% endifmemberof %}
{% endifmemberof %} {% endifmemberof %}
</p> </p>
{% ifmemberof admin %}
<p class='widget action-safe'> <p class='widget action-safe'>
<label for='save-button' class='action-safe'> <label for='save-button' class='action-safe'>
To save this districts record To save this districts record
</label> </label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/> <input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p> </p>
{% endifmemberof %}
{% ifmemberof admin %}
<p class='widget action-dangerous'> <p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'> <label for='delete-button' class='action-dangerous'>
To delete this districts record To delete this districts record
</label> </label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/> <input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p> </p>
{% endifmemberof %}
</form> </form>
</div> </div>
{% endblock %} {% endblock %}
{% block extra-tail %}
<script type='text/javascript'>
</script>
{% endblock %}

View file

@ -1,8 +1,11 @@
{% extends "base.html" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% endblock %}
{% block content %} {% block content %}
<div id='content' class='edit'> <div id='content' class='edit'>
<form action='{{servlet-context}}/form-dwellings-Dwelling' method='POST'> <form action='{{servlet-context}}/form-dwellings-Dwelling' method='POST'>
@ -12,7 +15,7 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
id id
</label> </label>
{% ifmemberof admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'> <span id='id' name='id' class='pseudo-widget disabled'>
@ -30,12 +33,13 @@ You are not permitted to view id of dwellings
address_id address_id
</label> </label>
{% ifmemberof admin %} {% ifmemberof admin %}
<div class='select-box' farside='addresses' found='true'> <span class='select-box' farside='addresses' found='true'>
<input name='address_id-search-box' onchange='/* javascript to repopulate the select widget */'/> <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);})'/>
<select id='address_id' name='address_id' comment='JavaScript stuff to fix up aynchronous loading'> <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 %} {% for r in addresses %}<option value='{{r.id}}' {% ifequal record.address_id r.id%}selected{% endifequal %}>{{r.address}} {{r.postcode}}</option>{% endfor %}
</select> </select>
</div> </span>
{% else %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='address_id' name='address_id' class='pseudo-widget disabled'> <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 %} {% endifmemberof %}
</p> </p>
<p class='widget'> <p class='widget'>
<label for='sub-address'> <label for='sub_address'>
sub-address sub-address
</label> </label>
{% ifmemberof admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='sub-address' name='sub-address' class='pseudo-widget disabled'> <span id='sub_address' name='sub_address' class='pseudo-widget disabled'>
{{record.sub-address}} {{record.sub_address}}
</span> </span>
{% else %} {% else %}
<span id='sub-address' name='sub-address' class='pseudo-widget not-authorised'> <span id='sub_address' name='sub_address' class='pseudo-widget not-authorised'>
You are not permitted to view sub-address of dwellings You are not permitted to view sub_address of dwellings
</span> </span>
{% endifmemberof %} {% endifmemberof %}
{% endifmemberof %} {% endifmemberof %}
</p> </p>
{% ifmemberof admin %}
<p class='widget action-safe'> <p class='widget action-safe'>
<label for='save-button' class='action-safe'> <label for='save-button' class='action-safe'>
To save this dwellings record To save this dwellings record
</label> </label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/> <input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p> </p>
{% endifmemberof %}
{% ifmemberof admin %}
<p class='widget action-dangerous'> <p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'> <label for='delete-button' class='action-dangerous'>
To delete this dwellings record To delete this dwellings record
</label> </label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/> <input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p> </p>
{% endifmemberof %}
</form> </form>
</div> </div>
{% endblock %} {% 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" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% endblock %}
{% block content %} {% block content %}
<div id='content' class='edit'> <div id='content' class='edit'>
<form action='{{servlet-context}}/form-electors-Elector' method='POST'> <form action='{{servlet-context}}/form-electors-Elector' method='POST'>
@ -12,7 +15,7 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
id id
</label> </label>
{% ifmemberof admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'> <span id='id' name='id' class='pseudo-widget disabled'>
@ -30,7 +33,7 @@ You are not permitted to view id of electors
name name
</label> </label>
{% ifmemberof admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='name' name='name' class='pseudo-widget disabled'> <span id='name' name='name' class='pseudo-widget disabled'>
@ -48,12 +51,13 @@ You are not permitted to view name of electors
dwelling_id dwelling_id
</label> </label>
{% ifmemberof admin %} {% ifmemberof admin %}
<div class='select-box' farside='dwellings' found='true'> <span class='select-box' farside='dwellings' found='true'>
<input name='dwelling_id-search-box' onchange='/* javascript to repopulate the select widget */'/> <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);})'/>
<select id='dwelling_id' name='dwelling_id' comment='JavaScript stuff to fix up aynchronous loading'> <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 %} {% 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> </select>
</div> </span>
{% else %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='dwelling_id' name='dwelling_id' class='pseudo-widget disabled'> <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 phone
</label> </label>
{% ifmemberof admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='phone' name='phone' class='pseudo-widget disabled'> <span id='phone' name='phone' class='pseudo-widget disabled'>
@ -89,7 +93,7 @@ You are not permitted to view phone of electors
email email
</label> </label>
{% ifmemberof admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='email' name='email' class='pseudo-widget disabled'> <span id='email' name='email' class='pseudo-widget disabled'>
@ -107,11 +111,11 @@ You are not permitted to view email of electors
gender gender
</label> </label>
{% ifmemberof admin %} {% ifmemberof admin %}
<div class='select-box' farside='genders' found='true'> <span class='select-box' farside='genders' found='true'>
<select id='gender' name='gender'> <select id='gender' name='gender'>
{% for r in genders %}<option value='{{r.id}}' {% ifequal record.gender r.id%}selected{% endifequal %}>{{r.id}}</option>{% endfor %} {% for r in genders %}<option value='{{r.id}}' {% ifequal record.gender r.id%}selected{% endifequal %}>{{r.id}}</option>{% endfor %}
</select> </select>
</div> </span>
{% else %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='gender' name='gender' class='pseudo-widget disabled'> <span id='gender' name='gender' class='pseudo-widget disabled'>
@ -124,19 +128,43 @@ You are not permitted to view gender of electors
{% endifmemberof %} {% endifmemberof %}
{% endifmemberof %} {% endifmemberof %}
</p> </p>
{% ifmemberof admin %}
<p class='widget action-safe'> <p class='widget action-safe'>
<label for='save-button' class='action-safe'> <label for='save-button' class='action-safe'>
To save this electors record To save this electors record
</label> </label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/> <input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p> </p>
{% endifmemberof %}
{% ifmemberof admin %}
<p class='widget action-dangerous'> <p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'> <label for='delete-button' class='action-dangerous'>
To delete this electors record To delete this electors record
</label> </label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/> <input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p> </p>
{% endifmemberof %}
</form> </form>
</div> </div>
{% endblock %} {% 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" %} {% 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).--> 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 %} {% block content %}
<div id='content' class='edit'> <div id='content' class='edit'>
<form action='{{servlet-context}}/form-followupactions-Followupaction' method='POST'> <form action='{{servlet-context}}/form-followupactions-Followupaction' method='POST'>
@ -12,7 +16,7 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
id id
</label> </label>
{% ifmemberof admin %} {% 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 %} {% else %}
{% ifmemberof issueexperts canvassers analysts issueeditors admin %} {% ifmemberof issueexperts canvassers analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'> <span id='id' name='id' class='pseudo-widget disabled'>
@ -30,12 +34,13 @@ You are not permitted to view id of followupactions
request_id request_id
</label> </label>
{% ifmemberof admin %} {% ifmemberof admin %}
<div class='select-box' farside='followuprequests' found='true'> <span class='select-box' farside='followuprequests' found='true'>
<input name='request_id-search-box' onchange='/* javascript to repopulate the select widget */'/> <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);})'/>
<select id='request_id' name='request_id' comment='JavaScript stuff to fix up aynchronous loading'> <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 %} {% 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> </select>
</div> </span>
{% else %} {% else %}
{% ifmemberof issueexperts canvassers analysts issueeditors admin %} {% ifmemberof issueexperts canvassers analysts issueeditors admin %}
<span id='request_id' name='request_id' class='pseudo-widget disabled'> <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 actor
</label> </label>
{% ifmemberof admin %} {% ifmemberof admin %}
<div class='select-box' farside='canvassers' found='true'> <span class='select-box' farside='canvassers' found='true'>
<input name='actor-search-box' onchange='/* javascript to repopulate the select widget */'/> <input name='actor_search_box' onchange='$.getJSON("/auto/json/seach-strings-canvassers?=" + actor_search_box.text, null, function (data) {updateMenuOptions("actor", "", [""], data);})'/>
<select id='actor' name='actor' comment='JavaScript stuff to fix up aynchronous loading'> <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 %} {% 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> </select>
</div> </span>
{% else %} {% else %}
{% ifmemberof issueexperts canvassers analysts issueeditors admin %} {% ifmemberof issueexperts canvassers analysts issueeditors admin %}
<span id='actor' name='actor' class='pseudo-widget disabled'> <span id='actor' name='actor' class='pseudo-widget disabled'>
@ -76,7 +82,7 @@ You are not permitted to view actor of followupactions
date date
</label> </label>
{% ifmemberof admin %} {% 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 %} {% else %}
{% ifmemberof issueexperts canvassers analysts issueeditors admin %} {% ifmemberof issueexperts canvassers analysts issueeditors admin %}
<span id='date' name='date' class='pseudo-widget disabled'> <span id='date' name='date' class='pseudo-widget disabled'>
@ -94,7 +100,9 @@ You are not permitted to view date of followupactions
notes notes
</label> </label>
{% ifmemberof admin %} {% 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 %} {% else %}
{% ifmemberof issueexperts canvassers analysts issueeditors admin %} {% ifmemberof issueexperts canvassers analysts issueeditors admin %}
<span id='notes' name='notes' class='pseudo-widget disabled'> <span id='notes' name='notes' class='pseudo-widget disabled'>
@ -125,19 +133,61 @@ You are not permitted to view closed of followupactions
{% endifmemberof %} {% endifmemberof %}
{% endifmemberof %} {% endifmemberof %}
</p> </p>
{% ifmemberof admin %}
<p class='widget action-safe'> <p class='widget action-safe'>
<label for='save-button' class='action-safe'> <label for='save-button' class='action-safe'>
To save this followupactions record To save this followupactions record
</label> </label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/> <input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p> </p>
{% endifmemberof %}
{% ifmemberof admin %}
<p class='widget action-dangerous'> <p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'> <label for='delete-button' class='action-dangerous'>
To delete this followupactions record To delete this followupactions record
</label> </label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/> <input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p> </p>
{% endifmemberof %}
</form> </form>
</div> </div>
{% endblock %} {% 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" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% endblock %}
{% block content %} {% block content %}
<div id='content' class='edit'> <div id='content' class='edit'>
<form action='{{servlet-context}}/form-followupmethods-Followupmethod' method='POST'> <form action='{{servlet-context}}/form-followupmethods-Followupmethod' method='POST'>
@ -12,7 +15,7 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
id id
</label> </label>
{% ifmemberof admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'> <span id='id' name='id' class='pseudo-widget disabled'>
@ -25,19 +28,28 @@ You are not permitted to view id of followupmethods
{% endifmemberof %} {% endifmemberof %}
{% endifmemberof %} {% endifmemberof %}
</p> </p>
{% ifmemberof admin %}
<p class='widget action-safe'> <p class='widget action-safe'>
<label for='save-button' class='action-safe'> <label for='save-button' class='action-safe'>
To save this followupmethods record To save this followupmethods record
</label> </label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/> <input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p> </p>
{% endifmemberof %}
{% ifmemberof admin %}
<p class='widget action-dangerous'> <p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'> <label for='delete-button' class='action-dangerous'>
To delete this followupmethods record To delete this followupmethods record
</label> </label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/> <input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p> </p>
{% endifmemberof %}
</form> </form>
</div> </div>
{% endblock %} {% endblock %}
{% block extra-tail %}
<script type='text/javascript'>
</script>
{% endblock %}

View file

@ -1,8 +1,11 @@
{% extends "base.html" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% endblock %}
{% block content %} {% block content %}
<div id='content' class='edit'> <div id='content' class='edit'>
<form action='{{servlet-context}}/form-followuprequests-Followuprequest' method='POST'> <form action='{{servlet-context}}/form-followuprequests-Followuprequest' method='POST'>
@ -12,7 +15,7 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
id id
</label> </label>
{% ifmemberof admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'> <span id='id' name='id' class='pseudo-widget disabled'>
@ -30,12 +33,13 @@ You are not permitted to view id of followuprequests
elector_id elector_id
</label> </label>
{% ifmemberof admin %} {% ifmemberof admin %}
<div class='select-box' farside='electors' found='true'> <span class='select-box' farside='electors' found='true'>
<input name='elector_id-search-box' onchange='/* javascript to repopulate the select widget */'/> <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);})'/>
<select id='elector_id' name='elector_id' comment='JavaScript stuff to fix up aynchronous loading'> <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 %} {% 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> </select>
</div> </span>
{% else %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='elector_id' name='elector_id' class='pseudo-widget disabled'> <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 visit_id
</label> </label>
{% ifmemberof admin %} {% ifmemberof admin %}
<div class='select-box' farside='visits' found='true'> <span class='select-box' farside='visits' found='true'>
<input name='visit_id-search-box' onchange='/* javascript to repopulate the select widget */'/> <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);})'/>
<select id='visit_id' name='visit_id' comment='JavaScript stuff to fix up aynchronous loading'> <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 %} {% for r in visits %}<option value='{{r.id}}' {% ifequal record.visit_id r.id%}selected{% endifequal %}>{{r.address_id}} {{r.date}}</option>{% endfor %}
</select> </select>
</div> </span>
{% else %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='visit_id' name='visit_id' class='pseudo-widget disabled'> <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 issue_id
</label> </label>
{% ifmemberof admin %} {% 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'> <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 %} {% for r in issues %}<option value='{{r.id}}' {% ifequal record.issue_id r.id%}selected{% endifequal %}>{{r.id}}</option>{% endfor %}
</select> </select>
</div> </span>
{% else %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='issue_id' name='issue_id' class='pseudo-widget disabled'> <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 method_id
</label> </label>
{% ifmemberof admin %} {% 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'> <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 %} {% for r in followupmethods %}<option value='{{r.id}}' {% ifequal record.method_id r.id%}selected{% endifequal %}>{{r.id}}</option>{% endfor %}
</select> </select>
</div> </span>
{% else %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='method_id' name='method_id' class='pseudo-widget disabled'> <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 %}
{% endifmemberof %} {% endifmemberof %}
</p> </p>
{% ifmemberof admin %}
<p class='widget action-safe'> <p class='widget action-safe'>
<label for='save-button' class='action-safe'> <label for='save-button' class='action-safe'>
To save this followuprequests record To save this followuprequests record
</label> </label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/> <input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p> </p>
{% endifmemberof %}
{% ifmemberof admin %}
<p class='widget action-dangerous'> <p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'> <label for='delete-button' class='action-dangerous'>
To delete this followuprequests record To delete this followuprequests record
</label> </label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/> <input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p> </p>
{% endifmemberof %}
</form> </form>
</div> </div>
{% endblock %} {% 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" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% endblock %}
{% block content %} {% block content %}
<div id='content' class='edit'> <div id='content' class='edit'>
<form action='{{servlet-context}}/form-genders-Gender' method='POST'> <form action='{{servlet-context}}/form-genders-Gender' method='POST'>
@ -12,7 +15,7 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
id id
</label> </label>
{% ifmemberof admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'> <span id='id' name='id' class='pseudo-widget disabled'>
@ -25,19 +28,28 @@ You are not permitted to view id of genders
{% endifmemberof %} {% endifmemberof %}
{% endifmemberof %} {% endifmemberof %}
</p> </p>
{% ifmemberof admin %}
<p class='widget action-safe'> <p class='widget action-safe'>
<label for='save-button' class='action-safe'> <label for='save-button' class='action-safe'>
To save this genders record To save this genders record
</label> </label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/> <input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p> </p>
{% endifmemberof %}
{% ifmemberof admin %}
<p class='widget action-dangerous'> <p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'> <label for='delete-button' class='action-dangerous'>
To delete this genders record To delete this genders record
</label> </label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/> <input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p> </p>
{% endifmemberof %}
</form> </form>
</div> </div>
{% endblock %} {% endblock %}
{% block extra-tail %}
<script type='text/javascript'>
</script>
{% endblock %}

View file

@ -1,8 +1,11 @@
{% extends "base.html" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% endblock %}
{% block content %} {% block content %}
<div id='content' class='edit'> <div id='content' class='edit'>
<form action='{{servlet-context}}/form-intentions-Intention' method='POST'> <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 visit_id
</label> </label>
{% ifmemberof admin %} {% ifmemberof admin %}
<div class='select-box' farside='visits' found='true'> <span class='select-box' farside='visits' found='true'>
<input name='visit_id-search-box' onchange='/* javascript to repopulate the select widget */'/> <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);})'/>
<select id='visit_id' name='visit_id' comment='JavaScript stuff to fix up aynchronous loading'> <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 %} {% for r in visits %}<option value='{{r.id}}' {% ifequal record.visit_id r.id%}selected{% endifequal %}>{{r.address_id}} {{r.date}}</option>{% endfor %}
</select> </select>
</div> </span>
{% else %} {% else %}
{% ifmemberof canvassers analysts admin %} {% ifmemberof canvassers analysts admin %}
<span id='visit_id' name='visit_id' class='pseudo-widget disabled'> <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 elector_id
</label> </label>
{% ifmemberof admin %} {% ifmemberof admin %}
<div class='select-box' farside='electors' found='true'> <span class='select-box' farside='electors' found='true'>
<input name='elector_id-search-box' onchange='/* javascript to repopulate the select widget */'/> <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);})'/>
<select id='elector_id' name='elector_id' comment='JavaScript stuff to fix up aynchronous loading'> <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 %} {% 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> </select>
</div> </span>
{% else %} {% else %}
{% ifmemberof canvassers analysts admin %} {% ifmemberof canvassers analysts admin %}
<span id='elector_id' name='elector_id' class='pseudo-widget disabled'> <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 option_id
</label> </label>
{% ifmemberof admin %} {% 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'> <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 %} {% for r in options %}<option value='{{r.id}}' {% ifequal record.option_id r.id%}selected{% endifequal %}>{{r.id}}</option>{% endfor %}
</select> </select>
</div> </span>
{% else %} {% else %}
{% ifmemberof canvassers analysts admin %} {% ifmemberof canvassers analysts admin %}
<span id='option_id' name='option_id' class='pseudo-widget disabled'> <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 %}
{% endifmemberof %} {% endifmemberof %}
</p> </p>
{% ifmemberof admin %}
<p class='widget action-safe'> <p class='widget action-safe'>
<label for='save-button' class='action-safe'> <label for='save-button' class='action-safe'>
To save this intentions record To save this intentions record
</label> </label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/> <input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p> </p>
{% endifmemberof %}
{% ifmemberof admin %}
<p class='widget action-dangerous'> <p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'> <label for='delete-button' class='action-dangerous'>
To delete this intentions record To delete this intentions record
</label> </label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/> <input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p> </p>
{% endifmemberof %}
</form> </form>
</div> </div>
{% endblock %} {% 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" %} {% 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).--> 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 %} {% block content %}
<div id='content' class='edit'> <div id='content' class='edit'>
<form action='{{servlet-context}}/form-issues-Issue' method='POST'> <form action='{{servlet-context}}/form-issues-Issue' method='POST'>
@ -12,7 +16,7 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
id id
</label> </label>
{% ifmemberof issueeditors admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'> <span id='id' name='id' class='pseudo-widget disabled'>
@ -30,7 +34,7 @@ You are not permitted to view id of issues
url url
</label> </label>
{% ifmemberof issueeditors admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='url' name='url' class='pseudo-widget disabled'> <span id='url' name='url' class='pseudo-widget disabled'>
@ -66,7 +70,9 @@ You are not permitted to view current of issues
brief brief
</label> </label>
{% ifmemberof issueeditors admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='brief' name='brief' class='pseudo-widget disabled'> <span id='brief' name='brief' class='pseudo-widget disabled'>
@ -79,19 +85,46 @@ You are not permitted to view brief of issues
{% endifmemberof %} {% endifmemberof %}
{% endifmemberof %} {% endifmemberof %}
</p> </p>
{% ifmemberof issueeditors admin %}
<p class='widget action-safe'> <p class='widget action-safe'>
<label for='save-button' class='action-safe'> <label for='save-button' class='action-safe'>
To save this issues record To save this issues record
</label> </label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/> <input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p> </p>
{% endifmemberof %}
{% ifmemberof issueeditors admin %}
<p class='widget action-dangerous'> <p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'> <label for='delete-button' class='action-dangerous'>
To delete this issues record To delete this issues record
</label> </label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/> <input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p> </p>
{% endifmemberof %}
</form> </form>
</div> </div>
{% endblock %} {% 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" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% endblock %}
{% block content %} {% block content %}
<div id='content' class='edit'> <div id='content' class='edit'>
<form action='{{servlet-context}}/form-options-Option' method='POST'> <form action='{{servlet-context}}/form-options-Option' method='POST'>
@ -12,7 +15,7 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
id id
</label> </label>
{% ifmemberof admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'> <span id='id' name='id' class='pseudo-widget disabled'>
@ -25,19 +28,28 @@ You are not permitted to view id of options
{% endifmemberof %} {% endifmemberof %}
{% endifmemberof %} {% endifmemberof %}
</p> </p>
{% ifmemberof admin %}
<p class='widget action-safe'> <p class='widget action-safe'>
<label for='save-button' class='action-safe'> <label for='save-button' class='action-safe'>
To save this options record To save this options record
</label> </label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/> <input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p> </p>
{% endifmemberof %}
{% ifmemberof admin %}
<p class='widget action-dangerous'> <p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'> <label for='delete-button' class='action-dangerous'>
To delete this options record To delete this options record
</label> </label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/> <input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p> </p>
{% endifmemberof %}
</form> </form>
</div> </div>
{% endblock %} {% endblock %}
{% block extra-tail %}
<script type='text/javascript'>
</script>
{% endblock %}

View file

@ -1,8 +1,11 @@
{% extends "base.html" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% endblock %}
{% block content %} {% block content %}
<div id='content' class='edit'> <div id='content' class='edit'>
<form action='{{servlet-context}}/form-roles-Role' method='POST'> <form action='{{servlet-context}}/form-roles-Role' method='POST'>
@ -12,7 +15,7 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
id id
</label> </label>
{% ifmemberof admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'> <span id='id' name='id' class='pseudo-widget disabled'>
@ -30,7 +33,7 @@ You are not permitted to view id of roles
name name
</label> </label>
{% ifmemberof admin %} {% 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 %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='name' name='name' class='pseudo-widget disabled'> <span id='name' name='name' class='pseudo-widget disabled'>
@ -48,12 +51,13 @@ You are not permitted to view name of roles
members members
</label> </label>
{% ifmemberof admin %} {% ifmemberof admin %}
<div class='select-box' farside='canvassers' found='true'> <span class='select-box' farside='canvassers' found='true'>
<input name='members-search-box' onchange='/* javascript to repopulate the select widget */'/> <input name='members_search_box' onchange='$.getJSON("/auto/json/seach-strings-canvassers?=" + members_search_box.text, null, function (data) {updateMenuOptions("members", "", [""], data);})'/>
<select id='members' name='members' multiple='multiple' comment='JavaScript stuff to fix up aynchronous loading'> <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 %} {% 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> </select>
</div> </span>
{% else %} {% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %} {% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='members' name='members' class='pseudo-widget disabled'> <span id='members' name='members' class='pseudo-widget disabled'>
@ -66,19 +70,43 @@ You are not permitted to view members of roles
{% endifmemberof %} {% endifmemberof %}
{% endifmemberof %} {% endifmemberof %}
</p> </p>
{% ifmemberof admin %}
<p class='widget action-safe'> <p class='widget action-safe'>
<label for='save-button' class='action-safe'> <label for='save-button' class='action-safe'>
To save this roles record To save this roles record
</label> </label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/> <input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p> </p>
{% endifmemberof %}
{% ifmemberof admin %}
<p class='widget action-dangerous'> <p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'> <label for='delete-button' class='action-dangerous'>
To delete this roles record To delete this roles record
</label> </label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/> <input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p> </p>
{% endifmemberof %}
</form> </form>
</div> </div>
{% endblock %} {% 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" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% endblock %}
{% block content %} {% block content %}
<div id='content' class='edit'> <div id='content' class='edit'>
<form action='{{servlet-context}}/form-teams-Team' method='POST'> <form action='{{servlet-context}}/form-teams-Team' method='POST'>
@ -12,9 +15,9 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
id id
</label> </label>
{% ifmemberof teamorganisers admin teamorganisers admin %} {% 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 %} {% 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'> <span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}} {{record.id}}
</span> </span>
@ -30,9 +33,9 @@ You are not permitted to view id of teams
name name
</label> </label>
{% ifmemberof teamorganisers admin teamorganisers admin %} {% 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 %} {% 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'> <span id='name' name='name' class='pseudo-widget disabled'>
{{record.name}} {{record.name}}
</span> </span>
@ -48,14 +51,15 @@ You are not permitted to view name of teams
district_id district_id
</label> </label>
{% ifmemberof teamorganisers admin teamorganisers admin %} {% ifmemberof teamorganisers admin teamorganisers admin %}
<div class='select-box' farside='districts' found='true'> <span class='select-box' farside='districts' found='true'>
<input name='district_id-search-box' onchange='/* javascript to repopulate the select widget */'/> <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);})'/>
<select id='district_id' name='district_id' comment='JavaScript stuff to fix up aynchronous loading'> <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 %} {% for r in districts %}<option value='{{r.id}}' {% ifequal record.district_id r.id%}selected{% endifequal %}>{{r.name}}</option>{% endfor %}
</select> </select>
</div> </span>
{% else %} {% 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'> <span id='district_id' name='district_id' class='pseudo-widget disabled'>
{{record.district_id}} {{record.district_id}}
</span> </span>
@ -73,7 +77,7 @@ latitude
{% ifmemberof teamorganisers admin teamorganisers admin %} {% ifmemberof teamorganisers admin teamorganisers admin %}
<input id='latitude' name='latitude' type='number' value='{{record.latitude}}' maxlength='' size='16'/> <input id='latitude' name='latitude' type='number' value='{{record.latitude}}' maxlength='' size='16'/>
{% else %} {% 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'> <span id='latitude' name='latitude' class='pseudo-widget disabled'>
{{record.latitude}} {{record.latitude}}
</span> </span>
@ -89,14 +93,15 @@ You are not permitted to view latitude of teams
members members
</label> </label>
{% ifmemberof teamorganisers admin teamorganisers admin %} {% ifmemberof teamorganisers admin teamorganisers admin %}
<div class='select-box' farside='canvassers' found='true'> <span class='select-box' farside='canvassers' found='true'>
<input name='members-search-box' onchange='/* javascript to repopulate the select widget */'/> <input name='members_search_box' onchange='$.getJSON("/auto/json/seach-strings-canvassers?=" + members_search_box.text, null, function (data) {updateMenuOptions("members", "", [""], data);})'/>
<select id='members' name='members' multiple='multiple' comment='JavaScript stuff to fix up aynchronous loading'> <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 %} {% 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> </select>
</div> </span>
{% else %} {% 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'> <span id='members' name='members' class='pseudo-widget disabled'>
{{record.members}} {{record.members}}
</span> </span>
@ -112,14 +117,15 @@ You are not permitted to view members of teams
organisers organisers
</label> </label>
{% ifmemberof teamorganisers admin teamorganisers admin %} {% ifmemberof teamorganisers admin teamorganisers admin %}
<div class='select-box' farside='canvassers' found='true'> <span class='select-box' farside='canvassers' found='true'>
<input name='organisers-search-box' onchange='/* javascript to repopulate the select widget */'/> <input name='organisers_search_box' onchange='$.getJSON("/auto/json/seach-strings-canvassers?=" + organisers_search_box.text, null, function (data) {updateMenuOptions("organisers", "", [""], data);})'/>
<select id='organisers' name='organisers' multiple='multiple' comment='JavaScript stuff to fix up aynchronous loading'> <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 %} {% 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> </select>
</div> </span>
{% else %} {% 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'> <span id='organisers' name='organisers' class='pseudo-widget disabled'>
{{record.organisers}} {{record.organisers}}
</span> </span>
@ -137,7 +143,7 @@ longitude
{% ifmemberof teamorganisers admin teamorganisers admin %} {% ifmemberof teamorganisers admin teamorganisers admin %}
<input id='longitude' name='longitude' type='number' value='{{record.longitude}}' maxlength='' size='16'/> <input id='longitude' name='longitude' type='number' value='{{record.longitude}}' maxlength='' size='16'/>
{% else %} {% 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'> <span id='longitude' name='longitude' class='pseudo-widget disabled'>
{{record.longitude}} {{record.longitude}}
</span> </span>
@ -148,19 +154,43 @@ You are not permitted to view longitude of teams
{% endifmemberof %} {% endifmemberof %}
{% endifmemberof %} {% endifmemberof %}
</p> </p>
{% ifmemberof teamorganisers admin teamorganisers admin %}
<p class='widget action-safe'> <p class='widget action-safe'>
<label for='save-button' class='action-safe'> <label for='save-button' class='action-safe'>
To save this teams record To save this teams record
</label> </label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/> <input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p> </p>
{% endifmemberof %}
{% ifmemberof teamorganisers admin teamorganisers admin %}
<p class='widget action-dangerous'> <p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'> <label for='delete-button' class='action-dangerous'>
To delete this teams record To delete this teams record
</label> </label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/> <input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p> </p>
{% endifmemberof %}
</form> </form>
</div> </div>
{% endblock %} {% 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" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% endblock %}
{% block content %} {% block content %}
<div id='content' class='edit'> <div id='content' class='edit'>
<form action='{{servlet-context}}/form-visits-Visit' method='POST'> <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'> <label for='id'>
id id
</label> </label>
{% ifmemberof admin admin %} {% 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 %} {% 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'> <span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}} {{record.id}}
</span> </span>
@ -29,15 +32,16 @@ You are not permitted to view id of visits
<label for='address_id'> <label for='address_id'>
address_id address_id
</label> </label>
{% ifmemberof admin admin %} {% ifmemberof admin %}
<div class='select-box' farside='addresses' found='true'> <span class='select-box' farside='addresses' found='true'>
<input name='address_id-search-box' onchange='/* javascript to repopulate the select widget */'/> <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);})'/>
<select id='address_id' name='address_id' comment='JavaScript stuff to fix up aynchronous loading'> <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 %} {% for r in addresses %}<option value='{{r.id}}' {% ifequal record.address_id r.id%}selected{% endifequal %}>{{r.address}} {{r.postcode}}</option>{% endfor %}
</select> </select>
</div> </span>
{% else %} {% 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'> <span id='address_id' name='address_id' class='pseudo-widget disabled'>
{{record.address_id}} {{record.address_id}}
</span> </span>
@ -52,15 +56,16 @@ You are not permitted to view address_id of visits
<label for='canvasser_id'> <label for='canvasser_id'>
canvasser_id canvasser_id
</label> </label>
{% ifmemberof admin admin %} {% ifmemberof admin %}
<div class='select-box' farside='canvassers' found='true'> <span class='select-box' farside='canvassers' found='true'>
<input name='canvasser_id-search-box' onchange='/* javascript to repopulate the select widget */'/> <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);})'/>
<select id='canvasser_id' name='canvasser_id' comment='JavaScript stuff to fix up aynchronous loading'> <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 %} {% 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> </select>
</div> </span>
{% else %} {% 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'> <span id='canvasser_id' name='canvasser_id' class='pseudo-widget disabled'>
{{record.canvasser_id}} {{record.canvasser_id}}
</span> </span>
@ -75,10 +80,10 @@ You are not permitted to view canvasser_id of visits
<label for='date'> <label for='date'>
date date
</label> </label>
{% ifmemberof admin admin %} {% 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 %} {% 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'> <span id='date' name='date' class='pseudo-widget disabled'>
{{record.date}} {{record.date}}
</span> </span>
@ -89,19 +94,43 @@ You are not permitted to view date of visits
{% endifmemberof %} {% endifmemberof %}
{% endifmemberof %} {% endifmemberof %}
</p> </p>
{% ifmemberof admin %}
<p class='widget action-safe'> <p class='widget action-safe'>
<label for='save-button' class='action-safe'> <label for='save-button' class='action-safe'>
To save this visits record To save this visits record
</label> </label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/> <input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p> </p>
{% endifmemberof %}
{% ifmemberof admin %}
<p class='widget action-dangerous'> <p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'> <label for='delete-button' class='action-dangerous'>
To delete this visits record To delete this visits record
</label> </label>
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/> <input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
</p> </p>
{% endifmemberof %}
</form> </form>
</div> </div>
{% endblock %} {% 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" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %} {% block back-links %}
<form id='content' class='list'> <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'> <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 Add a new Address
</a> </a>
</div> </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'> <table caption='addresses'>
<thead> <thead>
<tr> <tr>
@ -34,6 +65,9 @@ latitude
<th> <th>
longitude longitude
</th> </th>
<th>
&nbsp;
</th>
</tr> </tr>
<tr> <tr>
<th> <th>
@ -58,7 +92,7 @@ longitude
<input id='longitude' type='number' name='longitude' value='{{ params.longitude }}'/> <input id='longitude' type='number' name='longitude' value='{{ params.longitude }}'/>
</th> </th>
<th> <th>
<input type='submit' id='search' value='Search'/> <input type='submit' id='search-widget' value='Search'/>
</th> </th>
</tr> </tr>
</thead> </thead>
@ -96,15 +130,30 @@ View
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </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> </table>
</form> </form>
{% endblock %} {% 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" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %} {% block back-links %}
<form id='content' class='list'> <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'> <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 Add a new Authority
</a> </a>
</div> </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'> <table caption='authorities'>
<thead> <thead>
<tr> <tr>
@ -25,6 +56,9 @@ access-token-uri
<th> <th>
authorize-uri authorize-uri
</th> </th>
<th>
&nbsp;
</th>
</tr> </tr>
<tr> <tr>
<th> <th>
@ -40,7 +74,7 @@ authorize-uri
<input id='authorize_uri' type='text' name='authorize_uri' value='{{ params.authorize_uri }}'/> <input id='authorize_uri' type='text' name='authorize_uri' value='{{ params.authorize_uri }}'/>
</th> </th>
<th> <th>
<input type='submit' id='search' value='Search'/> <input type='submit' id='search-widget' value='Search'/>
</th> </th>
</tr> </tr>
</thead> </thead>
@ -67,15 +101,30 @@ View
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </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> </table>
</form> </form>
{% endblock %} {% 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" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %} {% block back-links %}
<form id='content' class='list'> <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'> <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 Add a new Canvasser
</a> </a>
</div> </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'> <table caption='canvassers'>
<thead> <thead>
<tr> <tr>
@ -40,6 +71,9 @@ authority_id
<th> <th>
authorised authorised
</th> </th>
<th>
&nbsp;
</th>
</tr> </tr>
<tr> <tr>
<th> <th>
@ -70,7 +104,7 @@ authorised
<input id='authorised' type='text' name='authorised' value='{{ params.authorised }}'/> <input id='authorised' type='text' name='authorised' value='{{ params.authorised }}'/>
</th> </th>
<th> <th>
<input type='submit' id='search' value='Search'/> <input type='submit' id='search-widget' value='Search'/>
</th> </th>
</tr> </tr>
</thead> </thead>
@ -118,15 +152,30 @@ View
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </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> </table>
</form> </form>
{% endblock %} {% 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" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %} {% block back-links %}
<form id='content' class='list'> <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'> <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 Add a new District
</a> </a>
</div> </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'> <table caption='districts'>
<thead> <thead>
<tr> <tr>
@ -19,6 +50,9 @@ id
<th> <th>
name name
</th> </th>
<th>
&nbsp;
</th>
</tr> </tr>
<tr> <tr>
<th> <th>
@ -28,7 +62,7 @@ name
<input id='name' type='text' name='name' value='{{ params.name }}'/> <input id='name' type='text' name='name' value='{{ params.name }}'/>
</th> </th>
<th> <th>
<input type='submit' id='search' value='Search'/> <input type='submit' id='search-widget' value='Search'/>
</th> </th>
</tr> </tr>
</thead> </thead>
@ -49,15 +83,30 @@ View
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </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> </table>
</form> </form>
{% endblock %} {% 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" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %} {% block back-links %}
<form id='content' class='list'> <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'> <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 Add a new Dwelling
</a> </a>
</div> </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'> <table caption='dwellings'>
<thead> <thead>
<tr> <tr>
@ -22,6 +53,9 @@ address_id
<th> <th>
sub-address sub-address
</th> </th>
<th>
&nbsp;
</th>
</tr> </tr>
<tr> <tr>
<th> <th>
@ -34,7 +68,7 @@ sub-address
<input id='sub_address' type='text' name='sub_address' value='{{ params.sub_address }}'/> <input id='sub_address' type='text' name='sub_address' value='{{ params.sub_address }}'/>
</th> </th>
<th> <th>
<input type='submit' id='search' value='Search'/> <input type='submit' id='search-widget' value='Search'/>
</th> </th>
</tr> </tr>
</thead> </thead>
@ -60,15 +94,30 @@ View
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </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> </table>
</form> </form>
{% endblock %} {% 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" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %} {% block back-links %}
<form id='content' class='list'> <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'> <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 Add a new Elector
</a> </a>
</div> </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'> <table caption='electors'>
<thead> <thead>
<tr> <tr>
@ -31,6 +62,9 @@ email
<th> <th>
gender gender
</th> </th>
<th>
&nbsp;
</th>
</tr> </tr>
<tr> <tr>
<th> <th>
@ -52,7 +86,7 @@ gender
<input id='gender_expanded' type='text' name='gender_expanded' value='{{ params.gender_expanded }}'/> <input id='gender_expanded' type='text' name='gender_expanded' value='{{ params.gender_expanded }}'/>
</th> </th>
<th> <th>
<input type='submit' id='search' value='Search'/> <input type='submit' id='search-widget' value='Search'/>
</th> </th>
</tr> </tr>
</thead> </thead>
@ -89,15 +123,30 @@ View
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </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> </table>
</form> </form>
{% endblock %} {% 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" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %} {% block back-links %}
<form id='content' class='list'> <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'> <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 Add a new Followupaction
</a> </a>
</div> </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'> <table caption='followupactions'>
<thead> <thead>
<tr> <tr>
@ -31,6 +62,9 @@ notes
<th> <th>
closed closed
</th> </th>
<th>
&nbsp;
</th>
</tr> </tr>
<tr> <tr>
<th> <th>
@ -52,7 +86,7 @@ closed
<input id='closed' type='text' name='closed' value='{{ params.closed }}'/> <input id='closed' type='text' name='closed' value='{{ params.closed }}'/>
</th> </th>
<th> <th>
<input type='submit' id='search' value='Search'/> <input type='submit' id='search-widget' value='Search'/>
</th> </th>
</tr> </tr>
</thead> </thead>
@ -89,15 +123,30 @@ View
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </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> </table>
</form> </form>
{% endblock %} {% 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" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %} {% block back-links %}
<form id='content' class='list'> <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'> <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 Add a new Followupmethod
</a> </a>
</div> </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'> <table caption='followupmethods'>
<thead> <thead>
<tr> <tr>
<th> <th>
id id
</th> </th>
<th>
&nbsp;
</th>
</tr> </tr>
<tr> <tr>
<th> <th>
<input id='id' type='text' name='id' value='{{ params.id }}'/> <input id='id' type='text' name='id' value='{{ params.id }}'/>
</th> </th>
<th> <th>
<input type='submit' id='search' value='Search'/> <input type='submit' id='search-widget' value='Search'/>
</th> </th>
</tr> </tr>
</thead> </thead>
@ -40,15 +74,30 @@ View
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </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> </table>
</form> </form>
{% endblock %} {% 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" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %} {% block back-links %}
<form id='content' class='list'> <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'> <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 Add a new Followuprequest
</a> </a>
</div> </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'> <table caption='followuprequests'>
<thead> <thead>
<tr> <tr>
@ -28,6 +59,9 @@ issue_id
<th> <th>
method_id method_id
</th> </th>
<th>
&nbsp;
</th>
</tr> </tr>
<tr> <tr>
<th> <th>
@ -46,7 +80,7 @@ method_id
<input id='method_id_expanded' type='text' name='method_id_expanded' value='{{ params.method_id_expanded }}'/> <input id='method_id_expanded' type='text' name='method_id_expanded' value='{{ params.method_id_expanded }}'/>
</th> </th>
<th> <th>
<input type='submit' id='search' value='Search'/> <input type='submit' id='search-widget' value='Search'/>
</th> </th>
</tr> </tr>
</thead> </thead>
@ -84,15 +118,30 @@ View
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </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> </table>
</form> </form>
{% endblock %} {% 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" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %} {% block back-links %}
<form id='content' class='list'> <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'> <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 Add a new Gender
</a> </a>
</div> </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'> <table caption='genders'>
<thead> <thead>
<tr> <tr>
<th> <th>
id id
</th> </th>
<th>
&nbsp;
</th>
</tr> </tr>
<tr> <tr>
<th> <th>
<input id='id' type='text' name='id' value='{{ params.id }}'/> <input id='id' type='text' name='id' value='{{ params.id }}'/>
</th> </th>
<th> <th>
<input type='submit' id='search' value='Search'/> <input type='submit' id='search-widget' value='Search'/>
</th> </th>
</tr> </tr>
</thead> </thead>
@ -40,15 +74,30 @@ View
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </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> </table>
</form> </form>
{% endblock %} {% 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" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %} {% block back-links %}
<form id='content' class='list'> <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'> <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 Add a new Intention
</a> </a>
</div> </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'> <table caption='intentions'>
<thead> <thead>
<tr> <tr>
@ -25,6 +56,9 @@ option_id
<th> <th>
locality locality
</th> </th>
<th>
&nbsp;
</th>
</tr> </tr>
<tr> <tr>
<th> <th>
@ -40,7 +74,7 @@ locality
<input id='locality' type='number' name='locality' value='{{ params.locality }}'/> <input id='locality' type='number' name='locality' value='{{ params.locality }}'/>
</th> </th>
<th> <th>
<input type='submit' id='search' value='Search'/> <input type='submit' id='search-widget' value='Search'/>
</th> </th>
</tr> </tr>
</thead> </thead>
@ -73,15 +107,30 @@ View
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </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> </table>
</form> </form>
{% endblock %} {% 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" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %} {% block back-links %}
<form id='content' class='list'> <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'> <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 Add a new Issue
</a> </a>
</div> </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'> <table caption='issues'>
<thead> <thead>
<tr> <tr>
@ -25,6 +56,9 @@ current
<th> <th>
brief brief
</th> </th>
<th>
&nbsp;
</th>
</tr> </tr>
<tr> <tr>
<th> <th>
@ -40,7 +74,7 @@ brief
<input id='brief' type='text' name='brief' value='{{ params.brief }}'/> <input id='brief' type='text' name='brief' value='{{ params.brief }}'/>
</th> </th>
<th> <th>
<input type='submit' id='search' value='Search'/> <input type='submit' id='search-widget' value='Search'/>
</th> </th>
</tr> </tr>
</thead> </thead>
@ -67,15 +101,30 @@ View
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </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> </table>
</form> </form>
{% endblock %} {% 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" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %} {% block back-links %}
<form id='content' class='list'> <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'> <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 Add a new Option
</a> </a>
</div> </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'> <table caption='options'>
<thead> <thead>
<tr> <tr>
<th> <th>
id id
</th> </th>
<th>
&nbsp;
</th>
</tr> </tr>
<tr> <tr>
<th> <th>
<input id='id' type='text' name='id' value='{{ params.id }}'/> <input id='id' type='text' name='id' value='{{ params.id }}'/>
</th> </th>
<th> <th>
<input type='submit' id='search' value='Search'/> <input type='submit' id='search-widget' value='Search'/>
</th> </th>
</tr> </tr>
</thead> </thead>
@ -40,15 +74,30 @@ View
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </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> </table>
</form> </form>
{% endblock %} {% 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" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %} {% block back-links %}
<form id='content' class='list'> <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'> <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 Add a new Role
</a> </a>
</div> </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'> <table caption='roles'>
<thead> <thead>
<tr> <tr>
@ -19,6 +50,9 @@ id
<th> <th>
name name
</th> </th>
<th>
&nbsp;
</th>
</tr> </tr>
<tr> <tr>
<th> <th>
@ -28,7 +62,7 @@ name
<input id='name' type='text' name='name' value='{{ params.name }}'/> <input id='name' type='text' name='name' value='{{ params.name }}'/>
</th> </th>
<th> <th>
<input type='submit' id='search' value='Search'/> <input type='submit' id='search-widget' value='Search'/>
</th> </th>
</tr> </tr>
</thead> </thead>
@ -49,15 +83,30 @@ View
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </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> </table>
</form> </form>
{% endblock %} {% 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" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %} {% block back-links %}
<form id='content' class='list'> <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'> <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 Add a new Team
</a> </a>
</div> </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'> <table caption='teams'>
<thead> <thead>
<tr> <tr>
@ -28,6 +59,9 @@ latitude
<th> <th>
longitude longitude
</th> </th>
<th>
&nbsp;
</th>
</tr> </tr>
<tr> <tr>
<th> <th>
@ -46,7 +80,7 @@ longitude
<input id='longitude' type='number' name='longitude' value='{{ params.longitude }}'/> <input id='longitude' type='number' name='longitude' value='{{ params.longitude }}'/>
</th> </th>
<th> <th>
<input type='submit' id='search' value='Search'/> <input type='submit' id='search-widget' value='Search'/>
</th> </th>
</tr> </tr>
</thead> </thead>
@ -78,15 +112,30 @@ View
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </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> </table>
</form> </form>
{% endblock %} {% 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" %} {% 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).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block content %} {% block back-links %}
<form id='content' class='list'> <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'> <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 Add a new Visit
</a> </a>
</div> </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'> <table caption='visits'>
<thead> <thead>
<tr> <tr>
@ -25,6 +56,9 @@ canvasser_id
<th> <th>
date date
</th> </th>
<th>
&nbsp;
</th>
</tr> </tr>
<tr> <tr>
<th> <th>
@ -40,7 +74,7 @@ date
<input id='date' type='date' name='date' value='{{ params.date }}'/> <input id='date' type='date' name='date' value='{{ params.date }}'/>
</th> </th>
<th> <th>
<input type='submit' id='search' value='Search'/> <input type='submit' id='search-widget' value='Search'/>
</th> </th>
</tr> </tr>
</thead> </thead>
@ -71,15 +105,30 @@ View
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </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> </table>
</form> </form>
{% endblock %} {% 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/yyy-site.css" />
<link rel="stylesheet" type="text/css" href="css/spinner.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"/> <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> <title>{{site-title}}: {{title}}</title>
{% endblock %} {% endblock %}
{% block extra-head %} {% block extra-head %}
@ -37,6 +38,16 @@
</div> </div>
<!-- img id="site-logo" src="{{site-logo}}" alt="{{site-title}}" width="64" height="64"/ --> <!-- img id="site-logo" src="{{site-logo}}" alt="{{site-title}}" width="64" height="64"/ -->
<h1>{{title}}</h1> <h1>{{title}}</h1>
{% if message|not-empty %}
<div class="message">
{{ message }}
</div>
{% endif %}
{% if error|not-empty %}
<div class="error">
{{ error }}
</div>
{% endif %}
</header> </header>
{% endblock %} {% endblock %}
<div id="main-container" class="container"> <div id="main-container" class="container">

View file

@ -8,12 +8,40 @@
</div> </div>
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<img id="site-logo" src="img/ProjectHopeLogo4.png" alt="{{site-title}}" style="float: left;" height="345" width="345"/>
<h2> <h2>
Alpha test code Alpha test code
</h2> </h2>
<p> <p>
Although addresses in the database mostly are real, all personal data in the database This is a voter intention information system intended to be used by the 'Yes' side in the next independence referendum.
is randomly generated and does not represent real people. 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> </p>
{% endblock %} {% endblock %}

View file

@ -1,9 +1,11 @@
(ns (ns
youyesyet.routes.auto 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 (:require
[adl-support.core :as support] [adl-support.core :as support]
[clojure.java.io :as io] [clojure.java.io :as io]
[clojure.set :refer [subset?]]
[clojure.tools.logging :as log]
[compojure.core :refer [defroutes GET POST]] [compojure.core :refer [defroutes GET POST]]
[hugsql.core :as hugsql] [hugsql.core :as hugsql]
[noir.response :as nresponse] [noir.response :as nresponse]
@ -29,13 +31,13 @@
(l/render (l/render
(support/resolve-template "list-addresses-Addresses.html") (support/resolve-template "list-addresses-Addresses.html")
(:session r) (:session r)
{:title "Addresses", (merge
:params p, {:title "Addresses", :params p}
:records {:records
(if (if
(not (empty? (remove nil? (vals p)))) (not (empty? (remove nil? (vals p))))
(db/search-strings-address db/*db* p) (db/search-strings-addresses db/*db* p)
(db/list-addresses db/*db* {}))}))) (db/list-addresses db/*db* {}))}))))
(defn (defn
form-addresses-Address form-addresses-Address
@ -45,11 +47,30 @@
(l/render (l/render
(support/resolve-template "form-addresses-Address.html") (support/resolve-template "form-addresses-Address.html")
(:session r) (:session r)
{:title "Address", (merge
:params p, {:title "Address", :params p}
:record (reduce
(if (empty? (remove nil? (vals p))) [] (db/get-address db/*db* p)), merge
:districts (db/list-districts db/*db*)}))) (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 (defn
list-authorities-Authorities list-authorities-Authorities
@ -59,13 +80,13 @@
(l/render (l/render
(support/resolve-template "list-authorities-Authorities.html") (support/resolve-template "list-authorities-Authorities.html")
(:session r) (:session r)
{:title "Authorities", (merge
:params p, {:title "Authorities", :params p}
:records {:records
(if (if
(not (empty? (remove nil? (vals p)))) (not (empty? (remove nil? (vals p))))
(db/search-strings-authority db/*db* p) (db/search-strings-authorities db/*db* p)
(db/list-authorities db/*db* {}))}))) (db/list-authorities db/*db* {}))}))))
(defn (defn
form-authorities-Authority form-authorities-Authority
@ -75,13 +96,32 @@
(l/render (l/render
(support/resolve-template "form-authorities-Authority.html") (support/resolve-template "form-authorities-Authority.html")
(:session r) (:session r)
{:title "Authority", (merge
:params p, {:title "Authority", :params p}
:record (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 (if
(empty? (remove nil? (vals p))) (empty? (remove nil? (vals p)))
[] []
(db/get-authority db/*db* p))}))) (db/get-authority db/*db* p))})
(list))))))
(defn (defn
list-canvassers-Canvassers list-canvassers-Canvassers
@ -91,13 +131,13 @@
(l/render (l/render
(support/resolve-template "list-canvassers-Canvassers.html") (support/resolve-template "list-canvassers-Canvassers.html")
(:session r) (:session r)
{:title "Canvassers", (merge
:params p, {:title "Canvassers", :params p}
:records {:records
(if (if
(not (empty? (remove nil? (vals p)))) (not (empty? (remove nil? (vals p))))
(db/search-strings-canvasser db/*db* p) (db/search-strings-canvassers db/*db* p)
(db/list-canvassers db/*db* {}))}))) (db/list-canvassers db/*db* {}))}))))
(defn (defn
form-canvassers-Canvasser form-canvassers-Canvasser
@ -107,17 +147,36 @@
(l/render (l/render
(support/resolve-template "form-canvassers-Canvasser.html") (support/resolve-template "form-canvassers-Canvasser.html")
(:session r) (:session r)
{:title "Canvasser", (merge
:params p, {:title "Canvasser", :params p}
:record (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 (if
(empty? (remove nil? (vals p))) (empty? (remove nil? (vals p)))
[] []
(db/get-canvasser db/*db* p)), (db/get-canvasser db/*db* p))})
:electors (db/list-electors db/*db*), (list
:addresses (db/list-addresses db/*db*), {:electors (db/list-electors db/*db*)}
:authorities (db/list-authorities db/*db*), {:addresses (db/list-addresses db/*db*)}
:roles (db/list-roles db/*db*)}))) {:authorities (db/list-authorities db/*db*)}
{:roles (db/list-roles db/*db*)}))))))
(defn (defn
list-districts-Districts list-districts-Districts
@ -127,13 +186,13 @@
(l/render (l/render
(support/resolve-template "list-districts-Districts.html") (support/resolve-template "list-districts-Districts.html")
(:session r) (:session r)
{:title "Districts", (merge
:params p, {:title "Districts", :params p}
:records {:records
(if (if
(not (empty? (remove nil? (vals p)))) (not (empty? (remove nil? (vals p))))
(db/search-strings-district db/*db* p) (db/search-strings-districts db/*db* p)
(db/list-districts db/*db* {}))}))) (db/list-districts db/*db* {}))}))))
(defn (defn
form-districts-District form-districts-District
@ -143,13 +202,32 @@
(l/render (l/render
(support/resolve-template "form-districts-District.html") (support/resolve-template "form-districts-District.html")
(:session r) (:session r)
{:title "District", (merge
:params p, {:title "District", :params p}
:record (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 (if
(empty? (remove nil? (vals p))) (empty? (remove nil? (vals p)))
[] []
(db/get-district db/*db* p))}))) (db/get-district db/*db* p))})
(list))))))
(defn (defn
list-dwellings-Dwellings list-dwellings-Dwellings
@ -159,13 +237,13 @@
(l/render (l/render
(support/resolve-template "list-dwellings-Dwellings.html") (support/resolve-template "list-dwellings-Dwellings.html")
(:session r) (:session r)
{:title "Dwellings", (merge
:params p, {:title "Dwellings", :params p}
:records {:records
(if (if
(not (empty? (remove nil? (vals p)))) (not (empty? (remove nil? (vals p))))
(db/search-strings-dwelling db/*db* p) (db/search-strings-dwellings db/*db* p)
(db/list-dwellings db/*db* {}))}))) (db/list-dwellings db/*db* {}))}))))
(defn (defn
form-dwellings-Dwelling form-dwellings-Dwelling
@ -175,14 +253,32 @@
(l/render (l/render
(support/resolve-template "form-dwellings-Dwelling.html") (support/resolve-template "form-dwellings-Dwelling.html")
(:session r) (:session r)
{:title "Dwelling", (merge
:params p, {:title "Dwelling", :params p}
:record (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 (if
(empty? (remove nil? (vals p))) (empty? (remove nil? (vals p)))
[] []
(db/get-dwelling db/*db* p)), (db/get-dwelling db/*db* p))})
:addresses (db/list-addresses db/*db*)}))) (list {:addresses (db/list-addresses db/*db*)}))))))
(defn (defn
list-electors-Electors list-electors-Electors
@ -192,13 +288,13 @@
(l/render (l/render
(support/resolve-template "list-electors-Electors.html") (support/resolve-template "list-electors-Electors.html")
(:session r) (:session r)
{:title "Electors", (merge
:params p, {:title "Electors", :params p}
:records {:records
(if (if
(not (empty? (remove nil? (vals p)))) (not (empty? (remove nil? (vals p))))
(db/search-strings-elector db/*db* p) (db/search-strings-electors db/*db* p)
(db/list-electors db/*db* {}))}))) (db/list-electors db/*db* {}))}))))
(defn (defn
form-electors-Elector form-electors-Elector
@ -208,12 +304,32 @@
(l/render (l/render
(support/resolve-template "form-electors-Elector.html") (support/resolve-template "form-electors-Elector.html")
(:session r) (:session r)
{:title "Elector", (merge
:params p, {:title "Elector", :params p}
:record (reduce
(if (empty? (remove nil? (vals p))) [] (db/get-elector db/*db* p)), merge
:dwellings (db/list-dwellings db/*db*), (merge
:genders (db/list-genders db/*db*)}))) (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 (defn
list-followupactions-Followupactions list-followupactions-Followupactions
@ -224,13 +340,13 @@
(support/resolve-template (support/resolve-template
"list-followupactions-Followupactions.html") "list-followupactions-Followupactions.html")
(:session r) (:session r)
{:title "Followupactions", (merge
:params p, {:title "Followupactions", :params p}
:records {:records
(if (if
(not (empty? (remove nil? (vals p)))) (not (empty? (remove nil? (vals p))))
(db/search-strings-followupaction db/*db* p) (db/search-strings-followupactions db/*db* p)
(db/list-followupactions db/*db* {}))}))) (db/list-followupactions db/*db* {}))}))))
(defn (defn
form-followupactions-Followupaction form-followupactions-Followupaction
@ -241,15 +357,34 @@
(support/resolve-template (support/resolve-template
"form-followupactions-Followupaction.html") "form-followupactions-Followupaction.html")
(:session r) (:session r)
{:title "Followupaction", (merge
:params p, {:title "Followupaction", :params p}
:record (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 (if
(empty? (remove nil? (vals p))) (empty? (remove nil? (vals p)))
[] []
(db/get-followupaction db/*db* p)), (db/get-followupaction db/*db* p))})
:followuprequests (db/list-followuprequests db/*db*), (list
:canvassers (db/list-canvassers db/*db*)}))) {:followuprequests (db/list-followuprequests db/*db*)}
{:canvassers (db/list-canvassers db/*db*)}))))))
(defn (defn
list-followupmethods-Followupmethods list-followupmethods-Followupmethods
@ -260,13 +395,13 @@
(support/resolve-template (support/resolve-template
"list-followupmethods-Followupmethods.html") "list-followupmethods-Followupmethods.html")
(:session r) (:session r)
{:title "Followupmethods", (merge
:params p, {:title "Followupmethods", :params p}
:records {:records
(if (if
(not (empty? (remove nil? (vals p)))) (not (empty? (remove nil? (vals p))))
(db/search-strings-followupmethod db/*db* p) (db/search-strings-followupmethods db/*db* p)
(db/list-followupmethods db/*db* {}))}))) (db/list-followupmethods db/*db* {}))}))))
(defn (defn
form-followupmethods-Followupmethod form-followupmethods-Followupmethod
@ -277,13 +412,32 @@
(support/resolve-template (support/resolve-template
"form-followupmethods-Followupmethod.html") "form-followupmethods-Followupmethod.html")
(:session r) (:session r)
{:title "Followupmethod", (merge
:params p, {:title "Followupmethod", :params p}
:record (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 (if
(empty? (remove nil? (vals p))) (empty? (remove nil? (vals p)))
[] []
(db/get-followupmethod db/*db* p))}))) (db/get-followupmethod db/*db* p))})
(list))))))
(defn (defn
list-followuprequests-Followuprequests list-followuprequests-Followuprequests
@ -294,13 +448,13 @@
(support/resolve-template (support/resolve-template
"list-followuprequests-Followuprequests.html") "list-followuprequests-Followuprequests.html")
(:session r) (:session r)
{:title "Followuprequests", (merge
:params p, {:title "Followuprequests", :params p}
:records {:records
(if (if
(not (empty? (remove nil? (vals p)))) (not (empty? (remove nil? (vals p))))
(db/search-strings-followuprequest db/*db* p) (db/search-strings-followuprequests db/*db* p)
(db/list-followuprequests db/*db* {}))}))) (db/list-followuprequests db/*db* {}))}))))
(defn (defn
form-followuprequests-Followuprequest form-followuprequests-Followuprequest
@ -311,17 +465,36 @@
(support/resolve-template (support/resolve-template
"form-followuprequests-Followuprequest.html") "form-followuprequests-Followuprequest.html")
(:session r) (:session r)
{:title "Followuprequest", (merge
:params p, {:title "Followuprequest", :params p}
:record (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 (if
(empty? (remove nil? (vals p))) (empty? (remove nil? (vals p)))
[] []
(db/get-followuprequest db/*db* p)), (db/get-followuprequest db/*db* p))})
:electors (db/list-electors db/*db*), (list
:visits (db/list-visits db/*db*), {:electors (db/list-electors db/*db*)}
:issues (db/list-issues db/*db*), {:visits (db/list-visits db/*db*)}
:followupmethods (db/list-followupmethods db/*db*)}))) {:issues (db/list-issues db/*db*)}
{:followupmethods (db/list-followupmethods db/*db*)}))))))
(defn (defn
list-genders-Genders list-genders-Genders
@ -331,13 +504,13 @@
(l/render (l/render
(support/resolve-template "list-genders-Genders.html") (support/resolve-template "list-genders-Genders.html")
(:session r) (:session r)
{:title "Genders", (merge
:params p, {:title "Genders", :params p}
:records {:records
(if (if
(not (empty? (remove nil? (vals p)))) (not (empty? (remove nil? (vals p))))
(db/search-strings-gender db/*db* p) (db/search-strings-genders db/*db* p)
(db/list-genders db/*db* {}))}))) (db/list-genders db/*db* {}))}))))
(defn (defn
form-genders-Gender form-genders-Gender
@ -347,13 +520,28 @@
(l/render (l/render
(support/resolve-template "form-genders-Gender.html") (support/resolve-template "form-genders-Gender.html")
(:session r) (:session r)
{:title "Gender", (merge
:params p, {:title "Gender", :params p}
:record (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 (if
(empty? (remove nil? (vals p))) (empty? (remove nil? (vals p)))
[] []
(db/get-gender db/*db* p))}))) (db/get-gender db/*db* p))})
(list))))))
(defn (defn
list-intentions-Intentions list-intentions-Intentions
@ -363,13 +551,13 @@
(l/render (l/render
(support/resolve-template "list-intentions-Intentions.html") (support/resolve-template "list-intentions-Intentions.html")
(:session r) (:session r)
{:title "Intentions", (merge
:params p, {:title "Intentions", :params p}
:records {:records
(if (if
(not (empty? (remove nil? (vals p)))) (not (empty? (remove nil? (vals p))))
(db/search-strings-intention db/*db* p) (db/search-strings-intentions db/*db* p)
(db/list-intentions db/*db* {}))}))) (db/list-intentions db/*db* {}))}))))
(defn (defn
form-intentions-Intention form-intentions-Intention
@ -379,16 +567,35 @@
(l/render (l/render
(support/resolve-template "form-intentions-Intention.html") (support/resolve-template "form-intentions-Intention.html")
(:session r) (:session r)
{:title "Intention", (merge
:params p, {:title "Intention", :params p}
:record (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 (if
(empty? (remove nil? (vals p))) (empty? (remove nil? (vals p)))
[] []
(db/get-intention db/*db* p)), (db/get-intention db/*db* p))})
:visits (db/list-visits db/*db*), (list
:electors (db/list-electors db/*db*), {:visits (db/list-visits db/*db*)}
:options (db/list-options db/*db*)}))) {:electors (db/list-electors db/*db*)}
{:options (db/list-options db/*db*)}))))))
(defn (defn
list-issues-Issues list-issues-Issues
@ -398,13 +605,13 @@
(l/render (l/render
(support/resolve-template "list-issues-Issues.html") (support/resolve-template "list-issues-Issues.html")
(:session r) (:session r)
{:title "Issues", (merge
:params p, {:title "Issues", :params p}
:records {:records
(if (if
(not (empty? (remove nil? (vals p)))) (not (empty? (remove nil? (vals p))))
(db/search-strings-issue db/*db* p) (db/search-strings-issues db/*db* p)
(db/list-issues db/*db* {}))}))) (db/list-issues db/*db* {}))}))))
(defn (defn
form-issues-Issue form-issues-Issue
@ -414,10 +621,28 @@
(l/render (l/render
(support/resolve-template "form-issues-Issue.html") (support/resolve-template "form-issues-Issue.html")
(:session r) (:session r)
{:title "Issue", (merge
:params p, {:title "Issue", :params p}
:record (reduce
(if (empty? (remove nil? (vals p))) [] (db/get-issue db/*db* p))}))) 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 (defn
list-options-Options list-options-Options
@ -427,13 +652,13 @@
(l/render (l/render
(support/resolve-template "list-options-Options.html") (support/resolve-template "list-options-Options.html")
(:session r) (:session r)
{:title "Options", (merge
:params p, {:title "Options", :params p}
:records {:records
(if (if
(not (empty? (remove nil? (vals p)))) (not (empty? (remove nil? (vals p))))
(db/search-strings-option db/*db* p) (db/search-strings-options db/*db* p)
(db/list-options db/*db* {}))}))) (db/list-options db/*db* {}))}))))
(defn (defn
form-options-Option form-options-Option
@ -443,13 +668,28 @@
(l/render (l/render
(support/resolve-template "form-options-Option.html") (support/resolve-template "form-options-Option.html")
(:session r) (:session r)
{:title "Option", (merge
:params p, {:title "Option", :params p}
:record (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 (if
(empty? (remove nil? (vals p))) (empty? (remove nil? (vals p)))
[] []
(db/get-option db/*db* p))}))) (db/get-option db/*db* p))})
(list))))))
(defn (defn
list-roles-Roles list-roles-Roles
@ -459,13 +699,13 @@
(l/render (l/render
(support/resolve-template "list-roles-Roles.html") (support/resolve-template "list-roles-Roles.html")
(:session r) (:session r)
{:title "Roles", (merge
:params p, {:title "Roles", :params p}
:records {:records
(if (if
(not (empty? (remove nil? (vals p)))) (not (empty? (remove nil? (vals p))))
(db/search-strings-role db/*db* p) (db/search-strings-roles db/*db* p)
(db/list-roles db/*db* {}))}))) (db/list-roles db/*db* {}))}))))
(defn (defn
form-roles-Role form-roles-Role
@ -475,11 +715,28 @@
(l/render (l/render
(support/resolve-template "form-roles-Role.html") (support/resolve-template "form-roles-Role.html")
(:session r) (:session r)
{:title "Role", (merge
:params p, {:title "Role", :params p}
:record (reduce
(if (empty? (remove nil? (vals p))) [] (db/get-role db/*db* p)), merge
:canvassers (db/list-canvassers db/*db*)}))) (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 (defn
list-teams-Teams list-teams-Teams
@ -489,13 +746,13 @@
(l/render (l/render
(support/resolve-template "list-teams-Teams.html") (support/resolve-template "list-teams-Teams.html")
(:session r) (:session r)
{:title "Teams", (merge
:params p, {:title "Teams", :params p}
:records {:records
(if (if
(not (empty? (remove nil? (vals p)))) (not (empty? (remove nil? (vals p))))
(db/search-strings-team db/*db* p) (db/search-strings-teams db/*db* p)
(db/list-teams db/*db* {}))}))) (db/list-teams db/*db* {}))}))))
(defn (defn
form-teams-Team form-teams-Team
@ -505,12 +762,31 @@
(l/render (l/render
(support/resolve-template "form-teams-Team.html") (support/resolve-template "form-teams-Team.html")
(:session r) (:session r)
{:title "Team", (merge
:params p, {:title "Team", :params p}
:record (reduce
(if (empty? (remove nil? (vals p))) [] (db/get-team db/*db* p)), merge
:districts (db/list-districts db/*db*), (merge
:canvassers (db/list-canvassers db/*db*)}))) (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 (defn
list-visits-Visits list-visits-Visits
@ -520,13 +796,13 @@
(l/render (l/render
(support/resolve-template "list-visits-Visits.html") (support/resolve-template "list-visits-Visits.html")
(:session r) (:session r)
{:title "Visits", (merge
:params p, {:title "Visits", :params p}
:records {:records
(if (if
(not (empty? (remove nil? (vals p)))) (not (empty? (remove nil? (vals p))))
(db/search-strings-visit db/*db* p) (db/search-strings-visits db/*db* p)
(db/list-visits db/*db* {}))}))) (db/list-visits db/*db* {}))}))))
(defn (defn
form-visits-Visit form-visits-Visit
@ -536,12 +812,30 @@
(l/render (l/render
(support/resolve-template "form-visits-Visit.html") (support/resolve-template "form-visits-Visit.html")
(:session r) (:session r)
{:title "Visit", (merge
:params p, {:title "Visit", :params p}
:record (reduce
(if (empty? (remove nil? (vals p))) [] (db/get-visit db/*db* p)), merge
:addresses (db/list-addresses db/*db*), (merge
:canvassers (db/list-canvassers db/*db*)}))) (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 (defn
raw-resolve-handler raw-resolve-handler

View file

@ -1,10 +1,11 @@
(ns (ns
youyesyet.routes.auto-json 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 (:require
[adl-support.core :as support] [adl-support.core :as support]
[clojure.java.io :as io]
[clojure.core.memoize :as memo] [clojure.core.memoize :as memo]
[clojure.java.io :as io]
[clojure.tools.logging :as log]
[compojure.core :refer [defroutes GET POST]] [compojure.core :refer [defroutes GET POST]]
[hugsql.core :as hugsql] [hugsql.core :as hugsql]
[noir.response :as nresponse] [noir.response :as nresponse]
@ -945,13 +946,13 @@
(do (db/list-visits-by-canvasser params))) (do (db/list-visits-by-canvasser params)))
(def (def
search-strings-address search-strings-addresses
(memo/ttl (memo/ttl
(fn (fn
[{:keys [params form-params]}] [{:keys [params form-params]}]
(let (let
[result [result
(db/search-strings-address (db/search-strings-addresses
db/*db* db/*db*
(support/massage-params params form-params #{"id"}))] (support/massage-params params form-params #{"id"}))]
(response/ok result))) (response/ok result)))
@ -959,13 +960,13 @@
1000000000)) 1000000000))
(def (def
search-strings-authority search-strings-authorities
(memo/ttl (memo/ttl
(fn (fn
[{:keys [params form-params]}] [{:keys [params form-params]}]
(let (let
[result [result
(db/search-strings-authority (db/search-strings-authorities
db/*db* db/*db*
(support/massage-params params form-params #{"id"}))] (support/massage-params params form-params #{"id"}))]
(response/ok result))) (response/ok result)))
@ -973,13 +974,13 @@
10000000000)) 10000000000))
(def (def
search-strings-canvasser search-strings-canvassers
(memo/ttl (memo/ttl
(fn (fn
[{:keys [params form-params]}] [{:keys [params form-params]}]
(let (let
[result [result
(db/search-strings-canvasser (db/search-strings-canvassers
db/*db* db/*db*
(support/massage-params params form-params #{"id"}))] (support/massage-params params form-params #{"id"}))]
(response/ok result))) (response/ok result)))
@ -987,13 +988,13 @@
10000000)) 10000000))
(def (def
search-strings-district search-strings-districts
(memo/ttl (memo/ttl
(fn (fn
[{:keys [params form-params]}] [{:keys [params form-params]}]
(let (let
[result [result
(db/search-strings-district (db/search-strings-districts
db/*db* db/*db*
(support/massage-params params form-params #{"id"}))] (support/massage-params params form-params #{"id"}))]
(response/ok result))) (response/ok result)))
@ -1001,13 +1002,13 @@
10000000000)) 10000000000))
(def (def
search-strings-dwelling search-strings-dwellings
(memo/ttl (memo/ttl
(fn (fn
[{:keys [params form-params]}] [{:keys [params form-params]}]
(let (let
[result [result
(db/search-strings-dwelling (db/search-strings-dwellings
db/*db* db/*db*
(support/massage-params params form-params #{"id"}))] (support/massage-params params form-params #{"id"}))]
(response/ok result))) (response/ok result)))
@ -1015,13 +1016,13 @@
1000000000)) 1000000000))
(def (def
search-strings-elector search-strings-electors
(memo/ttl (memo/ttl
(fn (fn
[{:keys [params form-params]}] [{:keys [params form-params]}]
(let (let
[result [result
(db/search-strings-elector (db/search-strings-electors
db/*db* db/*db*
(support/massage-params params form-params #{"id"}))] (support/massage-params params form-params #{"id"}))]
(response/ok result))) (response/ok result)))
@ -1029,24 +1030,24 @@
100000000)) 100000000))
(defn (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)`." "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]}] [{:keys [params form-params]}]
(let (let
[result [result
(db/search-strings-followupaction (db/search-strings-followupactions
db/*db* db/*db*
(support/massage-params params form-params #{"id"}))] (support/massage-params params form-params #{"id"}))]
(response/ok result))) (response/ok result)))
(def (def
search-strings-followupmethod search-strings-followupmethods
(memo/ttl (memo/ttl
(fn (fn
[{:keys [params form-params]}] [{:keys [params form-params]}]
(let (let
[result [result
(db/search-strings-followupmethod (db/search-strings-followupmethods
db/*db* db/*db*
(support/massage-params params form-params #{"id"}))] (support/massage-params params form-params #{"id"}))]
(response/ok result))) (response/ok result)))
@ -1054,13 +1055,13 @@
10000000000)) 10000000000))
(def (def
search-strings-followuprequest search-strings-followuprequests
(memo/ttl (memo/ttl
(fn (fn
[{:keys [params form-params]}] [{:keys [params form-params]}]
(let (let
[result [result
(db/search-strings-followuprequest (db/search-strings-followuprequests
db/*db* db/*db*
(support/massage-params params form-params #{"id"}))] (support/massage-params params form-params #{"id"}))]
(response/ok result))) (response/ok result)))
@ -1068,13 +1069,13 @@
100000)) 100000))
(def (def
search-strings-gender search-strings-genders
(memo/ttl (memo/ttl
(fn (fn
[{:keys [params form-params]}] [{:keys [params form-params]}]
(let (let
[result [result
(db/search-strings-gender (db/search-strings-genders
db/*db* db/*db*
(support/massage-params params form-params #{"id"}))] (support/massage-params params form-params #{"id"}))]
(response/ok result))) (response/ok result)))
@ -1082,13 +1083,13 @@
1000000000)) 1000000000))
(def (def
search-strings-intention search-strings-intentions
(memo/ttl (memo/ttl
(fn (fn
[{:keys [params form-params]}] [{:keys [params form-params]}]
(let (let
[result [result
(db/search-strings-intention (db/search-strings-intentions
db/*db* db/*db*
(support/massage-params params form-params #{"Id"}))] (support/massage-params params form-params #{"Id"}))]
(response/ok result))) (response/ok result)))
@ -1096,13 +1097,13 @@
100000)) 100000))
(def (def
search-strings-issue search-strings-issues
(memo/ttl (memo/ttl
(fn (fn
[{:keys [params form-params]}] [{:keys [params form-params]}]
(let (let
[result [result
(db/search-strings-issue (db/search-strings-issues
db/*db* db/*db*
(support/massage-params params form-params #{"id"}))] (support/massage-params params form-params #{"id"}))]
(response/ok result))) (response/ok result)))
@ -1110,13 +1111,13 @@
1000000)) 1000000))
(def (def
search-strings-option search-strings-options
(memo/ttl (memo/ttl
(fn (fn
[{:keys [params form-params]}] [{:keys [params form-params]}]
(let (let
[result [result
(db/search-strings-option (db/search-strings-options
db/*db* db/*db*
(support/massage-params params form-params #{"id"}))] (support/massage-params params form-params #{"id"}))]
(response/ok result))) (response/ok result)))
@ -1124,13 +1125,13 @@
10000000000)) 10000000000))
(def (def
search-strings-role search-strings-roles
(memo/ttl (memo/ttl
(fn (fn
[{:keys [params form-params]}] [{:keys [params form-params]}]
(let (let
[result [result
(db/search-strings-role (db/search-strings-roles
db/*db* db/*db*
(support/massage-params params form-params #{"id"}))] (support/massage-params params form-params #{"id"}))]
(response/ok result))) (response/ok result)))
@ -1138,13 +1139,13 @@
10000000000)) 10000000000))
(def (def
search-strings-team search-strings-teams
(memo/ttl (memo/ttl
(fn (fn
[{:keys [params form-params]}] [{:keys [params form-params]}]
(let (let
[result [result
(db/search-strings-team (db/search-strings-teams
db/*db* db/*db*
(support/massage-params params form-params #{"id"}))] (support/massage-params params form-params #{"id"}))]
(response/ok result))) (response/ok result)))
@ -1152,13 +1153,13 @@
10000000)) 10000000))
(def (def
search-strings-visit search-strings-visits
(memo/ttl (memo/ttl
(fn (fn
[{:keys [params form-params]}] [{:keys [params form-params]}]
(let (let
[result [result
(db/search-strings-visit (db/search-strings-visits
db/*db* db/*db*
(support/massage-params params form-params #{"id"}))] (support/massage-params params form-params #{"id"}))]
(response/ok result))) (response/ok result)))
@ -1242,6 +1243,17 @@
(support/massage-params params form-params #{"id"}))] (support/massage-params params form-params #{"id"}))]
(response/found "/"))) (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 (defn
update-followuprequest! 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)`." "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"}))] (support/massage-params params form-params #{"id"}))]
(response/found "/"))) (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 (defn
update-intention! 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)`." "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"}))] (support/massage-params params form-params #{"id"}))]
(response/found "/"))) (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 (defn
update-role! 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)`." "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 request
(route/restricted (list-visits-by-canvasser request))) (route/restricted (list-visits-by-canvasser request)))
(GET (GET
"/json/auto/search-strings-address" "/json/auto/search-strings-addresses"
request request
(route/restricted (search-strings-address request))) (route/restricted (search-strings-addresses request)))
(GET (GET
"/json/auto/search-strings-authority" "/json/auto/search-strings-authorities"
request request
(route/restricted (search-strings-authority request))) (route/restricted (search-strings-authorities request)))
(GET (GET
"/json/auto/search-strings-canvasser" "/json/auto/search-strings-canvassers"
request request
(route/restricted (search-strings-canvasser request))) (route/restricted (search-strings-canvassers request)))
(GET (GET
"/json/auto/search-strings-district" "/json/auto/search-strings-districts"
request request
(route/restricted (search-strings-district request))) (route/restricted (search-strings-districts request)))
(GET (GET
"/json/auto/search-strings-dwelling" "/json/auto/search-strings-dwellings"
request request
(route/restricted (search-strings-dwelling request))) (route/restricted (search-strings-dwellings request)))
(GET (GET
"/json/auto/search-strings-elector" "/json/auto/search-strings-electors"
request request
(route/restricted (search-strings-elector request))) (route/restricted (search-strings-electors request)))
(GET (GET
"/json/auto/search-strings-followupaction" "/json/auto/search-strings-followupactions"
request request
(route/restricted (search-strings-followupaction request))) (route/restricted (search-strings-followupactions request)))
(GET (GET
"/json/auto/search-strings-followupmethod" "/json/auto/search-strings-followupmethods"
request request
(route/restricted (search-strings-followupmethod request))) (route/restricted (search-strings-followupmethods request)))
(GET (GET
"/json/auto/search-strings-followuprequest" "/json/auto/search-strings-followuprequests"
request request
(route/restricted (search-strings-followuprequest request))) (route/restricted (search-strings-followuprequests request)))
(GET (GET
"/json/auto/search-strings-gender" "/json/auto/search-strings-genders"
request request
(route/restricted (search-strings-gender request))) (route/restricted (search-strings-genders request)))
(GET (GET
"/json/auto/search-strings-intention" "/json/auto/search-strings-intentions"
request request
(route/restricted (search-strings-intention request))) (route/restricted (search-strings-intentions request)))
(GET (GET
"/json/auto/search-strings-issue" "/json/auto/search-strings-issues"
request request
(route/restricted (search-strings-issue request))) (route/restricted (search-strings-issues request)))
(GET (GET
"/json/auto/search-strings-option" "/json/auto/search-strings-options"
request request
(route/restricted (search-strings-option request))) (route/restricted (search-strings-options request)))
(GET (GET
"/json/auto/search-strings-role" "/json/auto/search-strings-roles"
request request
(route/restricted (search-strings-role request))) (route/restricted (search-strings-roles request)))
(GET (GET
"/json/auto/search-strings-team" "/json/auto/search-strings-teams"
request request
(route/restricted (search-strings-team request))) (route/restricted (search-strings-teams request)))
(GET (GET
"/json/auto/search-strings-visit" "/json/auto/search-strings-visits"
request request
(route/restricted (search-strings-visit request))) (route/restricted (search-strings-visits request)))
(POST (POST
"/json/auto/update-address" "/json/auto/update-address"
request request
@ -1754,10 +1788,18 @@
"/json/auto/update-followupaction" "/json/auto/update-followupaction"
request request
(route/restricted (update-followupaction! request))) (route/restricted (update-followupaction! request)))
(POST
"/json/auto/update-followupmethod"
request
(route/restricted (update-followupmethod! request)))
(POST (POST
"/json/auto/update-followuprequest" "/json/auto/update-followuprequest"
request request
(route/restricted (update-followuprequest! request))) (route/restricted (update-followuprequest! request)))
(POST
"/json/auto/update-gender"
request
(route/restricted (update-gender! request)))
(POST (POST
"/json/auto/update-intention" "/json/auto/update-intention"
request request
@ -1766,6 +1808,10 @@
"/json/auto/update-issue" "/json/auto/update-issue"
request request
(route/restricted (update-issue! request))) (route/restricted (update-issue! request)))
(POST
"/json/auto/update-option"
request
(route/restricted (update-option! request)))
(POST (POST
"/json/auto/update-role" "/json/auto/update-role"
request request