Progress on #2, #5; oauth isn't working but not far off

Using the Noir session doesn't seem to be the right thing to do. I should be using the Ring session, but I'm having a hard time getting my head round it. @yogthos is too bloody clever!
This commit is contained in:
Simon Brooke 2018-06-29 17:14:55 +01:00
parent 88468461fd
commit 4e296537c4
52 changed files with 465 additions and 114 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

View file

@ -1,7 +1,7 @@
------------------------------------------------------------------------
-- File queries.sql
--
-- autogenerated by adl.to-hugsql-queries at 2018-06-29T10:10:58.177Z
-- autogenerated by adl.to-hugsql-queries at 2018-06-29T14:15:37.324Z
--
-- See [Application Description
-- Language](https://github.com/simon-brooke/adl).
@ -27,8 +27,18 @@ returning id
-- :name create-authority! :! :n
-- :doc creates a new authority record
INSERT INTO authorities (id)
VALUES (:id)
INSERT INTO authorities (request_token_uri,
access_token_uri,
authorize_uri,
consumer_key,
consumer_secret,
id)
VALUES (:request_token_uri,
:access_token_uri,
:authorize_uri,
:consumer_key,
:consumer_secret,
:id)
returning id
-- :name create-canvasser! :! :n
@ -121,10 +131,12 @@ returning id
-- :doc creates a new intention record
INSERT INTO intentions (visit_id,
elector_id,
option_id)
option_id,
locality)
VALUES (:visit_id,
:elector_id,
:option_id)
:option_id,
:locality)
returning Id
-- :name create-issue! :! :n
@ -747,6 +759,11 @@ ORDER BY lv_addresses.address,
-- :doc selects existing authority records having any string field matching the parameter of the same name by substring match
SELECT * FROM lv_authorities
WHERE false
--~ (if (:request-token-uri params) "OR request_token_uri LIKE '%:request-token-uri%'")
--~ (if (:access-token-uri params) "OR access_token_uri LIKE '%:access-token-uri%'")
--~ (if (:authorize-uri params) "OR authorize_uri LIKE '%:authorize-uri%'")
--~ (if (:consumer-key params) "OR consumer_key LIKE '%:consumer-key%'")
--~ (if (:consumer-secret params) "OR consumer_secret LIKE '%:consumer-secret%'")
--~ (if (:id params) "OR id LIKE '%:id%'")
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
@ -868,6 +885,7 @@ WHERE false
--~ (if (:visit_id params) "OR visit_id = :visit_id")
--~ (if (:elector_id params) "OR elector_id = :elector_id")
--~ (if (:option_id params) "OR option_id = :option_id")
--~ (if (:locality params) "OR locality = :locality")
--~ (if (:Id params) "OR Id = :Id")
--~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
@ -941,6 +959,17 @@ SET address = :address,
locality = :locality
WHERE addresses.id = :id
-- :name update-authority! :! :n
-- :doc updates an existing authority record
UPDATE authorities
SET request_token_uri = :request-token-uri,
access_token_uri = :access-token-uri,
authorize_uri = :authorize-uri,
consumer_key = :consumer-key,
consumer_secret = :consumer-secret,
id = :id
WHERE authorities.id = :id
-- :name update-canvasser! :! :n
-- :doc updates an existing canvasser record
UPDATE canvassers
@ -1001,7 +1030,8 @@ WHERE followuprequests.id = :id
UPDATE intentions
SET visit_id = :visit_id,
elector_id = :elector_id,
option_id = :option_id
option_id = :option_id,
locality = :locality
WHERE intentions.Id = :Id
-- :name update-issue! :! :n

View file

@ -5,7 +5,7 @@
--
-- auto-generated by [Application Description Language framework]
--
-- (https://github.com/simon-brooke/adl) at 20180629T101059.126Z
-- (https://github.com/simon-brooke/adl) at 20180629T141538.194Z
--
--
-- A web-app intended to be used by canvassers campaigning for a
@ -99,7 +99,12 @@ GRANT DELETE ON addresses TO admin ;
------------------------------------------------------------------------
CREATE TABLE authorities
(
id VARCHAR(32) NOT NULL PRIMARY KEY
id VARCHAR(32) NOT NULL PRIMARY KEY,
request_token_uri VARCHAR(256) NOT NULL,
access_token_uri VARCHAR(256) NOT NULL,
authorize_uri VARCHAR(256) NOT NULL,
consumer_key VARCHAR(32) DEFAULT 'youyesyet' NOT NULL,
consumer_secret VARCHAR(256) NOT NULL
);
GRANT SELECT ON authorities TO admin,
analysts,
@ -167,8 +172,15 @@ GRANT DELETE ON districts TO admin ;
------------------------------------------------------------------------
-- primary table dwellings for entity dwellings
--
-- All dwellings within addresses in the system; a dwelling is a house,
-- flat or appartment in which electors live.
-- All dwellings within addresses in the system; a dwelling is a
-- house, flat or appartment in which electors live. Every address
-- should have
-- at least one dwelling; essentially, an address maps onto a
-- street door and
-- dwellings map onto what's behind that door. So a tenement or a
-- block of flats
-- would be one address with many dwellings.
--
------------------------------------------------------------------------
CREATE TABLE dwellings
(
@ -298,14 +310,15 @@ GRANT DELETE ON genders TO admin ;
------------------------------------------------------------------------
-- primary table intentions for entity intentions
--
-- Link table.
-- Intentions of electors to vote for options elicited in visits.
------------------------------------------------------------------------
CREATE TABLE intentions
(
Id SERIAL NOT NULL PRIMARY KEY,
visit_id INTEGER NOT NULL,
elector_id INTEGER NOT NULL,
option_id VARCHAR(32) NOT NULL
elector_id INTEGER,
option_id VARCHAR(32) NOT NULL,
locality INTEGER NOT NULL
);
GRANT SELECT ON intentions TO admin,
analysts,
@ -455,7 +468,12 @@ GRANT SELECT ON lv_addresses TO admin,
-- cetera
------------------------------------------------------------------------
CREATE VIEW lv_authorities AS
SELECT authorities.id
SELECT authorities.request_token_uri,
authorities.access_token_uri,
authorities.authorize_uri,
authorities.consumer_key,
authorities.consumer_secret,
authorities.id
FROM authorities
;
GRANT SELECT ON lv_authorities TO admin,
@ -641,6 +659,7 @@ SELECT addresses.address ||', '|| addresses.postcode ||', '|| visits.date AS vis
intentions.elector_id,
options.id AS option_id_expanded,
intentions.option_id,
intentions.locality,
intentions.Id
FROM visits, intentions, addresses, genders, electors, options
WHERE intentions.visit_id = visits.id

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File application-index.html generated 2018-06-29T10:10:59.615Z by adl.to-selmer-templates.
<!-- File application-index.html generated 2018-06-29T14:15:38.716Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -49,7 +49,12 @@ Dwelling
</dt>
<dd>
<p>
All dwellings within addresses in the system; a dwelling is a house, flat or appartment in which electors live.
All dwellings within addresses in the system; a dwelling is a
house, flat or appartment in which electors live. Every address should have
at least one dwelling; essentially, an address maps onto a street door and
dwellings map onto what's behind that door. So a tenement or a block of flats
would be one address with many dwellings.
</p>
</dd>
<dt>
@ -99,7 +104,7 @@ Intention
</dt>
<dd>
<p>
Link table.
Intentions of electors to vote for options elicited in visits.
</p>
</dd>
<dt>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-addresses-Address.html generated 2018-06-29T10:10:59.603Z by adl.to-selmer-templates.
<!-- File form-addresses-Address.html generated 2018-06-29T14:15:38.705Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-authorities-Authority.html generated 2018-06-29T10:10:59.623Z by adl.to-selmer-templates.
<!-- File form-authorities-Authority.html generated 2018-06-29T14:15:38.724Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -42,6 +42,96 @@ You are not permitted to view id of authorities
{% endifmemberof %}
{% endifmemberof %}
</p>
<p class='widget'>
<label for='request-token-uri'>
request-token-uri
</label>
{% ifmemberof admin %}
<input id='request-token-uri' name='request-token-uri' type='text' value='{{record.request-token-uri}}' maxlength='256' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='request-token-uri' name='request-token-uri' class='pseudo-widget disabled'>
{{record.request-token-uri}}
</span>
{% else %}
<span id='request-token-uri' name='request-token-uri' class='pseudo-widget not-authorised'>
You are not permitted to view request-token-uri of authorities
</span>
{% endifmemberof %}
{% endifmemberof %}
</p>
<p class='widget'>
<label for='access-token-uri'>
access-token-uri
</label>
{% ifmemberof admin %}
<input id='access-token-uri' name='access-token-uri' type='text' value='{{record.access-token-uri}}' maxlength='256' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='access-token-uri' name='access-token-uri' class='pseudo-widget disabled'>
{{record.access-token-uri}}
</span>
{% else %}
<span id='access-token-uri' name='access-token-uri' class='pseudo-widget not-authorised'>
You are not permitted to view access-token-uri of authorities
</span>
{% endifmemberof %}
{% endifmemberof %}
</p>
<p class='widget'>
<label for='authorize-uri'>
authorize-uri
</label>
{% ifmemberof admin %}
<input id='authorize-uri' name='authorize-uri' type='text' value='{{record.authorize-uri}}' maxlength='256' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='authorize-uri' name='authorize-uri' class='pseudo-widget disabled'>
{{record.authorize-uri}}
</span>
{% else %}
<span id='authorize-uri' name='authorize-uri' class='pseudo-widget not-authorised'>
You are not permitted to view authorize-uri of authorities
</span>
{% endifmemberof %}
{% endifmemberof %}
</p>
<p class='widget'>
<label for='consumer-key'>
consumer-key
</label>
{% ifmemberof admin %}
<input id='consumer-key' name='consumer-key' type='text' value='{{record.consumer-key}}' maxlength='32' size='32'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='consumer-key' name='consumer-key' class='pseudo-widget disabled'>
{{record.consumer-key}}
</span>
{% else %}
<span id='consumer-key' name='consumer-key' class='pseudo-widget not-authorised'>
You are not permitted to view consumer-key of authorities
</span>
{% endifmemberof %}
{% endifmemberof %}
</p>
<p class='widget'>
<label for='consumer-secret'>
consumer-secret
</label>
{% ifmemberof admin %}
<input id='consumer-secret' name='consumer-secret' type='text' value='{{record.consumer-secret}}' maxlength='256' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='consumer-secret' name='consumer-secret' class='pseudo-widget disabled'>
{{record.consumer-secret}}
</span>
{% else %}
<span id='consumer-secret' name='consumer-secret' class='pseudo-widget not-authorised'>
You are not permitted to view consumer-secret of authorities
</span>
{% endifmemberof %}
{% endifmemberof %}
</p>
<p class='widget action-safe'>
<label for='save-button' class='action-safe'>
To save this authorities record

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-canvassers-Canvasser.html generated 2018-06-29T10:10:59.624Z by adl.to-selmer-templates.
<!-- File form-canvassers-Canvasser.html generated 2018-06-29T14:15:38.727Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-districts-District.html generated 2018-06-29T10:10:59.594Z by adl.to-selmer-templates.
<!-- File form-districts-District.html generated 2018-06-29T14:15:38.696Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-dwellings-Dwelling.html generated 2018-06-29T10:10:59.636Z by adl.to-selmer-templates.
<!-- File form-dwellings-Dwelling.html generated 2018-06-29T14:15:38.738Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-electors-Elector.html generated 2018-06-29T10:10:59.619Z by adl.to-selmer-templates.
<!-- File form-electors-Elector.html generated 2018-06-29T14:15:38.721Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-followupactions-Followupaction.html generated 2018-06-29T10:10:59.639Z by adl.to-selmer-templates.
<!-- File form-followupactions-Followupaction.html generated 2018-06-29T14:15:38.740Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-followupmethods-Followupmethod.html generated 2018-06-29T10:10:59.641Z by adl.to-selmer-templates.
<!-- File form-followupmethods-Followupmethod.html generated 2018-06-29T14:15:38.742Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-followuprequests-Followuprequest.html generated 2018-06-29T10:10:59.598Z by adl.to-selmer-templates.
<!-- File form-followuprequests-Followuprequest.html generated 2018-06-29T14:15:38.700Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-genders-Gender.html generated 2018-06-29T10:10:59.589Z by adl.to-selmer-templates.
<!-- File form-genders-Gender.html generated 2018-06-29T14:15:38.691Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-intentions-Intention.html generated 2018-06-29T10:10:59.632Z by adl.to-selmer-templates.
<!-- File form-intentions-Intention.html generated 2018-06-29T14:15:38.734Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -92,6 +92,24 @@ You are not permitted to view option_id of intentions
{% endifmemberof %}
{% endifmemberof %}
</p>
<p class='widget'>
<label for='locality'>
locality
</label>
{% ifmemberof admin %}
<input id='locality' name='locality' type='number' value='{{record.locality}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers analysts admin %}
<span id='locality' name='locality' class='pseudo-widget disabled'>
{{record.locality}}
</span>
{% else %}
<span id='locality' name='locality' class='pseudo-widget not-authorised'>
You are not permitted to view locality of intentions
</span>
{% endifmemberof %}
{% endifmemberof %}
</p>
<p class='widget action-safe'>
<label for='save-button' class='action-safe'>
To save this intentions record

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-issues-Issue.html generated 2018-06-29T10:10:59.607Z by adl.to-selmer-templates.
<!-- File form-issues-Issue.html generated 2018-06-29T14:15:38.709Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-options-Option.html generated 2018-06-29T10:10:59.631Z by adl.to-selmer-templates.
<!-- File form-options-Option.html generated 2018-06-29T14:15:38.733Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-roles-Role.html generated 2018-06-29T10:10:59.609Z by adl.to-selmer-templates.
<!-- File form-roles-Role.html generated 2018-06-29T14:15:38.710Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-teams-Team.html generated 2018-06-29T10:10:59.616Z by adl.to-selmer-templates.
<!-- File form-teams-Team.html generated 2018-06-29T14:15:38.717Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -28,10 +28,10 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
<label for='id'>
id
</label>
{% ifmemberof teamorganisers admin %}
{% ifmemberof teamorganisers admin teamorganisers admin %}
<input id='id' name='id' type='text' value='{{record.id}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='id' name='id' class='pseudo-widget disabled'>
{{record.id}}
</span>
@ -46,10 +46,10 @@ You are not permitted to view id of teams
<label for='name'>
name
</label>
{% ifmemberof teamorganisers admin %}
{% ifmemberof teamorganisers admin teamorganisers admin %}
<input id='name' name='name' type='text' value='{{record.name}}' maxlength='64' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='name' name='name' class='pseudo-widget disabled'>
{{record.name}}
</span>
@ -64,7 +64,7 @@ You are not permitted to view name of teams
<label for='district_id'>
district_id
</label>
{% ifmemberof teamorganisers admin %}
{% ifmemberof teamorganisers admin teamorganisers admin %}
<div class='select-box' farside='districts' found='true'>
<input name='district_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='district_id' name='district_id' comment='JavaScript stuff to fix up aynchronous loading'>
@ -72,7 +72,7 @@ district_id
</select>
</div>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='district_id' name='district_id' class='pseudo-widget disabled'>
{{record.district_id}}
</span>
@ -87,10 +87,10 @@ You are not permitted to view district_id of teams
<label for='latitude'>
latitude
</label>
{% ifmemberof teamorganisers admin %}
{% ifmemberof teamorganisers admin teamorganisers admin %}
<input id='latitude' name='latitude' type='number' value='{{record.latitude}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='latitude' name='latitude' class='pseudo-widget disabled'>
{{record.latitude}}
</span>
@ -105,7 +105,7 @@ You are not permitted to view latitude of teams
<label for='members'>
members
</label>
{% ifmemberof teamorganisers admin %}
{% ifmemberof teamorganisers admin teamorganisers admin %}
<div class='select-box' farside='canvassers' found='true'>
<input name='members-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='members' name='members' multiple='multiple' comment='JavaScript stuff to fix up aynchronous loading'>
@ -113,7 +113,7 @@ members
</select>
</div>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='members' name='members' class='pseudo-widget disabled'>
{{record.members}}
</span>
@ -128,7 +128,7 @@ You are not permitted to view members of teams
<label for='organisers'>
organisers
</label>
{% ifmemberof teamorganisers admin %}
{% ifmemberof teamorganisers admin teamorganisers admin %}
<div class='select-box' farside='canvassers' found='true'>
<input name='organisers-search-box' onchange='/* javascript to repopulate the select widget */'/>
<select id='organisers' name='organisers' multiple='multiple' comment='JavaScript stuff to fix up aynchronous loading'>
@ -136,7 +136,7 @@ organisers
</select>
</div>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='organisers' name='organisers' class='pseudo-widget disabled'>
{{record.organisers}}
</span>
@ -151,10 +151,10 @@ You are not permitted to view organisers of teams
<label for='longitude'>
longitude
</label>
{% ifmemberof teamorganisers admin %}
{% ifmemberof teamorganisers admin teamorganisers admin %}
<input id='longitude' name='longitude' type='number' value='{{record.longitude}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='longitude' name='longitude' class='pseudo-widget disabled'>
{{record.longitude}}
</span>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File form-visits-Visit.html generated 2018-06-29T10:10:59.613Z by adl.to-selmer-templates.
<!-- File form-visits-Visit.html generated 2018-06-29T14:15:38.714Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File list-addresses-Addresses.html generated 2018-06-29T10:10:59.623Z by adl.to-selmer-templates.
<!-- File list-addresses-Addresses.html generated 2018-06-29T14:15:38.726Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File list-authorities-Authorities.html generated 2018-06-29T10:10:59.597Z by adl.to-selmer-templates.
<!-- File list-authorities-Authorities.html generated 2018-06-29T14:15:38.699Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -33,12 +33,30 @@ Add a new Authority
<th>
id
</th>
<th>
request-token-uri
</th>
<th>
access-token-uri
</th>
<th>
authorize-uri
</th>
</tr>
<tr>
<th>
<input id='id' type='text' name='id' value='{{ params.id }}'/>
</th>
<th>
<input id='request_token_uri' type='text' name='request_token_uri' value='{{ params.request_token_uri }}'/>
</th>
<th>
<input id='access_token_uri' type='text' name='access_token_uri' value='{{ params.access_token_uri }}'/>
</th>
<th>
<input id='authorize_uri' type='text' name='authorize_uri' value='{{ params.authorize_uri }}'/>
</th>
<th>
<input type='submit' id='search' value='Search'/>
</th>
</tr>
@ -50,6 +68,15 @@ id
{{ record.id }}
</td>
<td>
{{ record.request_token_uri }}
</td>
<td>
{{ record.access_token_uri }}
</td>
<td>
{{ record.authorize_uri }}
</td>
<td>
<a href='form-authorities-Authority?id={{ record.id }}'>
View
</a>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File list-canvassers-Canvassers.html generated 2018-06-29T10:10:59.635Z by adl.to-selmer-templates.
<!-- File list-canvassers-Canvassers.html generated 2018-06-29T14:15:38.737Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File list-districts-Districts.html generated 2018-06-29T10:10:59.629Z by adl.to-selmer-templates.
<!-- File list-districts-Districts.html generated 2018-06-29T14:15:38.731Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File list-dwellings-Dwellings.html generated 2018-06-29T10:10:59.622Z by adl.to-selmer-templates.
<!-- File list-dwellings-Dwellings.html generated 2018-06-29T14:15:38.723Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -48,7 +48,7 @@ sub-address
<input id='address_id_expanded' type='text' name='address_id_expanded' value='{{ params.address_id_expanded }}'/>
</th>
<th>
<input id='sub-address' type='text' name='sub-address' value='{{ params.sub-address }}'/>
<input id='sub_address' type='text' name='sub_address' value='{{ params.sub_address }}'/>
</th>
<th>
<input type='submit' id='search' value='Search'/>
@ -67,7 +67,7 @@ sub-address
</a>
</td>
<td>
{{ record.sub-address }}
{{ record.sub_address }}
</td>
<td>
<a href='form-dwellings-Dwelling?id={{ record.id }}'>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File list-electors-Electors.html generated 2018-06-29T10:10:59.606Z by adl.to-selmer-templates.
<!-- File list-electors-Electors.html generated 2018-06-29T14:15:38.708Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File list-followupactions-Followupactions.html generated 2018-06-29T10:10:59.634Z by adl.to-selmer-templates.
<!-- File list-followupactions-Followupactions.html generated 2018-06-29T14:15:38.736Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File list-followupmethods-Followupmethods.html generated 2018-06-29T10:10:59.612Z by adl.to-selmer-templates.
<!-- File list-followupmethods-Followupmethods.html generated 2018-06-29T14:15:38.713Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File list-followuprequests-Followuprequests.html generated 2018-06-29T10:10:59.592Z by adl.to-selmer-templates.
<!-- File list-followuprequests-Followuprequests.html generated 2018-06-29T14:15:38.694Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File list-genders-Genders.html generated 2018-06-29T10:10:59.584Z by adl.to-selmer-templates.
<!-- File list-genders-Genders.html generated 2018-06-29T14:15:38.687Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File list-intentions-Intentions.html generated 2018-06-29T10:10:59.638Z by adl.to-selmer-templates.
<!-- File list-intentions-Intentions.html generated 2018-06-29T14:15:38.739Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -39,6 +39,9 @@ elector_id
<th>
option_id
</th>
<th>
locality
</th>
</tr>
<tr>
<th>
@ -51,6 +54,9 @@ option_id
<input id='option_id_expanded' type='text' name='option_id_expanded' value='{{ params.option_id_expanded }}'/>
</th>
<th>
<input id='locality' type='number' name='locality' value='{{ params.locality }}'/>
</th>
<th>
<input type='submit' id='search' value='Search'/>
</th>
</tr>
@ -74,6 +80,9 @@ option_id
</a>
</td>
<td>
{{ record.locality }}
</td>
<td>
<a href='form-intentions-Intention?Id={{ record.Id }}'>
View
</a>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File list-issues-Issues.html generated 2018-06-29T10:10:59.630Z by adl.to-selmer-templates.
<!-- File list-issues-Issues.html generated 2018-06-29T14:15:38.732Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File list-options-Options.html generated 2018-06-29T10:10:59.593Z by adl.to-selmer-templates.
<!-- File list-options-Options.html generated 2018-06-29T14:15:38.696Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File list-roles-Roles.html generated 2018-06-29T10:10:59.611Z by adl.to-selmer-templates.
<!-- File list-roles-Roles.html generated 2018-06-29T14:15:38.712Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File list-teams-Teams.html generated 2018-06-29T10:10:59.588Z by adl.to-selmer-templates.
<!-- File list-teams-Teams.html generated 2018-06-29T14:15:38.690Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
<!-- File list-visits-Visits.html generated 2018-06-29T10:10:59.586Z by adl.to-selmer-templates.
<!-- File list-visits-Visits.html generated 2018-06-29T14:15:38.689Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -16,12 +16,12 @@
<div id="nav">
<img id="nav-icon" src="img/threelines.png" alt="Menu"/>
<menu id="nav-menu" class="nav">
<li class=""><a href="index.html">Home</a></li>
<li class=""><a href="library.html">Library</a></li>
<li class=""><a href="register.html">Register</a></li>
<li class=""><a href="home">Home</a></li>
<li class=""><a href="library">Library</a></li>
<li class=""><a href="register">Register</a></li>
<li class="">{% if user %}<a href="logout.html">Logout</a>
{% else %}<a href="login.html">Login</a>{% endif %}</li>
<li class=""><a href="about.html">About</a></li>
{% else %}<a href="login">Login</a>{% endif %}</li>
<li class=""><a href="about">About</a></li>
{% if user %}
<li id="user"><a href="profile">Logged in as {{user.username}}</a></li>
{% endif %}

View file

@ -16,12 +16,12 @@
<div id="nav">
<img id="nav-icon" src="img/threelines.png" alt="Menu"/>
<menu id="nav-menu" class="nav">
<li class=""><a href="index.html">Home</a></li>
<li class=""><a href="library.html">Library</a></li>
<li class=""><a href="register.html">Register</a></li>
<li class="">{% if user %}<a href="logout.html">Logout</a>
{% else %}<a href="login.html">Login</a>{% endif %}</li>
<li class=""><a href="about.html">About</a></li>
<li class=""><a href="home">Home</a></li>
<li class=""><a href="library">Library</a></li>
<li class=""><a href="register">Register</a></li>
<li class="">{% if user %}<a href="logout">Logout</a>
{% else %}<a href="login">Login</a>{% endif %}</li>
<li class=""><a href="about">About</a></li>
{% if user %}
<li id="user"><a href="profile">Logged in as {{user.username}}</a></li>
{% endif %}

View file

@ -1,12 +1,26 @@
{% extends "base-unauthenticated.html" %}
{% block content %}
<p>
We're not going to do login in the long term; we're going to use
<a href="https://oauth.net/2/">oauth</a>.
This is a temporary login form.
</p>
<div id="back-link-container">
<a href="javascript:history.back()" id="back-link">Back</a>
</div>
{% for authority in authorities %}
<div class="big-link-container">
<a href="auth?authority={{authority.id}}" class="big-link" id="{{authority.id}}-link">
<img src="img/authorities/{{authority.id}}.png" width="32" height="32" alt="{{authority.id}}"/>
{{authority.id}}
</a>
</div>
{% endfor %}
<form action="auth" method="post">
{% csrf-field %}
<h2>
Or use a test username and password
</h2>
<p>
We're not going to do login in the long term; we're going to use
<a href="https://oauth.net/2/">oauth</a>.
This is a temporary login form.
</p>
<p class="widget">
<label for="username">Username</label>
<input type="text" id="username" name="username"/>