96 lines
3.5 KiB
HTML
96 lines
3.5 KiB
HTML
|
{% extends 'pirati_cz.html' %}
|
||
|
|
||
|
{% block bottom %}
|
||
|
<script>
|
||
|
$(document).ready(function(){
|
||
|
$("#recipient_choices").on("change", function(){
|
||
|
var $this = $(this);
|
||
|
var text = $this.val();
|
||
|
if( text == "---" ){ return; }
|
||
|
if( $('#new_group').prop("checked") ){
|
||
|
text = "\n * " + text;
|
||
|
}
|
||
|
$("#id_recipients").val( $("#id_recipients").val() + " " + text);
|
||
|
$this.val('---');
|
||
|
});
|
||
|
});
|
||
|
</script>
|
||
|
{% endblock %}
|
||
|
|
||
|
{%block body%}
|
||
|
<div class="row">
|
||
|
<section class="o-section o-section--spaceBot">
|
||
|
<div class="o-section-inner">
|
||
|
<div class="o-section-block">
|
||
|
<div class="medium-12 large-12 columns">
|
||
|
{% if form.instance %}
|
||
|
<h2>Upravit newsletter</h2>
|
||
|
{%else%}
|
||
|
<h2>Nový newsletter</h2>
|
||
|
{%endif%}
|
||
|
<br/>
|
||
|
</div>
|
||
|
|
||
|
<div class="medium-12 large-12 columns">
|
||
|
<form action="#" method="POST">
|
||
|
{%csrf_token%}
|
||
|
<div><i>{{form.name.label}}</i><br/>{{form.name.errors}}{{form.name}}</div>
|
||
|
<div><i>{{form.desc.label}}</i><br/>{{form.desc.errors}}{{form.desc}}</div>
|
||
|
<div><i>{{form.period.label}}</i><br/>{{form.period.errors}}{{form.period}}</div>
|
||
|
<div><i>{{form.managed_by.label}}</i><br/>{{form.managed_by.errors}}{{form.managed_by}}</div>
|
||
|
<div><i>{{form.sent_by.label}}</i><br/>{{form.sent_by.errors}}{{form.sent_by}}</div>
|
||
|
<div><i>{{form.enabled.label}}</i><br/>{{form.enabled.errors}}{{form.enabled}}</div>
|
||
|
<div><i>{{form.replyToEmail.label}}</i><br/>{{form.replyToEmail.errors}}{{form.replyToEmail}}</div>
|
||
|
<br/>
|
||
|
</div>
|
||
|
<div class="medium-12 large-6 columns">
|
||
|
<i>Výběr příjemců:</i>
|
||
|
<textarea name="recipients" id="id_recipients" rows="5">{{form.recipients.value}}</textarea>
|
||
|
</div>
|
||
|
<div class="medium-12 large-6 columns end">
|
||
|
<i>Možnosti:</i>
|
||
|
<select id="recipient_choices">
|
||
|
<option value="---"> --- vyberte --- </option>
|
||
|
<optgroup label="Regiony">
|
||
|
{% for i in regions %}<option value="r:{{i.tag}}">{{i.name}}</option>{%endfor%}
|
||
|
</optgroup>
|
||
|
<optgroup label="Dovednosti">
|
||
|
{% for i in skills %}<option value="s:{{i.tag}}">{{i.name}}</option>{%endfor%}
|
||
|
</optgroup>
|
||
|
<optgroup label="Témata">
|
||
|
{% for i in topics %}<option value="t:{{i.tag}}">{{i.name}}</option>{%endfor%}
|
||
|
</optgroup>
|
||
|
</select>
|
||
|
<label>Nová skupina podmínek: <input type="checkbox" id="new_group"/></label>
|
||
|
<p>
|
||
|
Seznam příjemců se zadává pomocí výpisu odpovídajících tagů (lze vybrat v menu).
|
||
|
Skupiny příjemců se oddělují znakem '*'. Aby byl uživatel zařazen mezi adresáty,
|
||
|
musí mít aktivní všechny tagy v rámci alespoň jedné skupiny (tj. logickými
|
||
|
operátory znázorněno jako <i>(tag AND tag ... ) OR ( tag AND tag ... ) ... </i> ).
|
||
|
</p>
|
||
|
</div>
|
||
|
|
||
|
<div class="medium-12 large-12 columns">
|
||
|
<i>Smazat ?</i> <input type="text" name="del_item" value="" placeholder="Napište 'ano' pro smazání."/>
|
||
|
<br/>
|
||
|
<input type="submit" class="button button-primary" value="Uložit"/>
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</section>
|
||
|
</div>
|
||
|
|
||
|
<div class="row">
|
||
|
<div class="medium-12 large-12 columns">
|
||
|
<section class="o-section o-section--spaceBot">
|
||
|
<div class="o-section-inner">
|
||
|
|
||
|
</div>
|
||
|
</section>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
{%endblock%}
|