nk20/apps/member/templates/member/club_form.html

42 lines
1.2 KiB
HTML
Raw Normal View History

2020-08-25 14:30:02 +00:00
{% extends "member/base.html" %}
2020-08-22 08:13:48 +00:00
{% comment %}
SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
{% load i18n crispy_forms_tags %}
2020-08-25 14:30:02 +00:00
{% block profile_content %}
2020-08-22 08:13:48 +00:00
<div class="card bg-light">
<h3 class="card-header text-center">
{{ title }}
</h3>
<div class="card-body">
<form method="post">
{% csrf_token %}
{{ form|crispy }}
<button class="btn btn-primary" type="submit">{% trans "Submit" %}</button>
</form>
</div>
</div>
2019-08-11 21:25:27 +00:00
{% endblock %}
2020-03-31 14:22:11 +00:00
{% block extrajavascript %}
2020-08-22 08:13:48 +00:00
<script>
require_memberships_obj = $("#id_require_memberships");
2020-03-31 14:22:11 +00:00
2020-08-22 08:13:48 +00:00
if (!require_memberships_obj.is(":checked")) {
$("#div_id_membership_fee_paid").toggle();
$("#div_id_membership_fee_unpaid").toggle();
$("#div_id_membership_duration").toggle();
$("#div_id_membership_start").toggle();
$("#div_id_membership_end").toggle();
}
2020-03-31 14:22:11 +00:00
2020-08-22 08:13:48 +00:00
require_memberships_obj.change(function () {
$("#div_id_membership_fee_paid").toggle();
$("#div_id_membership_fee_unpaid").toggle();
$("#div_id_membership_duration").toggle();
$("#div_id_membership_start").toggle();
$("#div_id_membership_end").toggle();
});
</script>
{% endblock %}