Extremely close to alpha release
This commit is contained in:
parent
ff5c78d030
commit
fc2bd86cff
43 changed files with 2375 additions and 719 deletions
|
|
@ -1,8 +1,11 @@
|
|||
{% extends "base.html" %}
|
||||
<!-- File form-dwellings-Dwelling.html generated 2018-07-03T23:08:20.081Z by adl.to-selmer-templates.
|
||||
<!-- File form-dwellings-Dwelling.html generated 2018-07-05T10:14:18.485Z by adl.to-selmer-templates.
|
||||
See [Application Description Language](https://github.com/simon-brooke/adl).-->
|
||||
|
||||
|
||||
{% block extra-head %}
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div id='content' class='edit'>
|
||||
<form action='{{servlet-context}}/form-dwellings-Dwelling' method='POST'>
|
||||
|
|
@ -12,7 +15,7 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
|
|||
id
|
||||
</label>
|
||||
{% ifmemberof admin %}
|
||||
<input id='id' name='id' type='text' value='{{record.id}}' maxlength='' size='16'/>
|
||||
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='' size='16'/>
|
||||
{% else %}
|
||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
||||
<span id='id' name='id' class='pseudo-widget disabled'>
|
||||
|
|
@ -30,12 +33,13 @@ You are not permitted to view id of dwellings
|
|||
address_id
|
||||
</label>
|
||||
{% ifmemberof admin %}
|
||||
<div class='select-box' farside='addresses' found='true'>
|
||||
<input name='address_id-search-box' onchange='/* javascript to repopulate the select widget */'/>
|
||||
<select id='address_id' name='address_id' comment='JavaScript stuff to fix up aynchronous loading'>
|
||||
<span class='select-box' farside='addresses' found='true'>
|
||||
<input name='address_id_search_box' onchange='$.getJSON("/auto/json/seach-strings-addresses?postcode=" + address_id_search_box.text + "&address=" + address_id_search_box.text, null, function (data) {updateMenuOptions("address_id", "id", ["postcode", "address"], data);})'/>
|
||||
<br/>
|
||||
<select id='address_id' name='address_id'>
|
||||
{% for r in addresses %}<option value='{{r.id}}' {% ifequal record.address_id r.id%}selected{% endifequal %}>{{r.address}} {{r.postcode}}</option>{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</span>
|
||||
{% else %}
|
||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
||||
<span id='address_id' name='address_id' class='pseudo-widget disabled'>
|
||||
|
|
@ -49,36 +53,60 @@ You are not permitted to view address_id of dwellings
|
|||
{% endifmemberof %}
|
||||
</p>
|
||||
<p class='widget'>
|
||||
<label for='sub-address'>
|
||||
<label for='sub_address'>
|
||||
sub-address
|
||||
</label>
|
||||
{% ifmemberof admin %}
|
||||
<input id='sub-address' name='sub-address' type='text' value='{{record.sub-address}}' maxlength='32' size='32'/>
|
||||
<input id='sub_address' name='sub_address' type='string' value='{{record.sub_address}}' maxlength='32' size='32'/>
|
||||
{% else %}
|
||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
||||
<span id='sub-address' name='sub-address' class='pseudo-widget disabled'>
|
||||
{{record.sub-address}}
|
||||
<span id='sub_address' name='sub_address' class='pseudo-widget disabled'>
|
||||
{{record.sub_address}}
|
||||
</span>
|
||||
{% else %}
|
||||
<span id='sub-address' name='sub-address' class='pseudo-widget not-authorised'>
|
||||
You are not permitted to view sub-address of dwellings
|
||||
<span id='sub_address' name='sub_address' class='pseudo-widget not-authorised'>
|
||||
You are not permitted to view sub_address of dwellings
|
||||
</span>
|
||||
{% endifmemberof %}
|
||||
{% endifmemberof %}
|
||||
</p>
|
||||
{% ifmemberof admin %}
|
||||
<p class='widget action-safe'>
|
||||
<label for='save-button' class='action-safe'>
|
||||
To save this dwellings record
|
||||
</label>
|
||||
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
|
||||
</p>
|
||||
{% endifmemberof %}
|
||||
{% ifmemberof admin %}
|
||||
<p class='widget action-dangerous'>
|
||||
<label for='delete-button' class='action-dangerous'>
|
||||
To delete this dwellings record
|
||||
</label>
|
||||
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
|
||||
</p>
|
||||
{% endifmemberof %}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% block extra-tail %}
|
||||
<script type='text/javascript'>
|
||||
/**
|
||||
* update the select menu with id `wid` from this `data` whose fields include
|
||||
* this `entity_key` and these `fields`
|
||||
*/
|
||||
function updateMenuOptions(wid, entity_key, fields, data){
|
||||
$('#' + wid).children().filter(function(){
|
||||
return $(this).attr('selected') === undefined;
|
||||
}).remove().end();
|
||||
|
||||
$.each(data, function(key, entry){
|
||||
$('#' + wid).append(
|
||||
$('<option></option>').attr('value', key).text(entry));
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue