finetune Form presentation

Ease the development of future forms
Adapt tenant and user forms
This commit is contained in:
Josako
2024-04-26 18:17:42 +02:00
parent 9c1a3e8f55
commit e8f97b7317
9 changed files with 106 additions and 79 deletions

View File

@@ -1,29 +1,21 @@
{% extends 'base.html' %}
{% from "macros.html" import render_field %}
{% block title %}Tenant Details{% endblock %}
{% block title %}Tenant Registration{% endblock %}
{% block content_title %}Register Tenant{% endblock %}
{% block content_description %}Add a new tenant to EveAI{% endblock %}
{% block content %}
<form action="" method="post" novalidate>
<p>
{{ form.name.label }}<br>
{{ form.name(size=80) }}
</p>
<p>
{{ form.website.label }}<br>
{{ form.website(size=80) }}
</p>
<p>
{{ form.license_start_date.label }}<br>
{{ form.license_start_date(size=20) }}
</p>
<p>
{{ form.license_end_date.label }}<br>
{{ form.license_end_date(size=20) }}
</p>
<p>
{{ form.allowed_monthly_interactions.label }}<br>
{{ form.allowed_monthly_interactions(size=20) }}
</p>
<p>{{ form.submit() }}</p>
<form method="post">
{{ form.hidden_tag() }}
{% set disabled_fields = [] %}
{% set exclude_fields = [] %}
{% for field in form %}
{{ render_field(field, disabled_fields, exclude_fields) }}
{% endfor %}
<button type="submit" class="btn btn-primary">Register Tenant</button>
</form>
{% endblock %}
{% block content_footer %} {% endblock %}