Added field registration_required.
This commit is contained in:
@@ -53,11 +53,11 @@ Veröffentlichung: {% if planned_publication_date %}{{ planned_publication_date|
|
||||
{% endif %}{% if pre_meeting_1 %}{% if pre_meeting_2 %}<strong>{% trans 'Vortreffen' %} 1:</strong> {{ pre_meeting_1|date:'l, d. F Y, G:i'|cut:':00' }} {% trans 'Uhr' %}, DAV {% trans 'Sektionszentrum' %}<br />
|
||||
<strong>{% trans 'Vortreffen' %} 2:</strong> {{ pre_meeting_2|date:'l, d. F Y, G:i'|cut:':00' }} {% trans 'Uhr' %}, DAV {% trans 'Sektionszentrum' %}<br />
|
||||
{% else %}<strong>{% trans 'Vortreffen' %}:</strong> {{ pre_meeting_1|date:'l, d. F Y, G:i'|cut:':00' }} {% trans 'Uhr' %}, DAV {% trans 'Sektionszentrum' %}<br />{% endif %}
|
||||
{% endif %}{% if min_participants > 0 or max_participants > 0 %}<strong>{% trans 'Teilnehmerzahl' %}:</strong> {% if min_participants > 0 and max_participants > 0 %}{{ min_participants }} - {{ max_participants }} {% trans 'Teilnehmer' %}{% elif min_participants > 0 %}min. {{ min_participants }} {% trans 'Teilnehmer' %}{% else %}max. {{ max_participants }} {% trans 'Teilnehmer' %}{% endif %}<br />
|
||||
{% endif %}{% if min_participants > 0 or max_participants > 0 %}<strong>{% trans 'Teilnehmerzahl' %}:</strong> {% if min_participants == max_participants %}{{ max_participants }} {% trans 'Teilnehmer' %}{% elif min_participants > 0 and max_participants > 0 %}{{ min_participants }} - {{ max_participants }} {% trans 'Teilnehmer' %}{% elif min_participants > 0 %}min. {{ min_participants }} {% trans 'Teilnehmer' %}{% else %}max. {{ max_participants }} {% trans 'Teilnehmer' %}{% endif %}<br />
|
||||
{% endif %}{% if charge > 0 or additional_costs %}<strong>{% trans 'Kosten' %}:</strong> {% if charge > 0 %}{{ charge|floatformat:'-2' }} € {% trans 'Teilnahmegebühr' %}{% endif %}{% if additional_costs %}{% if charge > 0 %} {% trans 'zzgl.' %} {% endif %}{{ additional_costs }}{% endif %}<br />
|
||||
{% endif %}{% if deadline %}<strong>{% trans 'Anmeldeschluss' %}:</strong> {{ deadline|date:'l, d. F Y' }}<br />
|
||||
{% endif %}{% if registration_required and deadline %}<strong>{% trans 'Anmeldeschluss' %}:</strong> {{ deadline|date:'l, d. F Y' }}<br />
|
||||
{% endif %}{% if trainer_2_fullname %}{% if mode == 'training' %}<strong>{% trans 'Ausbildungsteam' %}:</strong>{% else %}<strong>{% trans 'Team' %}:</strong>{% endif %} {{ trainer_firstname }} {{ trainer_familyname }}{% if trainer_email or trainer_phone %} ({% if trainer_email %}<a href="mailto:{{ trainer_email }}">{{ trainer_email }}</a>{% endif %}{% if trainer_email and trainer_phone %}, {% endif %}{% if trainer_phone %}{{ trainer_phone }}{% endif %}){% endif %}, {{ trainer_2_fullname }}{% if trainer_2_email or trainer_2_phone %} ({% if trainer_2_email %}<a href="mailto:{{ trainer_2_email }}">{{ trainer_2_email }}</a>{% endif %}{% if trainer_2_email and trainer_2_phone %}, {% endif %}{% if trainer_2_phone %}{{ trainer_2_phone }}{% endif %}){% endif %}{% if trainer_3_fullname %}, {{ trainer_3_fullname }}{% if trainer_3_email or trainer_3_phone %} ({% if trainer_3_email %}<a href="mailto:{{ trainer_3_email }}">{{ trainer_3_email }}</a>{% endif %}{% if trainer_3_email and trainer_3_phone %}, {% endif %}{% if trainer_3_phone %}{{ trainer_3_phone }}{% endif %}){% endif %}{% endif %}<br />
|
||||
{% endif %}{% if trainer_familyname %}<strong>{% trans 'Leitung' %}:</strong> {{ trainer_firstname }} {{ trainer_familyname }}{% if trainer_email or trainer_phone %} ({% if trainer_email %}<a href="mailto:{{ trainer_email }}">{{ trainer_email }}</a>{% endif %}{% if trainer_email and trainer_phone %}, {% endif %}{% if trainer_phone %} {{ trainer_phone }}{% endif %}){% endif %}
|
||||
{% endif %}{% if registration_howto %}
|
||||
{% endif %}{% if registration_required and registration_howto %}
|
||||
<p>{{ registration_howto }}</p>
|
||||
{% endif %}
|
||||
|
||||
@@ -133,7 +133,9 @@
|
||||
{% endif %}
|
||||
{% if min_participants > 0 or max_participants > 0 %}
|
||||
<strong>{% trans 'Teilnehmerzahl' %}:</strong>
|
||||
{% if min_participants > 0 and max_participants > 0 %}
|
||||
{% if min_participants == max_participants %}
|
||||
{{ max_participants }} {% trans 'Teilnehmer' %}
|
||||
{% elif min_participants > 0 and max_participants > 0 %}
|
||||
{{ min_participants }} - {{ max_participants }} {% trans 'Teilnehmer' %}
|
||||
{% elif min_participants > 0 %}
|
||||
min. {{ min_participants }} {% trans 'Teilnehmer' %}
|
||||
@@ -153,7 +155,7 @@
|
||||
{% endif %}
|
||||
<br />
|
||||
{% endif %}
|
||||
{% if deadline %}<strong>{% trans 'Anmeldeschluss' %}:</strong> {{ deadline|date:'l, d. F Y' }}<br />{% endif %}
|
||||
{% if registration_required and deadline %}<strong>{% trans 'Anmeldeschluss' %}:</strong> {{ deadline|date:'l, d. F Y' }}<br />{% endif %}
|
||||
{% if trainer_2_fullname %}
|
||||
{% if mode == 'training' %}
|
||||
<strong>{% trans 'Ausbildungsteam' %}:</strong>
|
||||
@@ -176,7 +178,7 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if registration_howto %}
|
||||
{% if registration_required and registration_howto %}
|
||||
<div class="panel-footer">
|
||||
<p>{{ registration_howto }}</p>
|
||||
</div>
|
||||
|
||||
@@ -38,11 +38,11 @@
|
||||
{% endif %}{% if meeting_point and meeting_point != 'NONE' %}{% trans 'Treffpunkt' %}: {% if meeting_time %}{{ meeting_time|time:'G:i'|cut:':00' }} Uhr, {% endif %}{% if meeting_point == 'OTHER' %}{{ meeting_point_other }}{% else %}{{ event.get_meeting_point_display }}{% endif %}
|
||||
{% endif %}{% if pre_meeting_1 %}{% if pre_meeting_2 %}{% trans 'Vortreffen' %} 1: {{ pre_meeting_1|date:'l, d. F Y, G:i'|cut:':00' }} {% trans 'Uhr' %}, DAV {% trans 'Sektionszentrum' %}
|
||||
{% trans 'Vortreffen' %} 2: {{ pre_meeting_2|date:'l, d. F Y, G:i'|cut:':00' }} {% trans 'Uhr' %}, DAV {% trans 'Sektionszentrum' %}{% else %}{% trans 'Vortreffen' %}: {{ pre_meeting_1|date:'l, d. F Y, G:i'|cut:':00' }} {% trans 'Uhr' %}, DAV {% trans 'Sektionszentrum' %}{% endif %}
|
||||
{% endif %}{% if min_participants > 0 or max_participants > 0 %}{% trans 'Teilnehmerzahl' %}: {% if min_participants > 0 and max_participants > 0 %}{{ min_participants }} - {{ max_participants }} {% trans 'Teilnehmer' %}{% elif min_participants > 0 %}min. {{ min_participants }} {% trans 'Teilnehmer' %}{% else %}max. {{ max_participants }} {% trans 'Teilnehmer' %}{% endif %}
|
||||
{% endif %}{% if min_participants > 0 or max_participants > 0 %}{% trans 'Teilnehmerzahl' %}: {% if min_participants == max_participants %}{{ max_participants }} {% trans 'Teilnehmer' %}{% elif min_participants > 0 and max_participants > 0 %}{{ min_participants }} - {{ max_participants }} {% trans 'Teilnehmer' %}{% elif min_participants > 0 %}min. {{ min_participants }} {% trans 'Teilnehmer' %}{% else %}max. {{ max_participants }} {% trans 'Teilnehmer' %}{% endif %}
|
||||
{% endif %}{% if charge > 0 or additional_costs %}{% trans 'Kosten' %}: {% if charge > 0 %}{{ charge|floatformat:'-2' }} € {% trans 'Teilnahmegebühr' %}{% endif %}{% if additional_costs %}{% if charge > 0 %} {% trans 'zzgl.' %} {% endif %}{{ additional_costs }}{% endif %}
|
||||
{% endif %}{% if deadline %}{% trans 'Anmeldeschluss' %}: {{ deadline|date:'l, d. F Y' }}
|
||||
{% endif %}{% if registration_required and deadline %}{% trans 'Anmeldeschluss' %}: {{ deadline|date:'l, d. F Y' }}
|
||||
{% endif %}{% if trainer_2_fullname %}{% if mode == 'training' %}{% trans 'Ausbildungsteam' %}:{% else %}{% trans 'Team' %}:{% endif %} {{ trainer_firstname }} {{ trainer_familyname }}{% if trainer_email or trainer_phone %} ({% if trainer_email %}{{ trainer_email }}{% endif %}{% if trainer_email and trainer_phone %}, {% endif %}{% if trainer_phone %}{{ trainer_phone }}{% endif %}){% endif %}, {{ trainer_2_fullname }}{% if trainer_2_email or trainer_2_phone %} ({% if trainer_2_email %}{{ trainer_2_email }}{% endif %}{% if trainer_2_email and trainer_2_phone %}, {% endif %}{% if trainer_2_phone %}{{ trainer_2_phone }}{% endif %}){% endif %}{% if trainer_3_fullname %}, {{ trainer_3_fullname }}{% if trainer_3_email or trainer_3_phone %} ({% if trainer_3_email %}{{ trainer_3_email }}{% endif %}{% if trainer_3_email and trainer_3_phone %}, {% endif %}{% if trainer_3_phone %}{{ trainer_3_phone }}{% endif %}){% endif %}{% endif %}
|
||||
{% endif %}{% if trainer_familyname %}{% trans 'Leitung' %}: {{ trainer_firstname }} {{ trainer_familyname }}{% if trainer_email or trainer_phone %} ({% if trainer_email %}{{ trainer_email }}{% endif %}{% if trainer_email and trainer_phone %}, {% endif %}{% if trainer_phone %}{{ trainer_phone }}{% endif %}){% endif %}
|
||||
{% endif %}{% if registration_howto %}
|
||||
{% endif %}{% if registration_required and registration_howto %}
|
||||
{{ registration_howto }}
|
||||
{% endif %}
|
||||
@@ -4,35 +4,39 @@
|
||||
|
||||
{% block head-additional %}
|
||||
<script type="text/javascript">
|
||||
function add_no_registration_handler() {
|
||||
var e = $("#id_no_registration");
|
||||
if(e != null)
|
||||
e.change(function(){ no_registration_handler(); });
|
||||
function init_registration_required_handler() {
|
||||
var e = $("#id_registration_required");
|
||||
if(e != null) {
|
||||
e.change(function(){ registration_required_handler(); });
|
||||
if(!e.prop("checked")) {
|
||||
$("input[name=deadline_other]").prop("disabled", true);
|
||||
$("div[class~=registration_settings]").hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function no_registration_handler() {
|
||||
var e = $("#id_no_registration");
|
||||
function registration_required_handler() {
|
||||
var e = $("#id_registration_required");
|
||||
if(e != null)
|
||||
checked = e.prop("checked");
|
||||
else
|
||||
checked = false;
|
||||
checked = true;
|
||||
|
||||
// var elements = $("input[name=deadline]");
|
||||
//* elements.prop("disabled", checked);
|
||||
// $("input[name=deadline]").prop("disabled", !checked);
|
||||
$("input[name=deadline_other]").prop("disabled", !checked);
|
||||
|
||||
elements = $("input[name=deadline_other]");
|
||||
elements.prop("disabled", checked);
|
||||
|
||||
elements = $("div[class~=registration_settings]");
|
||||
if(checked)
|
||||
elements.slideUp();
|
||||
else
|
||||
var elements = $("div[class~=registration_settings]");
|
||||
if(checked) {
|
||||
elements.slideDown();
|
||||
} else {
|
||||
elements.slideUp();
|
||||
$("#id_min_participants").val("0");
|
||||
$("#id_max_participants").val("0");
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
add_no_registration_handler();
|
||||
no_registration_handler();
|
||||
init_registration_required_handler();
|
||||
});
|
||||
</script>
|
||||
{% endblock head-additional %}
|
||||
@@ -52,7 +56,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="col-sm-3">
|
||||
<label>{% trans 'Anmeldung' %}</label>
|
||||
{% bootstrap_field form.registration_required %}
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<div class="row registration_settings">
|
||||
<div class="col-sm-12">
|
||||
{% bootstrap_field form.deadline %}
|
||||
|
||||
Reference in New Issue
Block a user