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-teams-Team.html generated 2018-07-03T23:08:20.050Z by adl.to-selmer-templates.
|
||||
<!-- File form-teams-Team.html generated 2018-07-05T10:14:18.461Z by adl.to-selmer-templates.
|
||||
See [Application Description Language](https://github.com/simon-brooke/adl).-->
|
||||
|
||||
|
||||
{% block extra-head %}
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div id='content' class='edit'>
|
||||
<form action='{{servlet-context}}/form-teams-Team' method='POST'>
|
||||
|
|
@ -12,9 +15,9 @@ See [Application Description Language](https://github.com/simon-brooke/adl).-->
|
|||
id
|
||||
</label>
|
||||
{% ifmemberof teamorganisers admin teamorganisers admin %}
|
||||
<input id='id' name='id' type='text' value='{{record.id}}' maxlength='' size='16'/>
|
||||
<input id='id' name='id' type='string' value='{{record.id}}' maxlength='' size='16'/>
|
||||
{% else %}
|
||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
|
||||
<span id='id' name='id' class='pseudo-widget disabled'>
|
||||
{{record.id}}
|
||||
</span>
|
||||
|
|
@ -30,9 +33,9 @@ You are not permitted to view id of teams
|
|||
name
|
||||
</label>
|
||||
{% ifmemberof teamorganisers admin teamorganisers admin %}
|
||||
<input id='name' name='name' type='text' value='{{record.name}}' maxlength='64' size='60'/>
|
||||
<input id='name' name='name' type='string' value='{{record.name}}' maxlength='64' size='60'/>
|
||||
{% else %}
|
||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
|
||||
<span id='name' name='name' class='pseudo-widget disabled'>
|
||||
{{record.name}}
|
||||
</span>
|
||||
|
|
@ -48,14 +51,15 @@ You are not permitted to view name of teams
|
|||
district_id
|
||||
</label>
|
||||
{% 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'>
|
||||
<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>
|
||||
</div>
|
||||
</span>
|
||||
{% else %}
|
||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
|
||||
<span id='district_id' name='district_id' class='pseudo-widget disabled'>
|
||||
{{record.district_id}}
|
||||
</span>
|
||||
|
|
@ -73,7 +77,7 @@ latitude
|
|||
{% 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 canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
|
||||
<span id='latitude' name='latitude' class='pseudo-widget disabled'>
|
||||
{{record.latitude}}
|
||||
</span>
|
||||
|
|
@ -89,14 +93,15 @@ You are not permitted to view latitude of teams
|
|||
members
|
||||
</label>
|
||||
{% 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'>
|
||||
<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'>
|
||||
{% for r in canvassers %}<option value='{{r.id}}' {% ifequal record.members r.id%}selected{% endifequal %}>{{r.username}} {{r.fullname}} {{r.address_id}} {{r.phone}} {{r.email}}</option>{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</span>
|
||||
{% else %}
|
||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
|
||||
<span id='members' name='members' class='pseudo-widget disabled'>
|
||||
{{record.members}}
|
||||
</span>
|
||||
|
|
@ -112,14 +117,15 @@ You are not permitted to view members of teams
|
|||
organisers
|
||||
</label>
|
||||
{% 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'>
|
||||
<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'>
|
||||
{% for r in canvassers %}<option value='{{r.id}}' {% ifequal record.organisers r.id%}selected{% endifequal %}>{{r.username}} {{r.fullname}} {{r.address_id}} {{r.phone}} {{r.email}}</option>{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</span>
|
||||
{% else %}
|
||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
|
||||
<span id='organisers' name='organisers' class='pseudo-widget disabled'>
|
||||
{{record.organisers}}
|
||||
</span>
|
||||
|
|
@ -137,7 +143,7 @@ longitude
|
|||
{% 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 canvassers teamorganisers issueexperts analysts issueeditors admin %}
|
||||
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin teamorganisers admin %}
|
||||
<span id='longitude' name='longitude' class='pseudo-widget disabled'>
|
||||
{{record.longitude}}
|
||||
</span>
|
||||
|
|
@ -148,19 +154,43 @@ You are not permitted to view longitude of teams
|
|||
{% endifmemberof %}
|
||||
{% endifmemberof %}
|
||||
</p>
|
||||
{% ifmemberof teamorganisers admin teamorganisers admin %}
|
||||
<p class='widget action-safe'>
|
||||
<label for='save-button' class='action-safe'>
|
||||
To save this teams record
|
||||
</label>
|
||||
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
|
||||
</p>
|
||||
{% endifmemberof %}
|
||||
{% ifmemberof teamorganisers admin teamorganisers admin %}
|
||||
<p class='widget action-dangerous'>
|
||||
<label for='delete-button' class='action-dangerous'>
|
||||
To delete this teams 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