nk20/templates/member/club_form.html

34 lines
1.0 KiB
HTML

{% extends "base.html" %}
{% load static %}
{% load i18n %}
{% load crispy_forms_tags %}
{% block content %}
<form method="post">
{% csrf_token %}
{{form|crispy}}
<button class="btn btn-primary" type="submit">{% trans "Submit" %}</button>
</form>
{% endblock %}
{% block extrajavascript %}
<script>
require_memberships_obj = $("#id_require_memberships");
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();
}
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 %}