youyesyet/resources/templates/auto/form-events-Events.html

273 lines
8.8 KiB
HTML

{% extends "base.html" %}
<!-- File form-events-Events.html generated 2018-07-15T19:59:46.658Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block extra-head %}
{% script "js/lib/node_modules/simplemde/dist/simplemde.min.js" %}
{% 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 %}
{% block content %}
<div id='content' class='edit'>
<form action='{{servlet-context}}/form-events-Events' method='POST'>
{% csrf-field %}
<input id='id' name='id' type='hidden' value='{{record.id}}'/>
<p class='widget'>
<label for='name'>
Name
</label>
{% if {{record.name}} %}
{% ifmemberof teamorganisers admin %}
<input id='name' name='name' type='string' value='{{record.name}}' maxlength='64' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='name' name='name' class='pseudo-widget disabled'>
{{record.name}}
</span>
{% else %}
<span id='name' name='name' class='pseudo-widget not-authorised'>
You are not permitted to view name of events
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof teamorganisers admin %}
<input id='name' name='name' type='string' value='{{record.name}}' maxlength='64' size='60'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='name' name='name' class='pseudo-widget disabled'>
{{record.name}}
</span>
{% else %}
<span id='name' name='name' class='pseudo-widget not-authorised'>
You are not permitted to view name of events
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='teams'>
Teams
</label>
{% if {{record.teams}} %}
{% ifmemberof teamorganisers admin %}
<select id='teams' name='teams' multiple='multiple'>
{% for option in teams %}<option value='{{option.id}}' {% ifequal record.teams option.id%}selected='selected'{% endifequal %}>{{option.name}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='teams' name='teams' class='pseudo-widget disabled'>
{{record.teams}}
</span>
{% else %}
<span id='teams' name='teams' class='pseudo-widget not-authorised'>
You are not permitted to view teams of events
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof teamorganisers admin %}
<select id='teams' name='teams' multiple='multiple'>
{% for option in teams %}<option value='{{option.id}}' {% ifequal record.teams option.id%}selected='selected'{% endifequal %}>{{option.name}}</option>{% endfor %}
</select>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='teams' name='teams' class='pseudo-widget disabled'>
{{record.teams}}
</span>
{% else %}
<span id='teams' name='teams' class='pseudo-widget not-authorised'>
You are not permitted to view teams of events
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='date'>
Date
</label>
{% if {{record.date}} %}
{% ifmemberof teamorganisers admin %}
<input id='date' name='date' type='date' value='{{record.date}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='date' name='date' class='pseudo-widget disabled'>
{{record.date}}
</span>
{% else %}
<span id='date' name='date' class='pseudo-widget not-authorised'>
You are not permitted to view date of events
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof teamorganisers admin %}
<input id='date' name='date' type='date' value='{{record.date}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='date' name='date' class='pseudo-widget disabled'>
{{record.date}}
</span>
{% else %}
<span id='date' name='date' class='pseudo-widget not-authorised'>
You are not permitted to view date of events
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='time'>
Time
</label>
{% if {{record.time}} %}
{% ifmemberof teamorganisers admin %}
<input id='time' name='time' type='time' value='{{record.time}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='time' name='time' class='pseudo-widget disabled'>
{{record.time}}
</span>
{% else %}
<span id='time' name='time' class='pseudo-widget not-authorised'>
You are not permitted to view time of events
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof teamorganisers admin %}
<input id='time' name='time' type='time' value='{{record.time}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='time' name='time' class='pseudo-widget disabled'>
{{record.time}}
</span>
{% else %}
<span id='time' name='time' class='pseudo-widget not-authorised'>
You are not permitted to view time of events
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='decription'>
Decription
</label>
{% if {{record.decription}} %}
{% ifmemberof teamorganisers admin %}
<textarea rows='8' cols='60' id='decription' name='decription'>
{{record.decription}}
</textarea>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='decription' name='decription' class='pseudo-widget disabled'>
{{record.decription}}
</span>
{% else %}
<span id='decription' name='decription' class='pseudo-widget not-authorised'>
You are not permitted to view decription of events
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof teamorganisers admin %}
<textarea rows='8' cols='60' id='decription' name='decription'>
{{record.decription}}
</textarea>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='decription' name='decription' class='pseudo-widget disabled'>
{{record.decription}}
</span>
{% else %}
<span id='decription' name='decription' class='pseudo-widget not-authorised'>
You are not permitted to view decription of events
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
<p class='widget'>
<label for='cancelled'>
Cancelled
</label>
{% if {{record.cancelled}} %}
{% ifmemberof teamorganisers admin %}
<input id='cancelled' name='cancelled' type='checkbox' value='{{record.cancelled}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='cancelled' name='cancelled' class='pseudo-widget disabled'>
{{record.cancelled}}
</span>
{% else %}
<span id='cancelled' name='cancelled' class='pseudo-widget not-authorised'>
You are not permitted to view cancelled of events
</span>
{% endifmemberof %}
{% endifmemberof %}
{% else %}
{% ifmemberof teamorganisers admin %}
<input id='cancelled' name='cancelled' type='checkbox' value='{{record.cancelled}}' maxlength='' size='16'/>
{% else %}
{% ifmemberof canvassers teamorganisers issueexperts analysts issueeditors admin %}
<span id='cancelled' name='cancelled' class='pseudo-widget disabled'>
{{record.cancelled}}
</span>
{% else %}
<span id='cancelled' name='cancelled' class='pseudo-widget not-authorised'>
You are not permitted to view cancelled of events
</span>
{% endifmemberof %}
{% endifmemberof %}
{% endif %}
</p>
{% ifmemberof teamorganisers admin %}
<p class='widget action-safe'>
<label for='save-button' class='action-safe'>
To save this events record
</label>
<input id='save-button' name='save-button' class='action-safe' type='submit' value='Save!'/>
</p>
{% endifmemberof %}
{% ifmemberof teamorganisers admin %}
<p class='widget action-dangerous'>
<label for='delete-button' class='action-dangerous'>
To delete this events 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'>
var simplemde = new SimpleMDE({
autosave: {
enabled: true,
uniqueId: "Smeagol-{{page}}",
delay: 1000,
},
indentWithTabs: true,
insertTexts: {
horizontalRule: ["", "\n\n-----\n\n"],
image: ["![](http://", ")"],
link: ["[", "](http://)"],
table: ["", "\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text | Text | Text |\n\n"],
},
showIcons: ["code"], //, "table"], - sadly, markdown-clj does not support tables
spellChecker: true,
status: ["autosave", "lines", "words", "cursor"]
});
</script>
{% endblock %}