mirror of
https://github.com/ae-utbm/sith.git
synced 2026-04-08 19:55:31 +00:00
40 lines
1.3 KiB
Django/Jinja
40 lines
1.3 KiB
Django/Jinja
{% extends "core/base.jinja" %}
|
|
|
|
{% from "core/macros.jinja" import tabs %}
|
|
|
|
{% block title %}
|
|
{% trans %}New subscription{% endtrans %}
|
|
{% endblock %}
|
|
|
|
{% block additional_js %}
|
|
<script type="module" src="{{ static('bundled/core/components/tabs-index.ts') }}"></script>
|
|
<script
|
|
type="module"
|
|
src="{{ static("bundled/subscription/creation-form-existing-user-index.ts") }}"
|
|
></script>
|
|
{% endblock %}
|
|
{% block additional_css %}
|
|
<link rel="stylesheet" href="{{ static("core/components/tabs.scss") }}">
|
|
<link rel="stylesheet" href="{{ static("subscription/css/subscription.scss") }}">
|
|
{% endblock %}
|
|
|
|
{% macro form_fragment(form_object, post_url) %}
|
|
{# Include the form fragment inside a with block,
|
|
in order to inject the right form in the right place #}
|
|
{% with form=form_object, post_url=post_url %}
|
|
{% include "subscription/fragments/creation_form.jinja" %}
|
|
{% endwith %}
|
|
{% endmacro %}
|
|
|
|
{% block content %}
|
|
<h3>{% trans %}New subscription{% endtrans %}</h3>
|
|
<ui-tab-group id="subscription-form">
|
|
<ui-tab title="{% trans %}Existing member{% endtrans %}" active>
|
|
{{ form_fragment(existing_user_form, existing_user_post_url) }}
|
|
</ui-tab>
|
|
<ui-tab title="{% trans %}New member{% endtrans %}">
|
|
{{ form_fragment(new_user_form, new_user_post_url) }}
|
|
</ui-tab>
|
|
</ui-tab-group>
|
|
{% endblock %}
|