185 lines
5.7 KiB
HTML
185 lines
5.7 KiB
HTML
{% extends "base.html" %}
|
|
<!-- File form-addresses-Address.html generated 2018-07-07T08:09:49.931Z by adl.to-selmer-templates.
|
|
See [Application Description Language](https://github.com/simon-brooke/adl).-->
|
|
|
|
|
|
{% block extra-head %}
|
|
|
|
{% endblock %}
|
|
{% block content %}
|
|
<div id='content' class='edit'>
|
|
<form action='{{servlet-context}}/form-addresses-Address' method='POST'>
|
|
{% csrf-field %}
|
|
<p class='widget'>
|
|
<label for='id'>
|
|
Id
|
|
</label>
|
|
{% ifmemberof admin %}
|
|
<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'>
|
|
{{record.id}}
|
|
</span>
|
|
{% else %}
|
|
<span id='id' name='id' class='pseudo-widget not-authorised'>
|
|
You are not permitted to view id of addresses
|
|
</span>
|
|
{% endifmemberof %}
|
|
{% endifmemberof %}
|
|
</p>
|
|
<p class='widget'>
|
|
<label for='address'>
|
|
Address
|
|
</label>
|
|
{% ifmemberof admin %}
|
|
<input id='address' name='address' type='string' value='{{record.address}}' maxlength='256' size='60'/>
|
|
{% else %}
|
|
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
|
<span id='address' name='address' class='pseudo-widget disabled'>
|
|
{{record.address}}
|
|
</span>
|
|
{% else %}
|
|
<span id='address' name='address' class='pseudo-widget not-authorised'>
|
|
You are not permitted to view address of addresses
|
|
</span>
|
|
{% endifmemberof %}
|
|
{% endifmemberof %}
|
|
</p>
|
|
<p class='widget'>
|
|
<label for='postcode'>
|
|
Postcode
|
|
</label>
|
|
{% ifmemberof admin %}
|
|
<input id='postcode' name='postcode' type='string' value='{{record.postcode}}' maxlength='16' size='16'/>
|
|
{% else %}
|
|
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
|
<span id='postcode' name='postcode' class='pseudo-widget disabled'>
|
|
{{record.postcode}}
|
|
</span>
|
|
{% else %}
|
|
<span id='postcode' name='postcode' class='pseudo-widget not-authorised'>
|
|
You are not permitted to view postcode of addresses
|
|
</span>
|
|
{% endifmemberof %}
|
|
{% endifmemberof %}
|
|
</p>
|
|
<p class='widget'>
|
|
<label for='phone'>
|
|
Phone
|
|
</label>
|
|
{% ifmemberof admin %}
|
|
<input id='phone' name='phone' type='string' value='{{record.phone}}' maxlength='16' size='16'/>
|
|
{% else %}
|
|
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
|
<span id='phone' name='phone' class='pseudo-widget disabled'>
|
|
{{record.phone}}
|
|
</span>
|
|
{% else %}
|
|
<span id='phone' name='phone' class='pseudo-widget not-authorised'>
|
|
You are not permitted to view phone of addresses
|
|
</span>
|
|
{% endifmemberof %}
|
|
{% endifmemberof %}
|
|
</p>
|
|
<p class='widget'>
|
|
<label for='district_id'>
|
|
District_id
|
|
</label>
|
|
{% 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'>
|
|
{% for r in districts %}<option value='{{r.id}}' {% ifequal record.district_id r.id%}selected{% endifequal %}>{{r.name}}</option>{% endfor %}
|
|
</select>
|
|
</span>
|
|
{% else %}
|
|
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
|
<span id='district_id' name='district_id' class='pseudo-widget disabled'>
|
|
{{record.district_id}}
|
|
</span>
|
|
{% else %}
|
|
<span id='district_id' name='district_id' class='pseudo-widget not-authorised'>
|
|
You are not permitted to view district_id of addresses
|
|
</span>
|
|
{% endifmemberof %}
|
|
{% endifmemberof %}
|
|
</p>
|
|
<p class='widget'>
|
|
<label for='latitude'>
|
|
Latitude
|
|
</label>
|
|
{% ifmemberof admin %}
|
|
<input id='latitude' name='latitude' type='number' value='{{record.latitude}}' maxlength='' size='16'/>
|
|
{% else %}
|
|
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
|
<span id='latitude' name='latitude' class='pseudo-widget disabled'>
|
|
{{record.latitude}}
|
|
</span>
|
|
{% else %}
|
|
<span id='latitude' name='latitude' class='pseudo-widget not-authorised'>
|
|
You are not permitted to view latitude of addresses
|
|
</span>
|
|
{% endifmemberof %}
|
|
{% endifmemberof %}
|
|
</p>
|
|
<p class='widget'>
|
|
<label for='longitude'>
|
|
Longitude
|
|
</label>
|
|
{% ifmemberof admin %}
|
|
<input id='longitude' name='longitude' type='number' value='{{record.longitude}}' maxlength='' size='16'/>
|
|
{% else %}
|
|
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
|
<span id='longitude' name='longitude' class='pseudo-widget disabled'>
|
|
{{record.longitude}}
|
|
</span>
|
|
{% else %}
|
|
<span id='longitude' name='longitude' class='pseudo-widget not-authorised'>
|
|
You are not permitted to view longitude of addresses
|
|
</span>
|
|
{% endifmemberof %}
|
|
{% endifmemberof %}
|
|
</p>
|
|
{% ifmemberof admin %}
|
|
<p class='widget action-safe'>
|
|
<label for='save-button' class='action-safe'>
|
|
To save this addresses record
|
|
</label>
|
|
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
|
|
</p>
|
|
{% endifmemberof %}
|
|
{% ifmemberof admin %}
|
|
<p class='widget action-dangerous'>
|
|
<label for='delete-button' class='action-dangerous'>
|
|
To delete this addresses record
|
|
</label>
|
|
<input id='delete-button' name='delete-button' class='action-dangerous' type='submit' value='Delete!'/>
|
|
</p>
|
|
{% endifmemberof %}
|
|
</form>
|
|
</div>
|
|
|
|
{% endblock %}
|
|
{% block extra-tail %}
|
|
<script type='text/javascript'>
|
|
/**
|
|
* update the select menu with id `wid` from this `data` whose fields include
|
|
* this `entity_key` and these `fields`
|
|
*/
|
|
function updateMenuOptions(wid, entity_key, fields, data){
|
|
$('#' + wid).children().filter(function(){
|
|
return $(this).attr('selected') === undefined;
|
|
}).remove().end();
|
|
|
|
$.each(data, function(key, entry){
|
|
$('#' + wid).append(
|
|
$('<option></option>').attr('value', key).text(entry));
|
|
});
|
|
}
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|