Much UI work, significant improvement.
This commit is contained in:
parent
9c3af4c936
commit
5356f65ca3
11
project.clj
11
project.clj
|
@ -53,22 +53,15 @@
|
||||||
:main ^:skip-aot youyesyet.core
|
:main ^:skip-aot youyesyet.core
|
||||||
:migratus {:store :database :db ~(get (System/getenv) "DATABASE_URL")}
|
:migratus {:store :database :db ~(get (System/getenv) "DATABASE_URL")}
|
||||||
|
|
||||||
:plugins [[lein-bower "0.5.1"]
|
:plugins [[lein-cljsbuild "1.1.4"]
|
||||||
[lein-cljsbuild "1.1.4"]
|
|
||||||
[lein-codox "0.10.3"]
|
[lein-codox "0.10.3"]
|
||||||
[lein-cprop "1.0.1"]
|
[lein-cprop "1.0.1"]
|
||||||
[lein-less "1.7.5"]
|
[lein-less "1.7.5"]
|
||||||
[lein-npm "0.6.2"]
|
[lein-npm "0.6.2"]
|
||||||
[lein-uberwar "0.2.0"]
|
[lein-uberwar "0.2.0"]
|
||||||
[migratus-lein "0.4.2"]
|
[migratus-lein "0.4.2"]
|
||||||
[org.clojars.punkisdead/lein-cucumber "1.0.5"]
|
[org.clojars.punkisdead/lein-cucumber "1.0.5"]]
|
||||||
]
|
|
||||||
|
|
||||||
:bower-dependencies [[leaflet "0.7.3"]
|
|
||||||
[jquery "3.3.1"]
|
|
||||||
[datatables.net "1.10.19"]
|
|
||||||
[datatables.net-dt "1.10.19"]]
|
|
||||||
:bower {:directory "resources/public/js/lib"}
|
|
||||||
|
|
||||||
:cucumber-feature-paths ["test/clj/features"]
|
:cucumber-feature-paths ["test/clj/features"]
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- File queries.sql
|
-- File queries.sql
|
||||||
--
|
--
|
||||||
-- autogenerated by adl.to-hugsql-queries at 2018-07-09T20:55:32.719Z
|
-- autogenerated by adl.to-hugsql-queries at 2018-07-10T15:25:22.228Z
|
||||||
--
|
--
|
||||||
-- See [Application Description
|
-- See [Application Description
|
||||||
-- Language](https://github.com/simon-brooke/adl).
|
-- Language](https://github.com/simon-brooke/adl).
|
||||||
|
@ -343,9 +343,6 @@ ORDER BY dwellings.address_id,
|
||||||
SELECT * FROM electors
|
SELECT * FROM electors
|
||||||
WHERE electors.id = :id
|
WHERE electors.id = :id
|
||||||
ORDER BY electors.name,
|
ORDER BY electors.name,
|
||||||
electors.phone,
|
|
||||||
electors.email,
|
|
||||||
electors.gender,
|
|
||||||
electors.id
|
electors.id
|
||||||
|
|
||||||
-- :name get-event :? :1
|
-- :name get-event :? :1
|
||||||
|
@ -561,9 +558,6 @@ ORDER BY lv_dwellings.address_id,
|
||||||
-- :doc lists all existing elector records
|
-- :doc lists all existing elector records
|
||||||
SELECT DISTINCT * FROM lv_electors
|
SELECT DISTINCT * FROM lv_electors
|
||||||
ORDER BY lv_electors.name,
|
ORDER BY lv_electors.name,
|
||||||
lv_electors.phone,
|
|
||||||
lv_electors.email,
|
|
||||||
lv_electors.gender,
|
|
||||||
lv_electors.id
|
lv_electors.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")
|
||||||
|
@ -575,9 +569,6 @@ FROM lv_electors, electors
|
||||||
WHERE lv_electors.id = electors.id
|
WHERE lv_electors.id = electors.id
|
||||||
AND electors.dwelling_id = :id
|
AND electors.dwelling_id = :id
|
||||||
ORDER BY lv_electors.name,
|
ORDER BY lv_electors.name,
|
||||||
lv_electors.phone,
|
|
||||||
lv_electors.email,
|
|
||||||
lv_electors.gender,
|
|
||||||
lv_electors.id
|
lv_electors.id
|
||||||
|
|
||||||
-- :name list-electors-by-gender :? :*
|
-- :name list-electors-by-gender :? :*
|
||||||
|
@ -587,9 +578,6 @@ FROM lv_electors, electors
|
||||||
WHERE lv_electors.id = electors.id
|
WHERE lv_electors.id = electors.id
|
||||||
AND electors.gender = :id
|
AND electors.gender = :id
|
||||||
ORDER BY lv_electors.name,
|
ORDER BY lv_electors.name,
|
||||||
lv_electors.phone,
|
|
||||||
lv_electors.email,
|
|
||||||
lv_electors.gender,
|
|
||||||
lv_electors.id
|
lv_electors.id
|
||||||
|
|
||||||
-- :name list-events :? :*
|
-- :name list-events :? :*
|
||||||
|
@ -916,9 +904,6 @@ WHERE false
|
||||||
--~ (if (:gender params) "OR gender LIKE '%:gender%'")
|
--~ (if (:gender params) "OR gender LIKE '%:gender%'")
|
||||||
--~ (if (:id params) "OR id = :id")
|
--~ (if (:id params) "OR id = :id")
|
||||||
ORDER BY lv_electors.name,
|
ORDER BY lv_electors.name,
|
||||||
lv_electors.phone,
|
|
||||||
lv_electors.email,
|
|
||||||
lv_electors.gender,
|
|
||||||
lv_electors.id
|
lv_electors.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")
|
||||||
|
|
|
@ -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 20180709T205533.789Z
|
-- (https://github.com/simon-brooke/adl) at 20180710T152523.324Z
|
||||||
--
|
--
|
||||||
-- A web-app intended to be used by canvassers
|
-- A web-app intended to be used by canvassers
|
||||||
-- campaigning for a 'Yes' vote in the second independence
|
-- campaigning for a 'Yes' vote in the second independence
|
||||||
|
@ -281,6 +281,9 @@ GRANT DELETE ON followupactions TO admin ;
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- primary table followupmethods for entity followupmethods
|
-- primary table followupmethods for entity followupmethods
|
||||||
|
--
|
||||||
|
-- Methods which may be used to follow up a followup request. Reference
|
||||||
|
-- data.
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE followupmethods
|
CREATE TABLE followupmethods
|
||||||
(
|
(
|
||||||
|
@ -318,8 +321,8 @@ GRANT SELECT ON followuprequests TO admin,
|
||||||
teamorganisers ;
|
teamorganisers ;
|
||||||
GRANT INSERT ON followuprequests TO admin,
|
GRANT INSERT ON followuprequests TO admin,
|
||||||
canvassers ;
|
canvassers ;
|
||||||
GRANT UPDATE ON followuprequests TO admin ;
|
|
||||||
GRANT DELETE ON followuprequests TO admin ;
|
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- primary table genders for entity genders
|
-- primary table genders for entity genders
|
||||||
|
@ -360,8 +363,8 @@ GRANT SELECT ON intentions TO admin,
|
||||||
canvassers ;
|
canvassers ;
|
||||||
GRANT INSERT ON intentions TO admin,
|
GRANT INSERT ON intentions TO admin,
|
||||||
canvassers ;
|
canvassers ;
|
||||||
GRANT UPDATE ON intentions TO admin ;
|
|
||||||
GRANT DELETE ON intentions TO admin ;
|
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- primary table issues for entity issues
|
-- primary table issues for entity issues
|
||||||
|
@ -530,7 +533,7 @@ SELECT canvassers.username,
|
||||||
canvassers.fullname,
|
canvassers.fullname,
|
||||||
canvassers.avatar,
|
canvassers.avatar,
|
||||||
canvassers.bio,
|
canvassers.bio,
|
||||||
electors.name ||', '|| electors.phone ||', '|| electors.email ||', '|| genders.id AS elector_id_expanded,
|
electors.name AS elector_id_expanded,
|
||||||
canvassers.elector_id,
|
canvassers.elector_id,
|
||||||
addresses.address ||', '|| addresses.postcode AS address_id_expanded,
|
addresses.address ||', '|| addresses.postcode AS address_id_expanded,
|
||||||
canvassers.address_id,
|
canvassers.address_id,
|
||||||
|
@ -540,7 +543,7 @@ SELECT canvassers.username,
|
||||||
canvassers.authority_id,
|
canvassers.authority_id,
|
||||||
canvassers.authorised,
|
canvassers.authorised,
|
||||||
canvassers.id
|
canvassers.id
|
||||||
FROM canvassers, authorities, addresses, genders, electors
|
FROM canvassers, authorities, addresses, electors
|
||||||
WHERE canvassers.elector_id = electors.id
|
WHERE canvassers.elector_id = electors.id
|
||||||
AND canvassers.address_id = addresses.id
|
AND canvassers.address_id = addresses.id
|
||||||
AND canvassers.authority_id = authorities.id
|
AND canvassers.authority_id = authorities.id
|
||||||
|
@ -633,7 +636,7 @@ GRANT SELECT ON lv_events TO admin,
|
||||||
-- lists, et cetera
|
-- lists, et cetera
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE VIEW lv_followupactions AS
|
CREATE VIEW lv_followupactions AS
|
||||||
SELECT electors.name ||', '|| electors.phone ||', '|| electors.email ||', '|| genders.id ||', '|| addresses.address ||', '|| addresses.postcode ||', '|| visits.date ||', '|| issues.id AS request_id_expanded,
|
SELECT electors.name ||', '|| addresses.address ||', '|| addresses.postcode ||', '|| visits.date ||', '|| issues.id AS request_id_expanded,
|
||||||
followupactions.request_id,
|
followupactions.request_id,
|
||||||
canvassers.username ||', '|| canvassers.fullname ||', '|| addresses.address ||', '|| addresses.postcode ||', '|| canvassers.phone ||', '|| canvassers.email AS actor_expanded,
|
canvassers.username ||', '|| canvassers.fullname ||', '|| addresses.address ||', '|| addresses.postcode ||', '|| canvassers.phone ||', '|| canvassers.email AS actor_expanded,
|
||||||
followupactions.actor,
|
followupactions.actor,
|
||||||
|
@ -641,7 +644,7 @@ SELECT electors.name ||', '|| electors.phone ||', '|| electors.email ||', '|| ge
|
||||||
followupactions.notes,
|
followupactions.notes,
|
||||||
followupactions.closed,
|
followupactions.closed,
|
||||||
followupactions.id
|
followupactions.id
|
||||||
FROM followuprequests, visits, canvassers, addresses, followupactions, genders, issues, electors
|
FROM followuprequests, visits, canvassers, addresses, followupactions, issues, electors
|
||||||
WHERE followupactions.request_id = followuprequests.id
|
WHERE followupactions.request_id = followuprequests.id
|
||||||
AND followupactions.actor = canvassers.id
|
AND followupactions.actor = canvassers.id
|
||||||
;
|
;
|
||||||
|
@ -671,7 +674,7 @@ GRANT SELECT ON lv_followupmethods TO admin,
|
||||||
-- lists, et cetera
|
-- lists, et cetera
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE VIEW lv_followuprequests AS
|
CREATE VIEW lv_followuprequests AS
|
||||||
SELECT electors.name ||', '|| electors.phone ||', '|| electors.email ||', '|| genders.id AS elector_id_expanded,
|
SELECT electors.name AS elector_id_expanded,
|
||||||
followuprequests.elector_id,
|
followuprequests.elector_id,
|
||||||
addresses.address ||', '|| addresses.postcode ||', '|| visits.date AS visit_id_expanded,
|
addresses.address ||', '|| addresses.postcode ||', '|| visits.date AS visit_id_expanded,
|
||||||
followuprequests.visit_id,
|
followuprequests.visit_id,
|
||||||
|
@ -680,7 +683,7 @@ SELECT electors.name ||', '|| electors.phone ||', '|| electors.email ||', '|| ge
|
||||||
followupmethods.id AS method_id_expanded,
|
followupmethods.id AS method_id_expanded,
|
||||||
followuprequests.method_id,
|
followuprequests.method_id,
|
||||||
followuprequests.id
|
followuprequests.id
|
||||||
FROM followuprequests, visits, addresses, genders, issues, electors, followupmethods
|
FROM followuprequests, visits, addresses, issues, electors, followupmethods
|
||||||
WHERE followuprequests.elector_id = electors.id
|
WHERE followuprequests.elector_id = electors.id
|
||||||
AND followuprequests.visit_id = visits.id
|
AND followuprequests.visit_id = visits.id
|
||||||
AND followuprequests.issue_id = issues.id
|
AND followuprequests.issue_id = issues.id
|
||||||
|
@ -714,13 +717,13 @@ GRANT SELECT ON lv_genders TO admin,
|
||||||
CREATE VIEW lv_intentions AS
|
CREATE VIEW lv_intentions AS
|
||||||
SELECT addresses.address ||', '|| addresses.postcode ||', '|| visits.date AS visit_id_expanded,
|
SELECT addresses.address ||', '|| addresses.postcode ||', '|| visits.date AS visit_id_expanded,
|
||||||
intentions.visit_id,
|
intentions.visit_id,
|
||||||
electors.name ||', '|| electors.phone ||', '|| electors.email ||', '|| genders.id AS elector_id_expanded,
|
electors.name AS elector_id_expanded,
|
||||||
intentions.elector_id,
|
intentions.elector_id,
|
||||||
options.id AS option_id_expanded,
|
options.id AS option_id_expanded,
|
||||||
intentions.option_id,
|
intentions.option_id,
|
||||||
intentions.locality,
|
intentions.locality,
|
||||||
intentions.id
|
intentions.id
|
||||||
FROM visits, intentions, addresses, genders, electors, options
|
FROM visits, intentions, addresses, electors, options
|
||||||
WHERE intentions.visit_id = visits.id
|
WHERE intentions.visit_id = visits.id
|
||||||
AND intentions.elector_id = electors.id
|
AND intentions.elector_id = electors.id
|
||||||
AND intentions.option_id = options.id
|
AND intentions.option_id = options.id
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File application-index.html generated 2018-07-09T20:55:34.526Z by adl.to-selmer-templates.
|
<!-- File application-index.html generated 2018-07-10T15:25:24.202Z 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).-->
|
||||||
|
|
||||||
|
|
||||||
|
@ -142,6 +142,9 @@ Followupmethod
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
||||||
<dd>
|
<dd>
|
||||||
|
<p>
|
||||||
|
Methods which may be used to follow up a followup request. Reference data.
|
||||||
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
||||||
|
@ -246,14 +249,14 @@ Team
|
||||||
<dd>
|
<dd>
|
||||||
</dd>
|
</dd>
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers %}
|
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers admin %}
|
||||||
<dt>
|
<dt>
|
||||||
<a href='{{servlet-context}}/list-visits-Visits'>
|
<a href='{{servlet-context}}/list-visits-Visits'>
|
||||||
Visit
|
Visit
|
||||||
</a>
|
</a>
|
||||||
</dt>
|
</dt>
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers %}
|
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers admin %}
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
All visits made by canvassers to dwellings in
|
All visits made by canvassers to dwellings in
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File form-addresses-Address.html generated 2018-07-09T20:55:34.515Z by adl.to-selmer-templates.
|
<!-- File form-addresses-Address.html generated 2018-07-10T15:25:24.196Z 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 %}
|
{% block extra-head %}
|
||||||
|
|
||||||
|
{% script "/js/lib/node_modules/selectize/dist/js/standalone/selectize.min.js" %}
|
||||||
|
{% style "/js/lib/node_modules/selectize/dist/css/selectize.css" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id='content' class='edit'>
|
<div id='content' class='edit'>
|
||||||
|
@ -119,13 +121,9 @@ District_id
|
||||||
</label>
|
</label>
|
||||||
{% if {{record.district_id}} %}
|
{% if {{record.district_id}} %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof admin %}
|
||||||
<span class='select-box' farside='districts' found='true'>
|
|
||||||
<input name='district_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-districts?name=" + district_id_search_box.text, null, function (data) {updateMenuOptions("district_id", "id", ["name"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='district_id' name='district_id'>
|
<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 option in district_id %}<option value='{{option.id}}' {% ifequal record.district_id option.id%}selected{% endifequal %}>{{option.name}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -139,13 +137,9 @@ You are not permitted to view district_id of addresses
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof admin %}
|
||||||
<span class='select-box' farside='districts' found='true'>
|
|
||||||
<input name='district_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-districts?name=" + district_id_search_box.text, null, function (data) {updateMenuOptions("district_id", "id", ["name"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='district_id' name='district_id'>
|
<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 option in district_id %}<option value='{{option.id}}' {% ifequal record.district_id option.id%}selected{% endifequal %}>{{option.name}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -250,19 +244,33 @@ To delete this addresses record
|
||||||
{% block extra-tail %}
|
{% block extra-tail %}
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
/**
|
/**
|
||||||
* update the select menu with id `wid` from this `data` whose fields include
|
* selectize one select widget. Substitute the actual id of the widget for `district_id`.
|
||||||
* this `entity_key` and these `fields`
|
|
||||||
*/
|
*/
|
||||||
function updateMenuOptions(wid, entity_key, fields, data){
|
$('#district_id').selectize({
|
||||||
$('#' + wid).children().filter(function(){
|
valueField: 'id',
|
||||||
return $(this).attr('selected') === undefined;
|
labelField: 'name',
|
||||||
}).remove().end();
|
searchField: 'name',
|
||||||
|
options: [],
|
||||||
|
create: false,
|
||||||
|
|
||||||
$.each(data, function(key, entry){
|
load: function(query, callback) {
|
||||||
$('#' + wid).append(
|
console.log('Desperately seeking ' + query);
|
||||||
$('<option></option>').attr('value', key).text(entry));
|
if (query === null || !query.length) return callback();
|
||||||
|
$.ajax({
|
||||||
|
url: '/json/auto/search-strings-electors?name=' + query,
|
||||||
|
type: 'GET',
|
||||||
|
dataType: 'jsonp',
|
||||||
|
error: function() {
|
||||||
|
console.log( 'Query ' + query + ' failed.');
|
||||||
|
callback();
|
||||||
|
},
|
||||||
|
success: function(res) {
|
||||||
|
console.log('Received ' + res + ' records for ' + query);
|
||||||
|
callback(res);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File form-authorities-Authority.html generated 2018-07-09T20:55:34.531Z by adl.to-selmer-templates.
|
<!-- File form-authorities-Authority.html generated 2018-07-10T15:25:24.207Z 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).-->
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File form-canvassers-Canvasser.html generated 2018-07-09T20:55:34.536Z by adl.to-selmer-templates.
|
<!-- File form-canvassers-Canvasser.html generated 2018-07-10T15:25:24.210Z 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 %}
|
{% block extra-head %}
|
||||||
|
|
||||||
{% script "js/lib/node_modules/simplemde/dist/simplemde.min.js" %}
|
{% script "js/lib/node_modules/simplemde/dist/simplemde.min.js" %}
|
||||||
{% style "js/lib/node_modules/simplemde/dist/simplemde.min.css" %}
|
{% style "js/lib/node_modules/simplemde/dist/simplemde.min.css" %}
|
||||||
|
{% script "/js/lib/node_modules/selectize/dist/js/standalone/selectize.min.js" %}
|
||||||
|
{% style "/js/lib/node_modules/selectize/dist/css/selectize.css" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id='content' class='edit'>
|
<div id='content' class='edit'>
|
||||||
|
@ -81,18 +84,86 @@ You are not permitted to view fullname of canvassers
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
<p class='widget'>
|
<p class='widget'>
|
||||||
|
<label for='avatar'>
|
||||||
|
Avatar
|
||||||
|
</label>
|
||||||
|
{% if {{record.avatar}} %}
|
||||||
|
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
|
||||||
|
<input id='avatar' name='avatar' type='file' value='{{record.avatar}}' maxlength='' size='16'/>
|
||||||
|
{% else %}
|
||||||
|
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
||||||
|
<span id='avatar' name='avatar' class='pseudo-widget disabled'>
|
||||||
|
{{record.avatar}}
|
||||||
|
</span>
|
||||||
|
{% else %}
|
||||||
|
<span id='avatar' name='avatar' class='pseudo-widget not-authorised'>
|
||||||
|
You are not permitted to view avatar of canvassers
|
||||||
|
</span>
|
||||||
|
{% endifmemberof %}
|
||||||
|
{% endifmemberof %}
|
||||||
|
{% else %}
|
||||||
|
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
|
||||||
|
<input id='avatar' name='avatar' type='file' value='{{record.avatar}}' maxlength='' size='16'/>
|
||||||
|
{% else %}
|
||||||
|
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
||||||
|
<span id='avatar' name='avatar' class='pseudo-widget disabled'>
|
||||||
|
{{record.avatar}}
|
||||||
|
</span>
|
||||||
|
{% else %}
|
||||||
|
<span id='avatar' name='avatar' class='pseudo-widget not-authorised'>
|
||||||
|
You are not permitted to view avatar of canvassers
|
||||||
|
</span>
|
||||||
|
{% endifmemberof %}
|
||||||
|
{% endifmemberof %}
|
||||||
|
{% endif %}
|
||||||
|
</p>
|
||||||
|
<p class='widget'>
|
||||||
|
<label for='bio'>
|
||||||
|
Bio
|
||||||
|
</label>
|
||||||
|
{% if {{record.bio}} %}
|
||||||
|
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
|
||||||
|
<textarea rows='8' cols='60' id='bio' name='bio'>
|
||||||
|
{{record.bio}}
|
||||||
|
</textarea>
|
||||||
|
{% else %}
|
||||||
|
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
||||||
|
<span id='bio' name='bio' class='pseudo-widget disabled'>
|
||||||
|
{{record.bio}}
|
||||||
|
</span>
|
||||||
|
{% else %}
|
||||||
|
<span id='bio' name='bio' class='pseudo-widget not-authorised'>
|
||||||
|
You are not permitted to view bio of canvassers
|
||||||
|
</span>
|
||||||
|
{% endifmemberof %}
|
||||||
|
{% endifmemberof %}
|
||||||
|
{% else %}
|
||||||
|
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
|
||||||
|
<textarea rows='8' cols='60' id='bio' name='bio'>
|
||||||
|
{{record.bio}}
|
||||||
|
</textarea>
|
||||||
|
{% else %}
|
||||||
|
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
||||||
|
<span id='bio' name='bio' class='pseudo-widget disabled'>
|
||||||
|
{{record.bio}}
|
||||||
|
</span>
|
||||||
|
{% else %}
|
||||||
|
<span id='bio' name='bio' class='pseudo-widget not-authorised'>
|
||||||
|
You are not permitted to view bio of canvassers
|
||||||
|
</span>
|
||||||
|
{% endifmemberof %}
|
||||||
|
{% endifmemberof %}
|
||||||
|
{% endif %}
|
||||||
|
</p>
|
||||||
|
<p class='widget'>
|
||||||
<label for='elector_id'>
|
<label for='elector_id'>
|
||||||
Elector_id
|
Elector_id
|
||||||
</label>
|
</label>
|
||||||
{% if {{record.elector_id}} %}
|
{% if {{record.elector_id}} %}
|
||||||
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
|
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
|
||||||
<span class='select-box' farside='electors' found='true'>
|
|
||||||
<input name='elector_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-electors?gender=" + elector_id_search_box.text + "&email=" + elector_id_search_box.text + "&name=" + elector_id_search_box.text + "&phone=" + elector_id_search_box.text, null, function (data) {updateMenuOptions("elector_id", "id", ["gender", "email", "name", "phone"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='elector_id' name='elector_id'>
|
<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 option in elector_id %}<option value='{{option.id}}' {% ifequal record.elector_id option.id%}selected{% endifequal %}>{{option.name}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -106,13 +177,9 @@ You are not permitted to view elector_id of canvassers
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
|
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
|
||||||
<span class='select-box' farside='electors' found='true'>
|
|
||||||
<input name='elector_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-electors?gender=" + elector_id_search_box.text + "&email=" + elector_id_search_box.text + "&name=" + elector_id_search_box.text + "&phone=" + elector_id_search_box.text, null, function (data) {updateMenuOptions("elector_id", "id", ["gender", "email", "name", "phone"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='elector_id' name='elector_id'>
|
<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 option in elector_id %}<option value='{{option.id}}' {% ifequal record.elector_id option.id%}selected{% endifequal %}>{{option.name}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -132,13 +199,9 @@ Address_id
|
||||||
</label>
|
</label>
|
||||||
{% if {{record.address_id}} %}
|
{% if {{record.address_id}} %}
|
||||||
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
|
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
|
||||||
<span class='select-box' farside='addresses' found='true'>
|
|
||||||
<input name='address_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-addresses?postcode=" + address_id_search_box.text + "&address=" + address_id_search_box.text, null, function (data) {updateMenuOptions("address_id", "id", ["postcode", "address"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='address_id' name='address_id'>
|
<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 option in address_id %}<option value='{{option.id}}' {% ifequal record.address_id option.id%}selected{% endifequal %}>{{option.address}} {{option.postcode}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -152,13 +215,9 @@ You are not permitted to view address_id of canvassers
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
|
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
|
||||||
<span class='select-box' farside='addresses' found='true'>
|
|
||||||
<input name='address_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-addresses?postcode=" + address_id_search_box.text + "&address=" + address_id_search_box.text, null, function (data) {updateMenuOptions("address_id", "id", ["postcode", "address"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='address_id' name='address_id'>
|
<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 option in address_id %}<option value='{{option.id}}' {% ifequal record.address_id option.id%}selected{% endifequal %}>{{option.address}} {{option.postcode}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -246,13 +305,9 @@ Authority_id
|
||||||
</label>
|
</label>
|
||||||
{% if {{record.authority_id}} %}
|
{% if {{record.authority_id}} %}
|
||||||
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
|
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
|
||||||
<span class='select-box' farside='authorities' found='true'>
|
|
||||||
<input name='authority_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-authorities?id=" + authority_id_search_box.text, null, function (data) {updateMenuOptions("authority_id", "id", ["id"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='authority_id' name='authority_id'>
|
<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 option in authority_id %}<option value='{{option.id}}' {% ifequal record.authority_id option.id%}selected{% endifequal %}>{{option.id}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -266,13 +321,9 @@ You are not permitted to view authority_id of canvassers
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
|
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
|
||||||
<span class='select-box' farside='authorities' found='true'>
|
|
||||||
<input name='authority_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-authorities?id=" + authority_id_search_box.text, null, function (data) {updateMenuOptions("authority_id", "id", ["id"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='authority_id' name='authority_id'>
|
<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 option in authority_id %}<option value='{{option.id}}' {% ifequal record.authority_id option.id%}selected{% endifequal %}>{{option.id}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -326,11 +377,9 @@ Roles
|
||||||
</label>
|
</label>
|
||||||
{% if {{record.roles}} %}
|
{% if {{record.roles}} %}
|
||||||
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
|
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
|
||||||
<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 option in roles %}<option value='{{option.role_id}}' {% ifequal record.roles option.role_id%}selected{% endifequal %}>{{option.name}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -344,11 +393,9 @@ You are not permitted to view roles of canvassers
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
|
{% ifmemberof canvassers teamorganisers admin canvassers teamorganisers admin %}
|
||||||
<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 option in roles %}<option value='{{option.role_id}}' {% ifequal record.roles option.role_id%}selected{% endifequal %}>{{option.name}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -385,19 +432,62 @@ To delete this canvassers record
|
||||||
{% block extra-tail %}
|
{% block extra-tail %}
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
/**
|
/**
|
||||||
* update the select menu with id `wid` from this `data` whose fields include
|
* selectize one select widget. Substitute the actual id of the widget for `elector_id`.
|
||||||
* this `entity_key` and these `fields`
|
|
||||||
*/
|
*/
|
||||||
function updateMenuOptions(wid, entity_key, fields, data){
|
$('#elector_id').selectize({
|
||||||
$('#' + wid).children().filter(function(){
|
valueField: 'id',
|
||||||
return $(this).attr('selected') === undefined;
|
labelField: 'name',
|
||||||
}).remove().end();
|
searchField: 'name',
|
||||||
|
options: [],
|
||||||
|
create: false,
|
||||||
|
|
||||||
$.each(data, function(key, entry){
|
load: function(query, callback) {
|
||||||
$('#' + wid).append(
|
console.log('Desperately seeking ' + query);
|
||||||
$('<option></option>').attr('value', key).text(entry));
|
if (query === null || !query.length) return callback();
|
||||||
|
$.ajax({
|
||||||
|
url: '/json/auto/search-strings-electors?name=' + query,
|
||||||
|
type: 'GET',
|
||||||
|
dataType: 'jsonp',
|
||||||
|
error: function() {
|
||||||
|
console.log( 'Query ' + query + ' failed.');
|
||||||
|
callback();
|
||||||
|
},
|
||||||
|
success: function(res) {
|
||||||
|
console.log('Received ' + res + ' records for ' + query);
|
||||||
|
callback(res);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* selectize one select widget. Substitute the actual id of the widget for `address_id`.
|
||||||
|
*/
|
||||||
|
$('#address_id').selectize({
|
||||||
|
valueField: 'id',
|
||||||
|
labelField: 'name',
|
||||||
|
searchField: 'name',
|
||||||
|
options: [],
|
||||||
|
create: false,
|
||||||
|
|
||||||
|
load: function(query, callback) {
|
||||||
|
console.log('Desperately seeking ' + query);
|
||||||
|
if (query === null || !query.length) return callback();
|
||||||
|
$.ajax({
|
||||||
|
url: '/json/auto/search-strings-electors?name=' + query,
|
||||||
|
type: 'GET',
|
||||||
|
dataType: 'jsonp',
|
||||||
|
error: function() {
|
||||||
|
console.log( 'Query ' + query + ' failed.');
|
||||||
|
callback();
|
||||||
|
},
|
||||||
|
success: function(res) {
|
||||||
|
console.log('Received ' + res + ' records for ' + query);
|
||||||
|
callback(res);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
var simplemde = new SimpleMDE({
|
var simplemde = new SimpleMDE({
|
||||||
autosave: {
|
autosave: {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File form-districts-District.html generated 2018-07-09T20:55:34.509Z by adl.to-selmer-templates.
|
<!-- File form-districts-District.html generated 2018-07-10T15:25:24.193Z 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).-->
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File form-dwellings-Dwelling.html generated 2018-07-09T20:55:34.547Z by adl.to-selmer-templates.
|
<!-- File form-dwellings-Dwelling.html generated 2018-07-10T15:25:24.216Z 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 %}
|
{% block extra-head %}
|
||||||
|
|
||||||
|
{% script "/js/lib/node_modules/selectize/dist/js/standalone/selectize.min.js" %}
|
||||||
|
{% style "/js/lib/node_modules/selectize/dist/css/selectize.css" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id='content' class='edit'>
|
<div id='content' class='edit'>
|
||||||
|
@ -17,13 +19,9 @@ Address_id
|
||||||
</label>
|
</label>
|
||||||
{% if {{record.address_id}} %}
|
{% if {{record.address_id}} %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof admin %}
|
||||||
<span class='select-box' farside='addresses' found='true'>
|
|
||||||
<input name='address_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-addresses?postcode=" + address_id_search_box.text + "&address=" + address_id_search_box.text, null, function (data) {updateMenuOptions("address_id", "id", ["postcode", "address"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='address_id' name='address_id'>
|
<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 option in address_id %}<option value='{{option.id}}' {% ifequal record.address_id option.id%}selected{% endifequal %}>{{option.address}} {{option.postcode}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -37,13 +35,9 @@ You are not permitted to view address_id of dwellings
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof admin %}
|
||||||
<span class='select-box' farside='addresses' found='true'>
|
|
||||||
<input name='address_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-addresses?postcode=" + address_id_search_box.text + "&address=" + address_id_search_box.text, null, function (data) {updateMenuOptions("address_id", "id", ["postcode", "address"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='address_id' name='address_id'>
|
<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 option in address_id %}<option value='{{option.id}}' {% ifequal record.address_id option.id%}selected{% endifequal %}>{{option.address}} {{option.postcode}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -114,19 +108,33 @@ To delete this dwellings record
|
||||||
{% block extra-tail %}
|
{% block extra-tail %}
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
/**
|
/**
|
||||||
* update the select menu with id `wid` from this `data` whose fields include
|
* selectize one select widget. Substitute the actual id of the widget for `address_id`.
|
||||||
* this `entity_key` and these `fields`
|
|
||||||
*/
|
*/
|
||||||
function updateMenuOptions(wid, entity_key, fields, data){
|
$('#address_id').selectize({
|
||||||
$('#' + wid).children().filter(function(){
|
valueField: 'id',
|
||||||
return $(this).attr('selected') === undefined;
|
labelField: 'name',
|
||||||
}).remove().end();
|
searchField: 'name',
|
||||||
|
options: [],
|
||||||
|
create: false,
|
||||||
|
|
||||||
$.each(data, function(key, entry){
|
load: function(query, callback) {
|
||||||
$('#' + wid).append(
|
console.log('Desperately seeking ' + query);
|
||||||
$('<option></option>').attr('value', key).text(entry));
|
if (query === null || !query.length) return callback();
|
||||||
|
$.ajax({
|
||||||
|
url: '/json/auto/search-strings-electors?name=' + query,
|
||||||
|
type: 'GET',
|
||||||
|
dataType: 'jsonp',
|
||||||
|
error: function() {
|
||||||
|
console.log( 'Query ' + query + ' failed.');
|
||||||
|
callback();
|
||||||
|
},
|
||||||
|
success: function(res) {
|
||||||
|
console.log('Received ' + res + ' records for ' + query);
|
||||||
|
callback(res);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File form-electors-Elector.html generated 2018-07-09T20:55:34.529Z by adl.to-selmer-templates.
|
<!-- File form-electors-Elector.html generated 2018-07-10T15:25:24.205Z 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 %}
|
{% block extra-head %}
|
||||||
|
|
||||||
|
{% script "/js/lib/node_modules/selectize/dist/js/standalone/selectize.min.js" %}
|
||||||
|
{% style "/js/lib/node_modules/selectize/dist/css/selectize.css" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id='content' class='edit'>
|
<div id='content' class='edit'>
|
||||||
|
@ -51,13 +53,9 @@ Dwelling_id
|
||||||
</label>
|
</label>
|
||||||
{% if {{record.dwelling_id}} %}
|
{% if {{record.dwelling_id}} %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof admin %}
|
||||||
<span class='select-box' farside='dwellings' found='true'>
|
|
||||||
<input name='dwelling_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-dwellings?sub-address=" + dwelling_id_search_box.text + "&address_id=" + dwelling_id_search_box.text, null, function (data) {updateMenuOptions("dwelling_id", "id", ["sub-address", "address_id"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='dwelling_id' name='dwelling_id'>
|
<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 option in dwelling_id %}<option value='{{option.id}}' {% ifequal record.dwelling_id option.id%}selected{% endifequal %}>{{option.address_id}} {{option.sub-address}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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,13 +69,9 @@ You are not permitted to view dwelling_id of electors
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof admin %}
|
||||||
<span class='select-box' farside='dwellings' found='true'>
|
|
||||||
<input name='dwelling_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-dwellings?sub-address=" + dwelling_id_search_box.text + "&address_id=" + dwelling_id_search_box.text, null, function (data) {updateMenuOptions("dwelling_id", "id", ["sub-address", "address_id"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='dwelling_id' name='dwelling_id'>
|
<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 option in dwelling_id %}<option value='{{option.id}}' {% ifequal record.dwelling_id option.id%}selected{% endifequal %}>{{option.address_id}} {{option.sub-address}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -165,11 +159,9 @@ Gender
|
||||||
</label>
|
</label>
|
||||||
{% if {{record.gender}} %}
|
{% if {{record.gender}} %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof admin %}
|
||||||
<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 option in gender %}<option value='{{option.id}}' {% ifequal record.gender option.id%}selected{% endifequal %}>{{option.id}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -183,11 +175,9 @@ You are not permitted to view gender of electors
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof admin %}
|
||||||
<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 option in gender %}<option value='{{option.id}}' {% ifequal record.gender option.id%}selected{% endifequal %}>{{option.id}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -224,19 +214,33 @@ To delete this electors record
|
||||||
{% block extra-tail %}
|
{% block extra-tail %}
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
/**
|
/**
|
||||||
* update the select menu with id `wid` from this `data` whose fields include
|
* selectize one select widget. Substitute the actual id of the widget for `dwelling_id`.
|
||||||
* this `entity_key` and these `fields`
|
|
||||||
*/
|
*/
|
||||||
function updateMenuOptions(wid, entity_key, fields, data){
|
$('#dwelling_id').selectize({
|
||||||
$('#' + wid).children().filter(function(){
|
valueField: 'id',
|
||||||
return $(this).attr('selected') === undefined;
|
labelField: 'name',
|
||||||
}).remove().end();
|
searchField: 'name',
|
||||||
|
options: [],
|
||||||
|
create: false,
|
||||||
|
|
||||||
$.each(data, function(key, entry){
|
load: function(query, callback) {
|
||||||
$('#' + wid).append(
|
console.log('Desperately seeking ' + query);
|
||||||
$('<option></option>').attr('value', key).text(entry));
|
if (query === null || !query.length) return callback();
|
||||||
|
$.ajax({
|
||||||
|
url: '/json/auto/search-strings-electors?name=' + query,
|
||||||
|
type: 'GET',
|
||||||
|
dataType: 'jsonp',
|
||||||
|
error: function() {
|
||||||
|
console.log( 'Query ' + query + ' failed.');
|
||||||
|
callback();
|
||||||
|
},
|
||||||
|
success: function(res) {
|
||||||
|
console.log('Received ' + res + ' records for ' + query);
|
||||||
|
callback(res);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File form-events-Events.html generated 2018-07-09T20:55:34.534Z by adl.to-selmer-templates.
|
<!-- File form-events-Events.html generated 2018-07-10T15:25:24.209Z 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 %}
|
{% block extra-head %}
|
||||||
|
|
||||||
{% script "js/lib/node_modules/simplemde/dist/simplemde.min.js" %}
|
{% script "js/lib/node_modules/simplemde/dist/simplemde.min.js" %}
|
||||||
{% style "js/lib/node_modules/simplemde/dist/simplemde.min.css" %}
|
{% style "js/lib/node_modules/simplemde/dist/simplemde.min.css" %}
|
||||||
|
{% script "/js/lib/node_modules/selectize/dist/js/standalone/selectize.min.js" %}
|
||||||
|
{% style "/js/lib/node_modules/selectize/dist/css/selectize.css" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id='content' class='edit'>
|
<div id='content' class='edit'>
|
||||||
|
@ -52,13 +55,9 @@ Teams
|
||||||
</label>
|
</label>
|
||||||
{% if {{record.teams}} %}
|
{% if {{record.teams}} %}
|
||||||
{% ifmemberof teamorganisers admin %}
|
{% ifmemberof teamorganisers admin %}
|
||||||
<span class='select-box' farside='teams' found='true'>
|
|
||||||
<input name='teams_search_box' onchange='$.getJSON("/auto/json/seach-strings-teams?name=" + teams_search_box.text, null, function (data) {updateMenuOptions("teams", "id", ["name"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='teams' name='teams' multiple='multiple'>
|
<select id='teams' name='teams' multiple='multiple'>
|
||||||
{% for r in teams %}<option value='{{r.id}}' {% ifequal record.teams r.id%}selected{% endifequal %}>{{r.name}}</option>{% endfor %}
|
{% for option in teams %}<option value='{{option.id}}' {% ifequal record.teams option.id%}selected{% endifequal %}>{{option.name}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</span>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
||||||
<span id='teams' name='teams' class='pseudo-widget disabled'>
|
<span id='teams' name='teams' class='pseudo-widget disabled'>
|
||||||
|
@ -72,13 +71,9 @@ You are not permitted to view teams of events
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof teamorganisers admin %}
|
{% ifmemberof teamorganisers admin %}
|
||||||
<span class='select-box' farside='teams' found='true'>
|
|
||||||
<input name='teams_search_box' onchange='$.getJSON("/auto/json/seach-strings-teams?name=" + teams_search_box.text, null, function (data) {updateMenuOptions("teams", "id", ["name"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='teams' name='teams' multiple='multiple'>
|
<select id='teams' name='teams' multiple='multiple'>
|
||||||
{% for r in teams %}<option value='{{r.id}}' {% ifequal record.teams r.id%}selected{% endifequal %}>{{r.name}}</option>{% endfor %}
|
{% for option in teams %}<option value='{{option.id}}' {% ifequal record.teams option.id%}selected{% endifequal %}>{{option.name}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</span>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
||||||
<span id='teams' name='teams' class='pseudo-widget disabled'>
|
<span id='teams' name='teams' class='pseudo-widget disabled'>
|
||||||
|
@ -254,21 +249,6 @@ To delete this events record
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block extra-tail %}
|
{% block extra-tail %}
|
||||||
<script type='text/javascript'>
|
<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({
|
var simplemde = new SimpleMDE({
|
||||||
autosave: {
|
autosave: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File form-followupactions-Followupaction.html generated 2018-07-09T20:55:34.549Z by adl.to-selmer-templates.
|
<!-- File form-followupactions-Followupaction.html generated 2018-07-10T15:25:24.218Z 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 %}
|
{% block extra-head %}
|
||||||
|
|
||||||
{% script "js/lib/node_modules/simplemde/dist/simplemde.min.js" %}
|
{% script "js/lib/node_modules/simplemde/dist/simplemde.min.js" %}
|
||||||
{% style "js/lib/node_modules/simplemde/dist/simplemde.min.css" %}
|
{% style "js/lib/node_modules/simplemde/dist/simplemde.min.css" %}
|
||||||
|
{% script "/js/lib/node_modules/selectize/dist/js/standalone/selectize.min.js" %}
|
||||||
|
{% style "/js/lib/node_modules/selectize/dist/css/selectize.css" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id='content' class='edit'>
|
<div id='content' class='edit'>
|
||||||
|
@ -18,13 +21,9 @@ Request_id
|
||||||
</label>
|
</label>
|
||||||
{% if {{record.request_id}} %}
|
{% if {{record.request_id}} %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof admin %}
|
||||||
<span class='select-box' farside='followuprequests' found='true'>
|
|
||||||
<input name='request_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-followuprequests?elector_id=" + request_id_search_box.text + "&issue_id=" + request_id_search_box.text + "&visit_id=" + request_id_search_box.text, null, function (data) {updateMenuOptions("request_id", "id", ["elector_id", "issue_id", "visit_id"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='request_id' name='request_id'>
|
<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 option in request_id %}<option value='{{option.id}}' {% ifequal record.request_id option.id%}selected{% endifequal %}>{{option.elector_id}} {{option.visit_id}} {{option.issue_id}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -38,13 +37,9 @@ You are not permitted to view request_id of followupactions
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof admin %}
|
||||||
<span class='select-box' farside='followuprequests' found='true'>
|
|
||||||
<input name='request_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-followuprequests?elector_id=" + request_id_search_box.text + "&issue_id=" + request_id_search_box.text + "&visit_id=" + request_id_search_box.text, null, function (data) {updateMenuOptions("request_id", "id", ["elector_id", "issue_id", "visit_id"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='request_id' name='request_id'>
|
<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 option in request_id %}<option value='{{option.id}}' {% ifequal record.request_id option.id%}selected{% endifequal %}>{{option.elector_id}} {{option.visit_id}} {{option.issue_id}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -64,13 +59,9 @@ Actor
|
||||||
</label>
|
</label>
|
||||||
{% if {{record.actor}} %}
|
{% if {{record.actor}} %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof admin %}
|
||||||
<span class='select-box' farside='canvassers' found='true'>
|
|
||||||
<input name='actor_search_box' onchange='$.getJSON("/auto/json/seach-strings-canvassers?=" + actor_search_box.text, null, function (data) {updateMenuOptions("actor", "", [""], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='actor' name='actor'>
|
<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 option in actor %}<option value='{{option.id}}' {% ifequal record.actor option.id%}selected{% endifequal %}>{{option.username}} {{option.fullname}} {{option.address_id}} {{option.phone}} {{option.email}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -84,13 +75,9 @@ You are not permitted to view actor of followupactions
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof admin %}
|
||||||
<span class='select-box' farside='canvassers' found='true'>
|
|
||||||
<input name='actor_search_box' onchange='$.getJSON("/auto/json/seach-strings-canvassers?=" + actor_search_box.text, null, function (data) {updateMenuOptions("actor", "", [""], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='actor' name='actor'>
|
<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 option in actor %}<option value='{{option.id}}' {% ifequal record.actor option.id%}selected{% endifequal %}>{{option.username}} {{option.fullname}} {{option.address_id}} {{option.phone}} {{option.email}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -233,19 +220,62 @@ To delete this followupactions record
|
||||||
{% block extra-tail %}
|
{% block extra-tail %}
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
/**
|
/**
|
||||||
* update the select menu with id `wid` from this `data` whose fields include
|
* selectize one select widget. Substitute the actual id of the widget for `request_id`.
|
||||||
* this `entity_key` and these `fields`
|
|
||||||
*/
|
*/
|
||||||
function updateMenuOptions(wid, entity_key, fields, data){
|
$('#request_id').selectize({
|
||||||
$('#' + wid).children().filter(function(){
|
valueField: 'id',
|
||||||
return $(this).attr('selected') === undefined;
|
labelField: 'name',
|
||||||
}).remove().end();
|
searchField: 'name',
|
||||||
|
options: [],
|
||||||
|
create: false,
|
||||||
|
|
||||||
$.each(data, function(key, entry){
|
load: function(query, callback) {
|
||||||
$('#' + wid).append(
|
console.log('Desperately seeking ' + query);
|
||||||
$('<option></option>').attr('value', key).text(entry));
|
if (query === null || !query.length) return callback();
|
||||||
|
$.ajax({
|
||||||
|
url: '/json/auto/search-strings-electors?name=' + query,
|
||||||
|
type: 'GET',
|
||||||
|
dataType: 'jsonp',
|
||||||
|
error: function() {
|
||||||
|
console.log( 'Query ' + query + ' failed.');
|
||||||
|
callback();
|
||||||
|
},
|
||||||
|
success: function(res) {
|
||||||
|
console.log('Received ' + res + ' records for ' + query);
|
||||||
|
callback(res);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* selectize one select widget. Substitute the actual id of the widget for `actor`.
|
||||||
|
*/
|
||||||
|
$('#actor').selectize({
|
||||||
|
valueField: 'id',
|
||||||
|
labelField: 'name',
|
||||||
|
searchField: 'name',
|
||||||
|
options: [],
|
||||||
|
create: false,
|
||||||
|
|
||||||
|
load: function(query, callback) {
|
||||||
|
console.log('Desperately seeking ' + query);
|
||||||
|
if (query === null || !query.length) return callback();
|
||||||
|
$.ajax({
|
||||||
|
url: '/json/auto/search-strings-electors?name=' + query,
|
||||||
|
type: 'GET',
|
||||||
|
dataType: 'jsonp',
|
||||||
|
error: function() {
|
||||||
|
console.log( 'Query ' + query + ' failed.');
|
||||||
|
callback();
|
||||||
|
},
|
||||||
|
success: function(res) {
|
||||||
|
console.log('Received ' + res + ' records for ' + query);
|
||||||
|
callback(res);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
var simplemde = new SimpleMDE({
|
var simplemde = new SimpleMDE({
|
||||||
autosave: {
|
autosave: {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File form-followupmethods-Followupmethod.html generated 2018-07-09T20:55:34.550Z by adl.to-selmer-templates.
|
<!-- File form-followupmethods-Followupmethod.html generated 2018-07-10T15:25:24.219Z 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).-->
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File form-followuprequests-Followuprequest.html generated 2018-07-09T20:55:34.512Z by adl.to-selmer-templates.
|
<!-- File form-followuprequests-Followuprequest.html generated 2018-07-10T15:25:24.194Z 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 %}
|
{% block extra-head %}
|
||||||
|
|
||||||
|
{% script "/js/lib/node_modules/selectize/dist/js/standalone/selectize.min.js" %}
|
||||||
|
{% style "/js/lib/node_modules/selectize/dist/css/selectize.css" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id='content' class='edit'>
|
<div id='content' class='edit'>
|
||||||
|
@ -16,14 +18,10 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
|
||||||
Elector_id
|
Elector_id
|
||||||
</label>
|
</label>
|
||||||
{% if {{record.elector_id}} %}
|
{% if {{record.elector_id}} %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof %}
|
||||||
<span class='select-box' farside='electors' found='true'>
|
|
||||||
<input name='elector_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-electors?gender=" + elector_id_search_box.text + "&email=" + elector_id_search_box.text + "&name=" + elector_id_search_box.text + "&phone=" + elector_id_search_box.text, null, function (data) {updateMenuOptions("elector_id", "id", ["gender", "email", "name", "phone"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='elector_id' name='elector_id'>
|
<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 option in elector_id %}<option value='{{option.id}}' {% ifequal record.elector_id option.id%}selected{% endifequal %}>{{option.name}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -36,14 +34,10 @@ You are not permitted to view elector_id of followuprequests
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof %}
|
||||||
<span class='select-box' farside='electors' found='true'>
|
|
||||||
<input name='elector_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-electors?gender=" + elector_id_search_box.text + "&email=" + elector_id_search_box.text + "&name=" + elector_id_search_box.text + "&phone=" + elector_id_search_box.text, null, function (data) {updateMenuOptions("elector_id", "id", ["gender", "email", "name", "phone"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='elector_id' name='elector_id'>
|
<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 option in elector_id %}<option value='{{option.id}}' {% ifequal record.elector_id option.id%}selected{% endifequal %}>{{option.name}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -62,14 +56,10 @@ You are not permitted to view elector_id of followuprequests
|
||||||
Visit_id
|
Visit_id
|
||||||
</label>
|
</label>
|
||||||
{% if {{record.visit_id}} %}
|
{% if {{record.visit_id}} %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof %}
|
||||||
<span class='select-box' farside='visits' found='true'>
|
|
||||||
<input name='visit_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-visits?address_id=" + visit_id_search_box.text + "&date=" + visit_id_search_box.text, null, function (data) {updateMenuOptions("visit_id", "id", ["address_id", "date"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='visit_id' name='visit_id'>
|
<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 option in visit_id %}<option value='{{option.id}}' {% ifequal record.visit_id option.id%}selected{% endifequal %}>{{option.address_id}} {{option.date}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -82,14 +72,10 @@ You are not permitted to view visit_id of followuprequests
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof %}
|
||||||
<span class='select-box' farside='visits' found='true'>
|
|
||||||
<input name='visit_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-visits?address_id=" + visit_id_search_box.text + "&date=" + visit_id_search_box.text, null, function (data) {updateMenuOptions("visit_id", "id", ["address_id", "date"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='visit_id' name='visit_id'>
|
<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 option in visit_id %}<option value='{{option.id}}' {% ifequal record.visit_id option.id%}selected{% endifequal %}>{{option.address_id}} {{option.date}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -108,12 +94,10 @@ You are not permitted to view visit_id of followuprequests
|
||||||
Issue_id
|
Issue_id
|
||||||
</label>
|
</label>
|
||||||
{% if {{record.issue_id}} %}
|
{% if {{record.issue_id}} %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof %}
|
||||||
<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 option in issue_id %}<option value='{{option.id}}' {% ifequal record.issue_id option.id%}selected{% endifequal %}>{{option.id}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -126,12 +110,10 @@ You are not permitted to view issue_id of followuprequests
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof %}
|
||||||
<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 option in issue_id %}<option value='{{option.id}}' {% ifequal record.issue_id option.id%}selected{% endifequal %}>{{option.id}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -150,12 +132,10 @@ You are not permitted to view issue_id of followuprequests
|
||||||
Method_id
|
Method_id
|
||||||
</label>
|
</label>
|
||||||
{% if {{record.method_id}} %}
|
{% if {{record.method_id}} %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof %}
|
||||||
<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 option in method_id %}<option value='{{option.id}}' {% ifequal record.method_id option.id%}selected{% endifequal %}>{{option.id}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -168,12 +148,10 @@ You are not permitted to view method_id of followuprequests
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof %}
|
||||||
<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 option in method_id %}<option value='{{option.id}}' {% ifequal record.method_id option.id%}selected{% endifequal %}>{{option.id}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -187,7 +165,7 @@ You are not permitted to view method_id of followuprequests
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof %}
|
||||||
<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
|
||||||
|
@ -195,7 +173,7 @@ To save this followuprequests record
|
||||||
<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 %}
|
{% endifmemberof %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof %}
|
||||||
<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
|
||||||
|
@ -210,19 +188,62 @@ To delete this followuprequests record
|
||||||
{% block extra-tail %}
|
{% block extra-tail %}
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
/**
|
/**
|
||||||
* update the select menu with id `wid` from this `data` whose fields include
|
* selectize one select widget. Substitute the actual id of the widget for `elector_id`.
|
||||||
* this `entity_key` and these `fields`
|
|
||||||
*/
|
*/
|
||||||
function updateMenuOptions(wid, entity_key, fields, data){
|
$('#elector_id').selectize({
|
||||||
$('#' + wid).children().filter(function(){
|
valueField: 'id',
|
||||||
return $(this).attr('selected') === undefined;
|
labelField: 'name',
|
||||||
}).remove().end();
|
searchField: 'name',
|
||||||
|
options: [],
|
||||||
|
create: false,
|
||||||
|
|
||||||
$.each(data, function(key, entry){
|
load: function(query, callback) {
|
||||||
$('#' + wid).append(
|
console.log('Desperately seeking ' + query);
|
||||||
$('<option></option>').attr('value', key).text(entry));
|
if (query === null || !query.length) return callback();
|
||||||
|
$.ajax({
|
||||||
|
url: '/json/auto/search-strings-electors?name=' + query,
|
||||||
|
type: 'GET',
|
||||||
|
dataType: 'jsonp',
|
||||||
|
error: function() {
|
||||||
|
console.log( 'Query ' + query + ' failed.');
|
||||||
|
callback();
|
||||||
|
},
|
||||||
|
success: function(res) {
|
||||||
|
console.log('Received ' + res + ' records for ' + query);
|
||||||
|
callback(res);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* selectize one select widget. Substitute the actual id of the widget for `visit_id`.
|
||||||
|
*/
|
||||||
|
$('#visit_id').selectize({
|
||||||
|
valueField: 'id',
|
||||||
|
labelField: 'name',
|
||||||
|
searchField: 'name',
|
||||||
|
options: [],
|
||||||
|
create: false,
|
||||||
|
|
||||||
|
load: function(query, callback) {
|
||||||
|
console.log('Desperately seeking ' + query);
|
||||||
|
if (query === null || !query.length) return callback();
|
||||||
|
$.ajax({
|
||||||
|
url: '/json/auto/search-strings-electors?name=' + query,
|
||||||
|
type: 'GET',
|
||||||
|
dataType: 'jsonp',
|
||||||
|
error: function() {
|
||||||
|
console.log( 'Query ' + query + ' failed.');
|
||||||
|
callback();
|
||||||
|
},
|
||||||
|
success: function(res) {
|
||||||
|
console.log('Received ' + res + ' records for ' + query);
|
||||||
|
callback(res);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File form-genders-Gender.html generated 2018-07-09T20:55:34.505Z by adl.to-selmer-templates.
|
<!-- File form-genders-Gender.html generated 2018-07-10T15:25:24.191Z 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).-->
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File form-intentions-Intention.html generated 2018-07-09T20:55:34.543Z by adl.to-selmer-templates.
|
<!-- File form-intentions-Intention.html generated 2018-07-10T15:25:24.214Z 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 %}
|
{% block extra-head %}
|
||||||
|
|
||||||
|
{% script "/js/lib/node_modules/selectize/dist/js/standalone/selectize.min.js" %}
|
||||||
|
{% style "/js/lib/node_modules/selectize/dist/css/selectize.css" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id='content' class='edit'>
|
<div id='content' class='edit'>
|
||||||
|
@ -15,14 +17,10 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
|
||||||
Visit_id
|
Visit_id
|
||||||
</label>
|
</label>
|
||||||
{% if {{record.visit_id}} %}
|
{% if {{record.visit_id}} %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof %}
|
||||||
<span class='select-box' farside='visits' found='true'>
|
|
||||||
<input name='visit_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-visits?address_id=" + visit_id_search_box.text + "&date=" + visit_id_search_box.text, null, function (data) {updateMenuOptions("visit_id", "id", ["address_id", "date"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='visit_id' name='visit_id'>
|
<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 option in visit_id %}<option value='{{option.id}}' {% ifequal record.visit_id option.id%}selected{% endifequal %}>{{option.address_id}} {{option.date}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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,14 +33,10 @@ You are not permitted to view visit_id of intentions
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof %}
|
||||||
<span class='select-box' farside='visits' found='true'>
|
|
||||||
<input name='visit_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-visits?address_id=" + visit_id_search_box.text + "&date=" + visit_id_search_box.text, null, function (data) {updateMenuOptions("visit_id", "id", ["address_id", "date"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='visit_id' name='visit_id'>
|
<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 option in visit_id %}<option value='{{option.id}}' {% ifequal record.visit_id option.id%}selected{% endifequal %}>{{option.address_id}} {{option.date}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -61,14 +55,10 @@ You are not permitted to view visit_id of intentions
|
||||||
Elector_id
|
Elector_id
|
||||||
</label>
|
</label>
|
||||||
{% if {{record.elector_id}} %}
|
{% if {{record.elector_id}} %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof %}
|
||||||
<span class='select-box' farside='electors' found='true'>
|
|
||||||
<input name='elector_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-electors?gender=" + elector_id_search_box.text + "&email=" + elector_id_search_box.text + "&name=" + elector_id_search_box.text + "&phone=" + elector_id_search_box.text, null, function (data) {updateMenuOptions("elector_id", "id", ["gender", "email", "name", "phone"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='elector_id' name='elector_id'>
|
<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 option in elector_id %}<option value='{{option.id}}' {% ifequal record.elector_id option.id%}selected{% endifequal %}>{{option.name}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -81,14 +71,10 @@ You are not permitted to view elector_id of intentions
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof %}
|
||||||
<span class='select-box' farside='electors' found='true'>
|
|
||||||
<input name='elector_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-electors?gender=" + elector_id_search_box.text + "&email=" + elector_id_search_box.text + "&name=" + elector_id_search_box.text + "&phone=" + elector_id_search_box.text, null, function (data) {updateMenuOptions("elector_id", "id", ["gender", "email", "name", "phone"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='elector_id' name='elector_id'>
|
<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 option in elector_id %}<option value='{{option.id}}' {% ifequal record.elector_id option.id%}selected{% endifequal %}>{{option.name}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -107,12 +93,10 @@ You are not permitted to view elector_id of intentions
|
||||||
Option_id
|
Option_id
|
||||||
</label>
|
</label>
|
||||||
{% if {{record.option_id}} %}
|
{% if {{record.option_id}} %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof %}
|
||||||
<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 option in option_id %}<option value='{{option.id}}' {% ifequal record.option_id option.id%}selected{% endifequal %}>{{option.id}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -125,12 +109,10 @@ You are not permitted to view option_id of intentions
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof %}
|
||||||
<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 option in option_id %}<option value='{{option.id}}' {% ifequal record.option_id option.id%}selected{% endifequal %}>{{option.id}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -149,7 +131,7 @@ You are not permitted to view option_id of intentions
|
||||||
Locality
|
Locality
|
||||||
</label>
|
</label>
|
||||||
{% if {{record.locality}} %}
|
{% if {{record.locality}} %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof %}
|
||||||
<input id='locality' name='locality' type='number' value='{{record.locality}}' maxlength='' size='16'/>
|
<input id='locality' name='locality' type='number' value='{{record.locality}}' maxlength='' size='16'/>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof canvassers analysts admin %}
|
{% ifmemberof canvassers analysts admin %}
|
||||||
|
@ -163,7 +145,7 @@ You are not permitted to view locality of intentions
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof %}
|
||||||
<input id='locality' name='locality' type='number' value='{{record.locality}}' maxlength='' size='16'/>
|
<input id='locality' name='locality' type='number' value='{{record.locality}}' maxlength='' size='16'/>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof canvassers analysts admin %}
|
{% ifmemberof canvassers analysts admin %}
|
||||||
|
@ -178,7 +160,7 @@ You are not permitted to view locality of intentions
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof %}
|
||||||
<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
|
||||||
|
@ -186,7 +168,7 @@ To save this intentions record
|
||||||
<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 %}
|
{% endifmemberof %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof %}
|
||||||
<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
|
||||||
|
@ -201,19 +183,62 @@ To delete this intentions record
|
||||||
{% block extra-tail %}
|
{% block extra-tail %}
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
/**
|
/**
|
||||||
* update the select menu with id `wid` from this `data` whose fields include
|
* selectize one select widget. Substitute the actual id of the widget for `visit_id`.
|
||||||
* this `entity_key` and these `fields`
|
|
||||||
*/
|
*/
|
||||||
function updateMenuOptions(wid, entity_key, fields, data){
|
$('#visit_id').selectize({
|
||||||
$('#' + wid).children().filter(function(){
|
valueField: 'id',
|
||||||
return $(this).attr('selected') === undefined;
|
labelField: 'name',
|
||||||
}).remove().end();
|
searchField: 'name',
|
||||||
|
options: [],
|
||||||
|
create: false,
|
||||||
|
|
||||||
$.each(data, function(key, entry){
|
load: function(query, callback) {
|
||||||
$('#' + wid).append(
|
console.log('Desperately seeking ' + query);
|
||||||
$('<option></option>').attr('value', key).text(entry));
|
if (query === null || !query.length) return callback();
|
||||||
|
$.ajax({
|
||||||
|
url: '/json/auto/search-strings-electors?name=' + query,
|
||||||
|
type: 'GET',
|
||||||
|
dataType: 'jsonp',
|
||||||
|
error: function() {
|
||||||
|
console.log( 'Query ' + query + ' failed.');
|
||||||
|
callback();
|
||||||
|
},
|
||||||
|
success: function(res) {
|
||||||
|
console.log('Received ' + res + ' records for ' + query);
|
||||||
|
callback(res);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* selectize one select widget. Substitute the actual id of the widget for `elector_id`.
|
||||||
|
*/
|
||||||
|
$('#elector_id').selectize({
|
||||||
|
valueField: 'id',
|
||||||
|
labelField: 'name',
|
||||||
|
searchField: 'name',
|
||||||
|
options: [],
|
||||||
|
create: false,
|
||||||
|
|
||||||
|
load: function(query, callback) {
|
||||||
|
console.log('Desperately seeking ' + query);
|
||||||
|
if (query === null || !query.length) return callback();
|
||||||
|
$.ajax({
|
||||||
|
url: '/json/auto/search-strings-electors?name=' + query,
|
||||||
|
type: 'GET',
|
||||||
|
dataType: 'jsonp',
|
||||||
|
error: function() {
|
||||||
|
console.log( 'Query ' + query + ' failed.');
|
||||||
|
callback();
|
||||||
|
},
|
||||||
|
success: function(res) {
|
||||||
|
console.log('Received ' + res + ' records for ' + query);
|
||||||
|
callback(res);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File form-issues-Issue.html generated 2018-07-09T20:55:34.521Z by adl.to-selmer-templates.
|
<!-- File form-issues-Issue.html generated 2018-07-10T15:25:24.198Z 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 %}
|
{% block extra-head %}
|
||||||
|
|
||||||
{% script "js/lib/node_modules/simplemde/dist/simplemde.min.js" %}
|
{% script "js/lib/node_modules/simplemde/dist/simplemde.min.js" %}
|
||||||
{% style "js/lib/node_modules/simplemde/dist/simplemde.min.css" %}
|
{% style "js/lib/node_modules/simplemde/dist/simplemde.min.css" %}
|
||||||
|
{% script "/js/lib/node_modules/selectize/dist/js/standalone/selectize.min.js" %}
|
||||||
|
{% style "/js/lib/node_modules/selectize/dist/css/selectize.css" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id='content' class='edit'>
|
<div id='content' class='edit'>
|
||||||
|
@ -173,21 +176,6 @@ To delete this issues record
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block extra-tail %}
|
{% block extra-tail %}
|
||||||
<script type='text/javascript'>
|
<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({
|
var simplemde = new SimpleMDE({
|
||||||
autosave: {
|
autosave: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File form-options-Option.html generated 2018-07-09T20:55:34.542Z by adl.to-selmer-templates.
|
<!-- File form-options-Option.html generated 2018-07-10T15:25:24.214Z 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).-->
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File form-roles-Role.html generated 2018-07-09T20:55:34.522Z by adl.to-selmer-templates.
|
<!-- File form-roles-Role.html generated 2018-07-10T15:25:24.199Z 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 %}
|
{% block extra-head %}
|
||||||
|
|
||||||
|
{% script "/js/lib/node_modules/selectize/dist/js/standalone/selectize.min.js" %}
|
||||||
|
{% style "/js/lib/node_modules/selectize/dist/css/selectize.css" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id='content' class='edit'>
|
<div id='content' class='edit'>
|
||||||
|
@ -51,13 +53,9 @@ Members
|
||||||
</label>
|
</label>
|
||||||
{% if {{record.members}} %}
|
{% if {{record.members}} %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof admin %}
|
||||||
<span class='select-box' farside='canvassers' found='true'>
|
|
||||||
<input name='members_search_box' onchange='$.getJSON("/auto/json/seach-strings-canvassers?=" + members_search_box.text, null, function (data) {updateMenuOptions("members", "", [""], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='members' name='members' multiple='multiple'>
|
<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 option in members %}<option value='{{option.id}}' {% ifequal record.members option.id%}selected{% endifequal %}>{{option.username}} {{option.fullname}} {{option.address_id}} {{option.phone}} {{option.email}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -71,13 +69,9 @@ You are not permitted to view members of roles
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof admin %}
|
||||||
<span class='select-box' farside='canvassers' found='true'>
|
|
||||||
<input name='members_search_box' onchange='$.getJSON("/auto/json/seach-strings-canvassers?=" + members_search_box.text, null, function (data) {updateMenuOptions("members", "", [""], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='members' name='members' multiple='multiple'>
|
<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 option in members %}<option value='{{option.id}}' {% ifequal record.members option.id%}selected{% endifequal %}>{{option.username}} {{option.fullname}} {{option.address_id}} {{option.phone}} {{option.email}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</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'>
|
||||||
|
@ -113,21 +107,6 @@ To delete this roles record
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block extra-tail %}
|
{% block extra-tail %}
|
||||||
<script type='text/javascript'>
|
<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>
|
</script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File form-teams-Team.html generated 2018-07-09T20:55:34.527Z by adl.to-selmer-templates.
|
<!-- File form-teams-Team.html generated 2018-07-10T15:25:24.204Z 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 %}
|
{% block extra-head %}
|
||||||
|
|
||||||
|
{% script "/js/lib/node_modules/selectize/dist/js/standalone/selectize.min.js" %}
|
||||||
|
{% style "/js/lib/node_modules/selectize/dist/css/selectize.css" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id='content' class='edit'>
|
<div id='content' class='edit'>
|
||||||
|
@ -51,13 +53,9 @@ District_id
|
||||||
</label>
|
</label>
|
||||||
{% if {{record.district_id}} %}
|
{% if {{record.district_id}} %}
|
||||||
{% ifmemberof teamorganisers admin teamorganisers admin %}
|
{% ifmemberof teamorganisers admin teamorganisers admin %}
|
||||||
<span class='select-box' farside='districts' found='true'>
|
|
||||||
<input name='district_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-districts?name=" + district_id_search_box.text, null, function (data) {updateMenuOptions("district_id", "id", ["name"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='district_id' name='district_id'>
|
<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 option in district_id %}<option value='{{option.id}}' {% ifequal record.district_id option.id%}selected{% endifequal %}>{{option.name}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</span>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers 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'>
|
||||||
|
@ -71,13 +69,9 @@ You are not permitted to view district_id of teams
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof teamorganisers admin teamorganisers admin %}
|
{% ifmemberof teamorganisers admin teamorganisers admin %}
|
||||||
<span class='select-box' farside='districts' found='true'>
|
|
||||||
<input name='district_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-districts?name=" + district_id_search_box.text, null, function (data) {updateMenuOptions("district_id", "id", ["name"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='district_id' name='district_id'>
|
<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 option in district_id %}<option value='{{option.id}}' {% ifequal record.district_id option.id%}selected{% endifequal %}>{{option.name}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</span>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers 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'>
|
||||||
|
@ -131,13 +125,9 @@ Members
|
||||||
</label>
|
</label>
|
||||||
{% if {{record.members}} %}
|
{% if {{record.members}} %}
|
||||||
{% ifmemberof teamorganisers admin teamorganisers admin %}
|
{% ifmemberof teamorganisers admin teamorganisers admin %}
|
||||||
<span class='select-box' farside='canvassers' found='true'>
|
|
||||||
<input name='members_search_box' onchange='$.getJSON("/auto/json/seach-strings-canvassers?=" + members_search_box.text, null, function (data) {updateMenuOptions("members", "", [""], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='members' name='members' multiple='multiple'>
|
<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 option in members %}<option value='{{option.id}}' {% ifequal record.members option.id%}selected{% endifequal %}>{{option.username}} {{option.fullname}} {{option.address_id}} {{option.phone}} {{option.email}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</span>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers 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'>
|
||||||
|
@ -151,13 +141,9 @@ You are not permitted to view members of teams
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof teamorganisers admin teamorganisers admin %}
|
{% ifmemberof teamorganisers admin teamorganisers admin %}
|
||||||
<span class='select-box' farside='canvassers' found='true'>
|
|
||||||
<input name='members_search_box' onchange='$.getJSON("/auto/json/seach-strings-canvassers?=" + members_search_box.text, null, function (data) {updateMenuOptions("members", "", [""], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='members' name='members' multiple='multiple'>
|
<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 option in members %}<option value='{{option.id}}' {% ifequal record.members option.id%}selected{% endifequal %}>{{option.username}} {{option.fullname}} {{option.address_id}} {{option.phone}} {{option.email}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</span>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers 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'>
|
||||||
|
@ -177,13 +163,9 @@ Organisers
|
||||||
</label>
|
</label>
|
||||||
{% if {{record.organisers}} %}
|
{% if {{record.organisers}} %}
|
||||||
{% ifmemberof teamorganisers admin teamorganisers admin %}
|
{% ifmemberof teamorganisers admin teamorganisers admin %}
|
||||||
<span class='select-box' farside='canvassers' found='true'>
|
|
||||||
<input name='organisers_search_box' onchange='$.getJSON("/auto/json/seach-strings-canvassers?=" + organisers_search_box.text, null, function (data) {updateMenuOptions("organisers", "", [""], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='organisers' name='organisers' multiple='multiple'>
|
<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 option in organisers %}<option value='{{option.id}}' {% ifequal record.organisers option.id%}selected{% endifequal %}>{{option.username}} {{option.fullname}} {{option.address_id}} {{option.phone}} {{option.email}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</span>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers 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'>
|
||||||
|
@ -197,13 +179,9 @@ You are not permitted to view organisers of teams
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof teamorganisers admin teamorganisers admin %}
|
{% ifmemberof teamorganisers admin teamorganisers admin %}
|
||||||
<span class='select-box' farside='canvassers' found='true'>
|
|
||||||
<input name='organisers_search_box' onchange='$.getJSON("/auto/json/seach-strings-canvassers?=" + organisers_search_box.text, null, function (data) {updateMenuOptions("organisers", "", [""], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='organisers' name='organisers' multiple='multiple'>
|
<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 option in organisers %}<option value='{{option.id}}' {% ifequal record.organisers option.id%}selected{% endifequal %}>{{option.username}} {{option.fullname}} {{option.address_id}} {{option.phone}} {{option.email}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</span>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers 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'>
|
||||||
|
@ -268,25 +246,137 @@ To delete this teams record
|
||||||
</p>
|
</p>
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
</form>
|
</form>
|
||||||
|
<div class='auxlist'>
|
||||||
|
<h2>
|
||||||
|
Organisers
|
||||||
|
</h2>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
Id
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
Fullname
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
Email
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
Phone
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for record in organisers %}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{{ record.id }}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ record.fullname }}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ record.email }}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ record.phone }}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href='{{servlet-context}}/form-canvassers-Canvasser?id={{ record.id }}'>
|
||||||
|
View
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class='auxlist'>
|
||||||
|
<h2>
|
||||||
|
Members
|
||||||
|
</h2>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
Id
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
Fullname
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
Email
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
Phone
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for record in members %}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{{ record.id }}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ record.fullname }}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ record.email }}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ record.phone }}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a href='{{servlet-context}}/form-canvassers-Canvasser?id={{ record.id }}'>
|
||||||
|
View
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block extra-tail %}
|
{% block extra-tail %}
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
/**
|
/**
|
||||||
* update the select menu with id `wid` from this `data` whose fields include
|
* selectize one select widget. Substitute the actual id of the widget for `district_id`.
|
||||||
* this `entity_key` and these `fields`
|
|
||||||
*/
|
*/
|
||||||
function updateMenuOptions(wid, entity_key, fields, data){
|
$('#district_id').selectize({
|
||||||
$('#' + wid).children().filter(function(){
|
valueField: 'id',
|
||||||
return $(this).attr('selected') === undefined;
|
labelField: 'name',
|
||||||
}).remove().end();
|
searchField: 'name',
|
||||||
|
options: [],
|
||||||
|
create: false,
|
||||||
|
|
||||||
$.each(data, function(key, entry){
|
load: function(query, callback) {
|
||||||
$('#' + wid).append(
|
console.log('Desperately seeking ' + query);
|
||||||
$('<option></option>').attr('value', key).text(entry));
|
if (query === null || !query.length) return callback();
|
||||||
|
$.ajax({
|
||||||
|
url: '/json/auto/search-strings-electors?name=' + query,
|
||||||
|
type: 'GET',
|
||||||
|
dataType: 'jsonp',
|
||||||
|
error: function() {
|
||||||
|
console.log( 'Query ' + query + ' failed.');
|
||||||
|
callback();
|
||||||
|
},
|
||||||
|
success: function(res) {
|
||||||
|
console.log('Received ' + res + ' records for ' + query);
|
||||||
|
callback(res);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File form-visits-Visit.html generated 2018-07-09T20:55:34.524Z by adl.to-selmer-templates.
|
<!-- File form-visits-Visit.html generated 2018-07-10T15:25:24.201Z 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 %}
|
{% block extra-head %}
|
||||||
|
|
||||||
|
{% script "/js/lib/node_modules/selectize/dist/js/standalone/selectize.min.js" %}
|
||||||
|
{% style "/js/lib/node_modules/selectize/dist/css/selectize.css" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id='content' class='edit'>
|
<div id='content' class='edit'>
|
||||||
|
@ -18,7 +20,7 @@ Id
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof admin %}
|
||||||
<input id='id' name='id' type='number' value='{{record.id}}' maxlength='' size='16'/>
|
<input id='id' name='id' type='number' value='{{record.id}}' maxlength='' size='16'/>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers %}
|
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers 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>
|
||||||
|
@ -32,7 +34,7 @@ You are not permitted to view id of visits
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof admin %}
|
||||||
<input id='id' name='id' type='number' value='{{record.id}}' maxlength='' size='16'/>
|
<input id='id' name='id' type='number' value='{{record.id}}' maxlength='' size='16'/>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers %}
|
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers 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>
|
||||||
|
@ -50,15 +52,11 @@ Address_id
|
||||||
</label>
|
</label>
|
||||||
{% if {{record.address_id}} %}
|
{% if {{record.address_id}} %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof admin %}
|
||||||
<span class='select-box' farside='addresses' found='true'>
|
|
||||||
<input name='address_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-addresses?postcode=" + address_id_search_box.text + "&address=" + address_id_search_box.text, null, function (data) {updateMenuOptions("address_id", "id", ["postcode", "address"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='address_id' name='address_id'>
|
<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 option in address_id %}<option value='{{option.id}}' {% ifequal record.address_id option.id%}selected{% endifequal %}>{{option.address}} {{option.postcode}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</span>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers %}
|
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers admin %}
|
||||||
<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>
|
||||||
|
@ -70,15 +68,11 @@ You are not permitted to view address_id of visits
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof admin %}
|
||||||
<span class='select-box' farside='addresses' found='true'>
|
|
||||||
<input name='address_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-addresses?postcode=" + address_id_search_box.text + "&address=" + address_id_search_box.text, null, function (data) {updateMenuOptions("address_id", "id", ["postcode", "address"], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='address_id' name='address_id'>
|
<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 option in address_id %}<option value='{{option.id}}' {% ifequal record.address_id option.id%}selected{% endifequal %}>{{option.address}} {{option.postcode}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</span>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers %}
|
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers admin %}
|
||||||
<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>
|
||||||
|
@ -96,15 +90,11 @@ Canvasser_id
|
||||||
</label>
|
</label>
|
||||||
{% if {{record.canvasser_id}} %}
|
{% if {{record.canvasser_id}} %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof admin %}
|
||||||
<span class='select-box' farside='canvassers' found='true'>
|
|
||||||
<input name='canvasser_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-canvassers?=" + canvasser_id_search_box.text, null, function (data) {updateMenuOptions("canvasser_id", "", [""], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='canvasser_id' name='canvasser_id'>
|
<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 option in canvasser_id %}<option value='{{option.id}}' {% ifequal record.canvasser_id option.id%}selected{% endifequal %}>{{option.username}} {{option.fullname}} {{option.address_id}} {{option.phone}} {{option.email}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</span>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers %}
|
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers admin %}
|
||||||
<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>
|
||||||
|
@ -116,15 +106,11 @@ You are not permitted to view canvasser_id of visits
|
||||||
{% endifmemberof %}
|
{% endifmemberof %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof admin %}
|
||||||
<span class='select-box' farside='canvassers' found='true'>
|
|
||||||
<input name='canvasser_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-canvassers?=" + canvasser_id_search_box.text, null, function (data) {updateMenuOptions("canvasser_id", "", [""], data);})'/>
|
|
||||||
<br/>
|
|
||||||
<select id='canvasser_id' name='canvasser_id'>
|
<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 option in canvasser_id %}<option value='{{option.id}}' {% ifequal record.canvasser_id option.id%}selected{% endifequal %}>{{option.username}} {{option.fullname}} {{option.address_id}} {{option.phone}} {{option.email}}</option>{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</span>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers %}
|
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers admin %}
|
||||||
<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>
|
||||||
|
@ -144,7 +130,7 @@ Date
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof admin %}
|
||||||
<input id='date' name='date' type='string' 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 %}
|
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers admin %}
|
||||||
<span id='date' name='date' class='pseudo-widget disabled'>
|
<span id='date' name='date' class='pseudo-widget disabled'>
|
||||||
{{record.date}}
|
{{record.date}}
|
||||||
</span>
|
</span>
|
||||||
|
@ -158,7 +144,7 @@ You are not permitted to view date of visits
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof admin %}
|
||||||
<input id='date' name='date' type='string' 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 %}
|
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers admin %}
|
||||||
<span id='date' name='date' class='pseudo-widget disabled'>
|
<span id='date' name='date' class='pseudo-widget disabled'>
|
||||||
{{record.date}}
|
{{record.date}}
|
||||||
</span>
|
</span>
|
||||||
|
@ -193,19 +179,62 @@ To delete this visits record
|
||||||
{% block extra-tail %}
|
{% block extra-tail %}
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
/**
|
/**
|
||||||
* update the select menu with id `wid` from this `data` whose fields include
|
* selectize one select widget. Substitute the actual id of the widget for `address_id`.
|
||||||
* this `entity_key` and these `fields`
|
|
||||||
*/
|
*/
|
||||||
function updateMenuOptions(wid, entity_key, fields, data){
|
$('#address_id').selectize({
|
||||||
$('#' + wid).children().filter(function(){
|
valueField: 'id',
|
||||||
return $(this).attr('selected') === undefined;
|
labelField: 'name',
|
||||||
}).remove().end();
|
searchField: 'name',
|
||||||
|
options: [],
|
||||||
|
create: false,
|
||||||
|
|
||||||
$.each(data, function(key, entry){
|
load: function(query, callback) {
|
||||||
$('#' + wid).append(
|
console.log('Desperately seeking ' + query);
|
||||||
$('<option></option>').attr('value', key).text(entry));
|
if (query === null || !query.length) return callback();
|
||||||
|
$.ajax({
|
||||||
|
url: '/json/auto/search-strings-electors?name=' + query,
|
||||||
|
type: 'GET',
|
||||||
|
dataType: 'jsonp',
|
||||||
|
error: function() {
|
||||||
|
console.log( 'Query ' + query + ' failed.');
|
||||||
|
callback();
|
||||||
|
},
|
||||||
|
success: function(res) {
|
||||||
|
console.log('Received ' + res + ' records for ' + query);
|
||||||
|
callback(res);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* selectize one select widget. Substitute the actual id of the widget for `canvasser_id`.
|
||||||
|
*/
|
||||||
|
$('#canvasser_id').selectize({
|
||||||
|
valueField: 'id',
|
||||||
|
labelField: 'name',
|
||||||
|
searchField: 'name',
|
||||||
|
options: [],
|
||||||
|
create: false,
|
||||||
|
|
||||||
|
load: function(query, callback) {
|
||||||
|
console.log('Desperately seeking ' + query);
|
||||||
|
if (query === null || !query.length) return callback();
|
||||||
|
$.ajax({
|
||||||
|
url: '/json/auto/search-strings-electors?name=' + query,
|
||||||
|
type: 'GET',
|
||||||
|
dataType: 'jsonp',
|
||||||
|
error: function() {
|
||||||
|
console.log( 'Query ' + query + ' failed.');
|
||||||
|
callback();
|
||||||
|
},
|
||||||
|
success: function(res) {
|
||||||
|
console.log('Received ' + res + ' records for ' + query);
|
||||||
|
callback(res);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File list-addresses-Addresses.html generated 2018-07-09T20:55:34.533Z by adl.to-selmer-templates.
|
<!-- File list-addresses-Addresses.html generated 2018-07-10T15:25:24.208Z 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).-->
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File list-authorities-Authorities.html generated 2018-07-09T20:55:34.510Z by adl.to-selmer-templates.
|
<!-- File list-authorities-Authorities.html generated 2018-07-10T15:25:24.194Z 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).-->
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File list-canvassers-Canvassers.html generated 2018-07-09T20:55:34.545Z by adl.to-selmer-templates.
|
<!-- File list-canvassers-Canvassers.html generated 2018-07-10T15:25:24.216Z 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).-->
|
||||||
|
|
||||||
|
|
||||||
|
@ -54,18 +54,9 @@ Username
|
||||||
Fullname
|
Fullname
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
Elector_id
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
Address_id
|
Address_id
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
Phone
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
Email
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
Authority_id
|
Authority_id
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
|
@ -86,18 +77,9 @@ Authorised
|
||||||
<input id='fullname' type='text' name='fullname' value='{{ params.fullname }}'/>
|
<input id='fullname' type='text' name='fullname' value='{{ params.fullname }}'/>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<input id='elector_id_expanded' type='text' name='elector_id_expanded' value='{{ params.elector_id_expanded }}'/>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<input id='address_id_expanded' type='text' name='address_id_expanded' value='{{ params.address_id_expanded }}'/>
|
<input id='address_id_expanded' type='text' name='address_id_expanded' value='{{ params.address_id_expanded }}'/>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<input id='phone' type='text' name='phone' value='{{ params.phone }}'/>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<input id='email' type='text' name='email' value='{{ params.email }}'/>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<input id='authority_id_expanded' type='text' name='authority_id_expanded' value='{{ params.authority_id_expanded }}'/>
|
<input id='authority_id_expanded' type='text' name='authority_id_expanded' value='{{ params.authority_id_expanded }}'/>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
|
@ -121,22 +103,11 @@ Authorised
|
||||||
{{ record.fullname }}
|
{{ record.fullname }}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href='{{servlet-context}}/form-electors-Elector?id={{ record.elector_id }}'>
|
|
||||||
{{ record.elector_id_expanded }}
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href='{{servlet-context}}/form-addresses-Address?id={{ record.address_id }}'>
|
<a href='{{servlet-context}}/form-addresses-Address?id={{ record.address_id }}'>
|
||||||
{{ record.address_id_expanded }}
|
{{ record.address_id_expanded }}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{ record.phone }}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{{ record.email }}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a href='{{servlet-context}}/form-authorities-Authority?id={{ record.authority_id }}'>
|
<a href='{{servlet-context}}/form-authorities-Authority?id={{ record.authority_id }}'>
|
||||||
{{ record.authority_id_expanded }}
|
{{ record.authority_id_expanded }}
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File list-districts-Districts.html generated 2018-07-09T20:55:34.538Z by adl.to-selmer-templates.
|
<!-- File list-districts-Districts.html generated 2018-07-10T15:25:24.212Z 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).-->
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File list-dwellings-Dwellings.html generated 2018-07-09T20:55:34.531Z by adl.to-selmer-templates.
|
<!-- File list-dwellings-Dwellings.html generated 2018-07-10T15:25:24.206Z 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).-->
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File list-electors-Electors.html generated 2018-07-09T20:55:34.519Z by adl.to-selmer-templates.
|
<!-- File list-electors-Electors.html generated 2018-07-10T15:25:24.197Z 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).-->
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File list-events-Events.html generated 2018-07-09T20:55:34.539Z by adl.to-selmer-templates.
|
<!-- File list-events-Events.html generated 2018-07-10T15:25:24.212Z 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).-->
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File list-followupactions-Followupactions.html generated 2018-07-09T20:55:34.544Z by adl.to-selmer-templates.
|
<!-- File list-followupactions-Followupactions.html generated 2018-07-10T15:25:24.215Z 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).-->
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,9 +57,6 @@ Actor
|
||||||
Date
|
Date
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
Notes
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
Closed
|
Closed
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
|
@ -80,9 +77,6 @@ Closed
|
||||||
<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 id='notes' type='text' name='notes' value='{{ params.notes }}'/>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<input id='closed' type='text' name='closed' value='{{ params.closed }}'/>
|
<input id='closed' type='text' name='closed' value='{{ params.closed }}'/>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
|
@ -110,9 +104,6 @@ Closed
|
||||||
{{ record.date }}
|
{{ record.date }}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{ record.notes }}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{{ record.closed }}
|
{{ record.closed }}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File list-followupmethods-Followupmethods.html generated 2018-07-09T20:55:34.524Z by adl.to-selmer-templates.
|
<!-- File list-followupmethods-Followupmethods.html generated 2018-07-10T15:25:24.201Z 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).-->
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File list-followuprequests-Followuprequests.html generated 2018-07-09T20:55:34.506Z by adl.to-selmer-templates.
|
<!-- File list-followuprequests-Followuprequests.html generated 2018-07-10T15:25:24.192Z 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).-->
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ Previous
|
||||||
Next
|
Next
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof %}
|
||||||
<div class='big-link-container'>
|
<div class='big-link-container'>
|
||||||
<a href='{{servlet-context}}/form-followuprequests-Followuprequest' class='big-link'>
|
<a href='{{servlet-context}}/form-followuprequests-Followuprequest' class='big-link'>
|
||||||
Add a new Followuprequest
|
Add a new Followuprequest
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File list-genders-Genders.html generated 2018-07-09T20:55:34.500Z by adl.to-selmer-templates.
|
<!-- File list-genders-Genders.html generated 2018-07-10T15:25:24.188Z 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).-->
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File list-intentions-Intentions.html generated 2018-07-09T20:55:34.548Z by adl.to-selmer-templates.
|
<!-- File list-intentions-Intentions.html generated 2018-07-10T15:25:24.217Z 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).-->
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ Previous
|
||||||
Next
|
Next
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% ifmemberof admin %}
|
{% ifmemberof %}
|
||||||
<div class='big-link-container'>
|
<div class='big-link-container'>
|
||||||
<a href='{{servlet-context}}/form-intentions-Intention' class='big-link'>
|
<a href='{{servlet-context}}/form-intentions-Intention' class='big-link'>
|
||||||
Add a new Intention
|
Add a new Intention
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File list-issues-Issues.html generated 2018-07-09T20:55:34.541Z by adl.to-selmer-templates.
|
<!-- File list-issues-Issues.html generated 2018-07-10T15:25:24.213Z 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).-->
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File list-options-Options.html generated 2018-07-09T20:55:34.507Z by adl.to-selmer-templates.
|
<!-- File list-options-Options.html generated 2018-07-10T15:25:24.193Z 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).-->
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File list-roles-Roles.html generated 2018-07-09T20:55:34.523Z by adl.to-selmer-templates.
|
<!-- File list-roles-Roles.html generated 2018-07-10T15:25:24.200Z 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).-->
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File list-teams-Teams.html generated 2018-07-09T20:55:34.504Z by adl.to-selmer-templates.
|
<!-- File list-teams-Teams.html generated 2018-07-10T15:25:24.190Z 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).-->
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
<!-- File list-visits-Visits.html generated 2018-07-09T20:55:34.502Z by adl.to-selmer-templates.
|
<!-- File list-visits-Visits.html generated 2018-07-10T15:25:24.189Z 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).-->
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
<div>
|
<div>
|
||||||
<img height="16" width="16" alt="Clojure" src="{{servlet-context}}/img/credits/luminus-logo.png"/>Built with <a href="http://www.luminusweb.net/">LuminusWeb</a> ||
|
<img height="16" width="16" alt="Clojure" src="{{servlet-context}}/img/credits/luminus-logo.png"/>Built with <a href="http://www.luminusweb.net/">LuminusWeb</a> ||
|
||||||
<img height="16" width="16" alt="Clojure" src="{{servlet-context}}/img/credits/clojure-icon.gif"/> Powered by <a href="http://clojure.org">Clojure</a> ||
|
<img height="16" width="16" alt="Clojure" src="{{servlet-context}}/img/credits/clojure-icon.gif"/> Powered by <a href="http://clojure.org">Clojure</a> ||
|
||||||
<img height="16" width="16" alt="GitHub" src="{{servlet-context}}/img/credits/github-logo-transparent.png"/>Find me/fork me on <a href="https://github.com/simon-brooke/smeagol">Github</a> ||
|
<img height="16" width="16" alt="GitHub" src="{{servlet-context}}/img/credits/github-logo-transparent.png"/>Find me/fork me on <a href="https://github.com/simon-brooke/youyesyet">Github</a> ||
|
||||||
<img height="16" width="16" alt="Free Software Foundation" src="{{servlet-context}}/img/credits/gnu.small.png"/>Licensed under the <a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU General Public License version 2.0</a>
|
<img height="16" width="16" alt="Free Software Foundation" src="{{servlet-context}}/img/credits/gnu.small.png"/>Licensed under the <a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU General Public License version 2.0</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -63,9 +63,12 @@
|
||||||
(defn render
|
(defn render
|
||||||
"renders the HTML `template` located relative to resources/templates in
|
"renders the HTML `template` located relative to resources/templates in
|
||||||
the context of this session and with these parameters."
|
the context of this session and with these parameters."
|
||||||
|
;; TODO: I'm passing `session` through into render. The default luminus
|
||||||
|
;; setup doesn't do this, and Dmitri is an awful lot better at this stuff
|
||||||
|
;; than me so there's almost certainly a reason it doesn't.
|
||||||
[template session & [params]]
|
[template session & [params]]
|
||||||
(let [user (:user session)]
|
(let [user (:user session)]
|
||||||
(log/debug (str "layout/render: template: '" template "'; user: '" user "'."))
|
(log/debug (str "layout/render: template: '" template "'; user: '" (:username user)))
|
||||||
(content-type
|
(content-type
|
||||||
(ok
|
(ok
|
||||||
(parser/render-file
|
(parser/render-file
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
||||||
(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 20180709T205532.861Z"
|
"JSON routes for youyesyet auto-generated by [Application Description Language framework](https://github.com/simon-brooke/adl) at 20180710T152522.387Z"
|
||||||
(:require
|
(:require
|
||||||
[adl-support.core :as support]
|
[adl-support.core :as support]
|
||||||
[clojure.core.memoize :as memo]
|
[clojure.core.memoize :as memo]
|
||||||
|
|
|
@ -82,16 +82,14 @@ version="0.1.1">
|
||||||
column="dwelling_id" entity="dwellings" farkey="id">
|
column="dwelling_id" entity="dwellings" farkey="id">
|
||||||
<prompt prompt="Home" locale="en-GB"/>
|
<prompt prompt="Home" locale="en-GB"/>
|
||||||
</property>
|
</property>
|
||||||
<property size="16" type="string" name="phone" column="phone"
|
<property size="16" type="string" name="phone" column="phone">
|
||||||
distinct="user">
|
|
||||||
<prompt prompt="Phone" locale="en-GB"/>
|
<prompt prompt="Phone" locale="en-GB"/>
|
||||||
</property>
|
</property>
|
||||||
<property size="128" type="string" name="email" column="email"
|
<property size="128" type="string" name="email" column="email">
|
||||||
distinct="user">
|
|
||||||
<prompt prompt="Email" locale="en-GB"/>
|
<prompt prompt="Email" locale="en-GB"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="gender" type="entity" column="gender"
|
<property name="gender" type="entity" column="gender"
|
||||||
entity="genders" farkey="id" default="Unknown" distinct="user">
|
entity="genders" farkey="id" default="Unknown">
|
||||||
<prompt prompt="Gender" locale="en-GB"/>
|
<prompt prompt="Gender" locale="en-GB"/>
|
||||||
</property>
|
</property>
|
||||||
<list properties="listed" name="Electors">
|
<list properties="listed" name="Electors">
|
||||||
|
@ -170,9 +168,7 @@ version="0.1.1">
|
||||||
<permission group="issueeditors" permission="read"/>
|
<permission group="issueeditors" permission="read"/>
|
||||||
<permission group="admin" permission="all"/>
|
<permission group="admin" permission="all"/>
|
||||||
</entity>
|
</entity>
|
||||||
<!--
|
|
||||||
entity dwellings already has a key - not generating one
|
|
||||||
-->
|
|
||||||
<entity table="dwellings" name="dwellings" magnitude="6"
|
<entity table="dwellings" name="dwellings" magnitude="6"
|
||||||
volatility="6">
|
volatility="6">
|
||||||
<documentation>All dwellings within addresses in the system; a
|
<documentation>All dwellings within addresses in the system; a
|
||||||
|
@ -229,9 +225,7 @@ version="0.1.1">
|
||||||
<permission group="issueeditors" permission="read"/>
|
<permission group="issueeditors" permission="read"/>
|
||||||
<permission group="admin" permission="all"/>
|
<permission group="admin" permission="all"/>
|
||||||
</entity>
|
</entity>
|
||||||
<!--
|
|
||||||
entity addresses already has a key - not generating one
|
|
||||||
-->
|
|
||||||
<entity table="addresses" name="addresses" magnitude="6"
|
<entity table="addresses" name="addresses" magnitude="6"
|
||||||
volatility="6">
|
volatility="6">
|
||||||
<documentation>Addresses of all buildings which contain
|
<documentation>Addresses of all buildings which contain
|
||||||
|
@ -263,6 +257,7 @@ version="0.1.1">
|
||||||
<property type="real" name="longitude" column="longitude">
|
<property type="real" name="longitude" column="longitude">
|
||||||
<prompt prompt="Longitude" locale="en-GB"/>
|
<prompt prompt="Longitude" locale="en-GB"/>
|
||||||
</property>
|
</property>
|
||||||
|
<!-- property name="dwellings" type="link" entity="dwelling"/ -->
|
||||||
<property type="integer" name="locality" column="locality">
|
<property type="integer" name="locality" column="locality">
|
||||||
<documentation>Locality indexing; see issue #44. Note that
|
<documentation>Locality indexing; see issue #44. Note that
|
||||||
this property should be generated automatically from the
|
this property should be generated automatically from the
|
||||||
|
@ -320,6 +315,9 @@ version="0.1.1">
|
||||||
<field property="longitude">
|
<field property="longitude">
|
||||||
<prompt prompt="Longitude" locale="en-GB"/>
|
<prompt prompt="Longitude" locale="en-GB"/>
|
||||||
</field>
|
</field>
|
||||||
|
<auxlist property="dwellings">
|
||||||
|
<field name="sub-address"/>
|
||||||
|
</auxlist>
|
||||||
</form>
|
</form>
|
||||||
<permission group="canvassers" permission="read"/>
|
<permission group="canvassers" permission="read"/>
|
||||||
<permission group="teamorganisers" permission="read"/>
|
<permission group="teamorganisers" permission="read"/>
|
||||||
|
@ -341,6 +339,7 @@ version="0.1.1">
|
||||||
<prompt prompt="id" locale="en-GB"/>
|
<prompt prompt="id" locale="en-GB"/>
|
||||||
</property>
|
</property>
|
||||||
</key>
|
</key>
|
||||||
|
<!-- TODO: should visit be keyed against dwelling rather than address? -->
|
||||||
<property required="true" type="entity" name="address_id"
|
<property required="true" type="entity" name="address_id"
|
||||||
column="address_id" entity="addresses" farkey="id"
|
column="address_id" entity="addresses" farkey="id"
|
||||||
distinct="user">
|
distinct="user">
|
||||||
|
@ -362,7 +361,7 @@ version="0.1.1">
|
||||||
<permission group="issueexperts" permission="read"/>
|
<permission group="issueexperts" permission="read"/>
|
||||||
<permission group="analysts" permission="read"/>
|
<permission group="analysts" permission="read"/>
|
||||||
<permission group="issueeditors" permission="read"/>
|
<permission group="issueeditors" permission="read"/>
|
||||||
<permission group="admin" permission="all"/>
|
<permission group="admin" permission="noedit"/>
|
||||||
<list properties="listed" name="Visits">
|
<list properties="listed" name="Visits">
|
||||||
<field property="id">
|
<field property="id">
|
||||||
<prompt prompt="id" locale="en-GB"/>
|
<prompt prompt="id" locale="en-GB"/>
|
||||||
|
@ -542,7 +541,7 @@ version="0.1.1">
|
||||||
<permission group="issueexperts" permission="none"/>
|
<permission group="issueexperts" permission="none"/>
|
||||||
<permission group="analysts" permission="read"/>
|
<permission group="analysts" permission="read"/>
|
||||||
<permission group="issueeditors" permission="none"/>
|
<permission group="issueeditors" permission="none"/>
|
||||||
<permission group="admin" permission="all"/>
|
<permission group="admin" permission="noedit"/>
|
||||||
<list properties="listed" name="Intentions">
|
<list properties="listed" name="Intentions">
|
||||||
<field property="visit_id">
|
<field property="visit_id">
|
||||||
<prompt prompt="visit_id" locale="en-GB"/>
|
<prompt prompt="visit_id" locale="en-GB"/>
|
||||||
|
@ -608,12 +607,12 @@ version="0.1.1">
|
||||||
</property>
|
</property>
|
||||||
<property type="entity" name="elector_id" column="elector_id"
|
<property type="entity" name="elector_id" column="elector_id"
|
||||||
entity="electors" farkey="id">
|
entity="electors" farkey="id">
|
||||||
<prompt prompt="elector_id" locale="en-GB"/>
|
<prompt prompt="Electoral roll entry" locale="en-GB"/>
|
||||||
</property>
|
</property>
|
||||||
<property required="true" type="entity" name="address_id"
|
<property required="true" type="entity" name="address_id"
|
||||||
column="address_id" entity="addresses" farkey="id"
|
column="address_id" entity="addresses" farkey="id"
|
||||||
distinct="user">
|
distinct="user">
|
||||||
<prompt prompt="address_id" locale="en-GB"/>
|
<prompt prompt="address" locale="en-GB"/>
|
||||||
</property>
|
</property>
|
||||||
<property type="string" name="phone" column="phone" size="16"
|
<property type="string" name="phone" column="phone" size="16"
|
||||||
distinct="user">
|
distinct="user">
|
||||||
|
@ -658,17 +657,8 @@ version="0.1.1">
|
||||||
<field property="fullname">
|
<field property="fullname">
|
||||||
<prompt prompt="fullname" locale="en-GB"/>
|
<prompt prompt="fullname" locale="en-GB"/>
|
||||||
</field>
|
</field>
|
||||||
<field property="elector_id">
|
|
||||||
<prompt prompt="elector_id" locale="en-GB"/>
|
|
||||||
</field>
|
|
||||||
<field property="address_id">
|
<field property="address_id">
|
||||||
<prompt prompt="address_id" locale="en-GB"/>
|
<prompt prompt="address" locale="en-GB"/>
|
||||||
</field>
|
|
||||||
<field property="phone">
|
|
||||||
<prompt prompt="phone" locale="en-GB"/>
|
|
||||||
</field>
|
|
||||||
<field property="email">
|
|
||||||
<prompt prompt="email" locale="en-GB"/>
|
|
||||||
</field>
|
</field>
|
||||||
<field property="authority_id">
|
<field property="authority_id">
|
||||||
<prompt prompt="authority_id" locale="en-GB"/>
|
<prompt prompt="authority_id" locale="en-GB"/>
|
||||||
|
@ -687,11 +677,13 @@ version="0.1.1">
|
||||||
<field property="fullname">
|
<field property="fullname">
|
||||||
<prompt prompt="fullname" locale="en-GB"/>
|
<prompt prompt="fullname" locale="en-GB"/>
|
||||||
</field>
|
</field>
|
||||||
|
<field property="avatar"/>
|
||||||
|
<field property="bio"/>
|
||||||
<field property="elector_id">
|
<field property="elector_id">
|
||||||
<prompt prompt="elector_id" locale="en-GB"/>
|
<prompt prompt="Electoral roll entry" locale="en-GB"/>
|
||||||
</field>
|
</field>
|
||||||
<field property="address_id">
|
<field property="address_id">
|
||||||
<prompt prompt="address_id" locale="en-GB"/>
|
<prompt prompt="address" locale="en-GB"/>
|
||||||
</field>
|
</field>
|
||||||
<field property="phone">
|
<field property="phone">
|
||||||
<prompt prompt="phone" locale="en-GB"/>
|
<prompt prompt="phone" locale="en-GB"/>
|
||||||
|
@ -786,7 +778,7 @@ version="0.1.1">
|
||||||
<permission group="issueexperts" permission="read"/>
|
<permission group="issueexperts" permission="read"/>
|
||||||
<permission group="analysts" permission="read"/>
|
<permission group="analysts" permission="read"/>
|
||||||
<permission group="issueeditors" permission="read"/>
|
<permission group="issueeditors" permission="read"/>
|
||||||
<permission group="admin" permission="all"/>
|
<permission group="admin" permission="noedit"/>
|
||||||
</entity>
|
</entity>
|
||||||
|
|
||||||
<entity table="roles" name="roles" magnitude="1" volatility="7">
|
<entity table="roles" name="roles" magnitude="1" volatility="7">
|
||||||
|
@ -913,7 +905,7 @@ version="0.1.1">
|
||||||
<prompt prompt="Organisers" locale="en-GB"/>
|
<prompt prompt="Organisers" locale="en-GB"/>
|
||||||
<field property="id">
|
<field property="id">
|
||||||
</field>
|
</field>
|
||||||
<field property="name">
|
<field property="fullname">
|
||||||
<prompt prompt="name" locale="en-GB"/>
|
<prompt prompt="name" locale="en-GB"/>
|
||||||
</field>
|
</field>
|
||||||
<field property="email">
|
<field property="email">
|
||||||
|
@ -927,7 +919,7 @@ version="0.1.1">
|
||||||
<prompt prompt="Members" locale="en-GB"/>
|
<prompt prompt="Members" locale="en-GB"/>
|
||||||
<field property="id">
|
<field property="id">
|
||||||
</field>
|
</field>
|
||||||
<field property="name">
|
<field property="fullname">
|
||||||
<prompt prompt="name" locale="en-GB"/>
|
<prompt prompt="name" locale="en-GB"/>
|
||||||
</field>
|
</field>
|
||||||
<field property="email">
|
<field property="email">
|
||||||
|
@ -1062,9 +1054,6 @@ version="0.1.1">
|
||||||
<field property="date">
|
<field property="date">
|
||||||
<prompt prompt="date" locale="en-GB"/>
|
<prompt prompt="date" locale="en-GB"/>
|
||||||
</field>
|
</field>
|
||||||
<field property="notes">
|
|
||||||
<prompt prompt="notes" locale="en-GB"/>
|
|
||||||
</field>
|
|
||||||
<field property="closed">
|
<field property="closed">
|
||||||
<prompt prompt="closed" locale="en-GB"/>
|
<prompt prompt="closed" locale="en-GB"/>
|
||||||
</field>
|
</field>
|
||||||
|
@ -1134,6 +1123,7 @@ version="0.1.1">
|
||||||
-->
|
-->
|
||||||
<entity table="followupmethods" name="followupmethods"
|
<entity table="followupmethods" name="followupmethods"
|
||||||
magnitude="1" volatility="7">
|
magnitude="1" volatility="7">
|
||||||
|
<documentation>Methods which may be used to follow up a followup request. Reference data.</documentation>
|
||||||
<key>
|
<key>
|
||||||
<property required="true" type="string" size="32" name="id"
|
<property required="true" type="string" size="32" name="id"
|
||||||
column="id" immutable="true" distinct="all">
|
column="id" immutable="true" distinct="all">
|
||||||
|
|
|
@ -87,13 +87,13 @@
|
||||||
<property required="true" type="entity" name="dwelling_id" column="dwelling_id" entity="dwellings" farkey="id">
|
<property required="true" type="entity" name="dwelling_id" column="dwelling_id" entity="dwellings" farkey="id">
|
||||||
<prompt prompt="Home" locale="en-GB"/>
|
<prompt prompt="Home" locale="en-GB"/>
|
||||||
</property>
|
</property>
|
||||||
<property size="16" type="string" name="phone" column="phone" distinct="user">
|
<property size="16" type="string" name="phone" column="phone">
|
||||||
<prompt prompt="Phone" locale="en-GB"/>
|
<prompt prompt="Phone" locale="en-GB"/>
|
||||||
</property>
|
</property>
|
||||||
<property size="128" type="string" name="email" column="email" distinct="user">
|
<property size="128" type="string" name="email" column="email">
|
||||||
<prompt prompt="Email" locale="en-GB"/>
|
<prompt prompt="Email" locale="en-GB"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="gender" type="entity" column="gender" entity="genders" farkey="id" default="Unknown" distinct="user">
|
<property name="gender" type="entity" column="gender" entity="genders" farkey="id" default="Unknown">
|
||||||
<prompt prompt="Gender" locale="en-GB"/>
|
<prompt prompt="Gender" locale="en-GB"/>
|
||||||
</property>
|
</property>
|
||||||
<list properties="listed" name="Electors">
|
<list properties="listed" name="Electors">
|
||||||
|
@ -254,6 +254,7 @@
|
||||||
<property type="real" name="longitude" column="longitude">
|
<property type="real" name="longitude" column="longitude">
|
||||||
<prompt prompt="Longitude" locale="en-GB"/>
|
<prompt prompt="Longitude" locale="en-GB"/>
|
||||||
</property>
|
</property>
|
||||||
|
<!-- property name="dwellings" type="link" entity="dwelling"/ -->
|
||||||
<property type="integer" name="locality" column="locality">
|
<property type="integer" name="locality" column="locality">
|
||||||
<documentation>Locality indexing; see issue #44. Note that
|
<documentation>Locality indexing; see issue #44. Note that
|
||||||
this property should be generated automatically from the
|
this property should be generated automatically from the
|
||||||
|
@ -311,6 +312,9 @@
|
||||||
<field property="longitude">
|
<field property="longitude">
|
||||||
<prompt prompt="Longitude" locale="en-GB"/>
|
<prompt prompt="Longitude" locale="en-GB"/>
|
||||||
</field>
|
</field>
|
||||||
|
<auxlist property="dwellings">
|
||||||
|
<field name="sub-address"/>
|
||||||
|
</auxlist>
|
||||||
</form>
|
</form>
|
||||||
<permission group="canvassers" permission="read"/>
|
<permission group="canvassers" permission="read"/>
|
||||||
<permission group="teamorganisers" permission="read"/>
|
<permission group="teamorganisers" permission="read"/>
|
||||||
|
@ -330,6 +334,7 @@
|
||||||
<prompt prompt="id" locale="en-GB"/>
|
<prompt prompt="id" locale="en-GB"/>
|
||||||
</property>
|
</property>
|
||||||
</key>
|
</key>
|
||||||
|
<!-- TODO: should visit be keyed against dwelling rather than address? -->
|
||||||
<property required="true" type="entity" name="address_id" column="address_id" entity="addresses" farkey="id" distinct="user">
|
<property required="true" type="entity" name="address_id" column="address_id" entity="addresses" farkey="id" distinct="user">
|
||||||
<prompt prompt="Address" locale="en-GB"/>
|
<prompt prompt="Address" locale="en-GB"/>
|
||||||
</property>
|
</property>
|
||||||
|
@ -347,7 +352,7 @@
|
||||||
<permission group="issueexperts" permission="read"/>
|
<permission group="issueexperts" permission="read"/>
|
||||||
<permission group="analysts" permission="read"/>
|
<permission group="analysts" permission="read"/>
|
||||||
<permission group="issueeditors" permission="read"/>
|
<permission group="issueeditors" permission="read"/>
|
||||||
<permission group="admin" permission="all"/>
|
<permission group="admin" permission="noedit"/>
|
||||||
<list properties="listed" name="Visits">
|
<list properties="listed" name="Visits">
|
||||||
<field property="id">
|
<field property="id">
|
||||||
<prompt prompt="id" locale="en-GB"/>
|
<prompt prompt="id" locale="en-GB"/>
|
||||||
|
@ -518,7 +523,7 @@
|
||||||
<permission group="issueexperts" permission="none"/>
|
<permission group="issueexperts" permission="none"/>
|
||||||
<permission group="analysts" permission="read"/>
|
<permission group="analysts" permission="read"/>
|
||||||
<permission group="issueeditors" permission="none"/>
|
<permission group="issueeditors" permission="none"/>
|
||||||
<permission group="admin" permission="all"/>
|
<permission group="admin" permission="noedit"/>
|
||||||
<list properties="listed" name="Intentions">
|
<list properties="listed" name="Intentions">
|
||||||
<field property="visit_id">
|
<field property="visit_id">
|
||||||
<prompt prompt="visit_id" locale="en-GB"/>
|
<prompt prompt="visit_id" locale="en-GB"/>
|
||||||
|
@ -581,10 +586,10 @@
|
||||||
<prompt prompt="Bio" locale="en-GB"/>
|
<prompt prompt="Bio" locale="en-GB"/>
|
||||||
</property>
|
</property>
|
||||||
<property type="entity" name="elector_id" column="elector_id" entity="electors" farkey="id">
|
<property type="entity" name="elector_id" column="elector_id" entity="electors" farkey="id">
|
||||||
<prompt prompt="elector_id" locale="en-GB"/>
|
<prompt prompt="Electoral roll entry" locale="en-GB"/>
|
||||||
</property>
|
</property>
|
||||||
<property required="true" type="entity" name="address_id" column="address_id" entity="addresses" farkey="id" distinct="user">
|
<property required="true" type="entity" name="address_id" column="address_id" entity="addresses" farkey="id" distinct="user">
|
||||||
<prompt prompt="address_id" locale="en-GB"/>
|
<prompt prompt="address" locale="en-GB"/>
|
||||||
</property>
|
</property>
|
||||||
<property type="string" name="phone" column="phone" size="16" distinct="user">
|
<property type="string" name="phone" column="phone" size="16" distinct="user">
|
||||||
<prompt prompt="phone" locale="en-GB"/>
|
<prompt prompt="phone" locale="en-GB"/>
|
||||||
|
@ -625,17 +630,8 @@
|
||||||
<field property="fullname">
|
<field property="fullname">
|
||||||
<prompt prompt="fullname" locale="en-GB"/>
|
<prompt prompt="fullname" locale="en-GB"/>
|
||||||
</field>
|
</field>
|
||||||
<field property="elector_id">
|
|
||||||
<prompt prompt="elector_id" locale="en-GB"/>
|
|
||||||
</field>
|
|
||||||
<field property="address_id">
|
<field property="address_id">
|
||||||
<prompt prompt="address_id" locale="en-GB"/>
|
<prompt prompt="address" locale="en-GB"/>
|
||||||
</field>
|
|
||||||
<field property="phone">
|
|
||||||
<prompt prompt="phone" locale="en-GB"/>
|
|
||||||
</field>
|
|
||||||
<field property="email">
|
|
||||||
<prompt prompt="email" locale="en-GB"/>
|
|
||||||
</field>
|
</field>
|
||||||
<field property="authority_id">
|
<field property="authority_id">
|
||||||
<prompt prompt="authority_id" locale="en-GB"/>
|
<prompt prompt="authority_id" locale="en-GB"/>
|
||||||
|
@ -654,11 +650,13 @@
|
||||||
<field property="fullname">
|
<field property="fullname">
|
||||||
<prompt prompt="fullname" locale="en-GB"/>
|
<prompt prompt="fullname" locale="en-GB"/>
|
||||||
</field>
|
</field>
|
||||||
|
<field property="avatar"/>
|
||||||
|
<field property="bio"/>
|
||||||
<field property="elector_id">
|
<field property="elector_id">
|
||||||
<prompt prompt="elector_id" locale="en-GB"/>
|
<prompt prompt="Electoral roll entry" locale="en-GB"/>
|
||||||
</field>
|
</field>
|
||||||
<field property="address_id">
|
<field property="address_id">
|
||||||
<prompt prompt="address_id" locale="en-GB"/>
|
<prompt prompt="address" locale="en-GB"/>
|
||||||
</field>
|
</field>
|
||||||
<field property="phone">
|
<field property="phone">
|
||||||
<prompt prompt="phone" locale="en-GB"/>
|
<prompt prompt="phone" locale="en-GB"/>
|
||||||
|
@ -748,7 +746,7 @@
|
||||||
<permission group="issueexperts" permission="read"/>
|
<permission group="issueexperts" permission="read"/>
|
||||||
<permission group="analysts" permission="read"/>
|
<permission group="analysts" permission="read"/>
|
||||||
<permission group="issueeditors" permission="read"/>
|
<permission group="issueeditors" permission="read"/>
|
||||||
<permission group="admin" permission="all"/>
|
<permission group="admin" permission="noedit"/>
|
||||||
</entity>
|
</entity>
|
||||||
<!--
|
<!--
|
||||||
entity roles already has a key - not generating one
|
entity roles already has a key - not generating one
|
||||||
|
@ -874,7 +872,7 @@
|
||||||
<prompt prompt="Organisers" locale="en-GB"/>
|
<prompt prompt="Organisers" locale="en-GB"/>
|
||||||
<field property="id">
|
<field property="id">
|
||||||
</field>
|
</field>
|
||||||
<field property="name">
|
<field property="fullname">
|
||||||
<prompt prompt="name" locale="en-GB"/>
|
<prompt prompt="name" locale="en-GB"/>
|
||||||
</field>
|
</field>
|
||||||
<field property="email">
|
<field property="email">
|
||||||
|
@ -888,7 +886,7 @@
|
||||||
<prompt prompt="Members" locale="en-GB"/>
|
<prompt prompt="Members" locale="en-GB"/>
|
||||||
<field property="id">
|
<field property="id">
|
||||||
</field>
|
</field>
|
||||||
<field property="name">
|
<field property="fullname">
|
||||||
<prompt prompt="name" locale="en-GB"/>
|
<prompt prompt="name" locale="en-GB"/>
|
||||||
</field>
|
</field>
|
||||||
<field property="email">
|
<field property="email">
|
||||||
|
@ -1019,9 +1017,6 @@
|
||||||
<field property="date">
|
<field property="date">
|
||||||
<prompt prompt="date" locale="en-GB"/>
|
<prompt prompt="date" locale="en-GB"/>
|
||||||
</field>
|
</field>
|
||||||
<field property="notes">
|
|
||||||
<prompt prompt="notes" locale="en-GB"/>
|
|
||||||
</field>
|
|
||||||
<field property="closed">
|
<field property="closed">
|
||||||
<prompt prompt="closed" locale="en-GB"/>
|
<prompt prompt="closed" locale="en-GB"/>
|
||||||
</field>
|
</field>
|
||||||
|
@ -1088,6 +1083,7 @@
|
||||||
entity followupmethods already has a key - not generating one
|
entity followupmethods already has a key - not generating one
|
||||||
-->
|
-->
|
||||||
<entity table="followupmethods" name="followupmethods" magnitude="1" volatility="7">
|
<entity table="followupmethods" name="followupmethods" magnitude="1" volatility="7">
|
||||||
|
<documentation>Methods which may be used to follow up a followup request. Reference data.</documentation>
|
||||||
<key>
|
<key>
|
||||||
<property required="true" type="string" size="32" name="id" column="id" immutable="true" distinct="all">
|
<property required="true" type="string" size="32" name="id" column="id" immutable="true" distinct="all">
|
||||||
<prompt prompt="id" locale="en-GB"/>
|
<prompt prompt="id" locale="en-GB"/>
|
||||||
|
|
Loading…
Reference in a new issue