nk20/templates/member/add_members.html

30 lines
854 B
HTML

{% extends "member/noteowner_detail.html" %}
{% load crispy_forms_tags %}
{% load static %}
{% load i18n %}
{% block profile_info %}
{% include "member/club_info.html" %}
{% endblock %}
{% block profile_content %}
<form method="post" action="">
{% csrf_token %}
{{ form|crispy }}
<button class="btn btn-primary" type="submit">{% trans "Submit" %}</button>
</form>
{% endblock %}
{% block extrajavascript %}
<script>
function autocompleted(user) {
$("#id_last_name").val(user.last_name);
$("#id_first_name").val(user.first_name);
$.getJSON("/api/members/profile/" + user.id + "/", function(profile) {
let fee = profile.paid ? {{ club.membership_fee_paid }} : {{ club.membership_fee_unpaid }};
$("#id_credit_amount").val((fee / 100).toFixed(2));
});
}
</script>
{% endblock %}