1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 19:26:48 +00:00
webvirtcloud/templates/common/form.html
catborise 488a77b3c7 feat(templates): the shared form and delete pages in a centred column
The pages many views share were a horizontal form whose Cancel went
back in a primary colour beside a green Save, and a delete question in
a yellow alert squeezed into half the width, which wrapped word by word
on a phone.

Both now sit in a centred column with their heading: the form's fields
with their labels above in a card, Cancel outlined and Save the primary
action; the delete page asks "Delete <name>?" in a card with a red
edge, says what deleting does, and offers Cancel and Delete.

The form for a user's rights on a VM names them as the VM's Users tab
does: Change settings, Delete the VM, and Change console settings,
which only counts together with Change settings.
2026-10-31 18:10:05 +03:00

28 lines
900 B
HTML

{% extends "base.html" %}
{% load django_bootstrap5 %}
{% load i18n %}
{% block title %}{{ title }}{% endblock %}
{% block page_header %}
<div class="row justify-content-center">
<div class="col-lg-8"><h3 class="mb-3">{{ title }}</h3></div>
</div>
{% endblock page_header %}
{% block content %}
<div class="row justify-content-center">
<div class="col-lg-8">
<form method="post">
{% csrf_token %}
<div class="card mb-3">
<div class="card-body">{% bootstrap_form form %}</div>
</div>
<div class="d-flex flex-wrap justify-content-end gap-2">
<a class="btn btn-outline-secondary" href="javascript:history.back()">{% trans "Cancel" %}</a>
<button type="submit" class="btn btn-primary">{% trans "Save" %}</button>
</div>
</form>
</div>
</div>
{% endblock content %}