names: Add information about adding static domains/subdomains

Tests:

- Visit the add static domain page. Notice that additional form description is
visible.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2025-05-14 13:17:04 -07:00 committed by James Valleroy
parent 15f71fe7e0
commit b494f8a993
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
3 changed files with 29 additions and 1 deletions

View File

@ -0,0 +1,25 @@
{% extends "form.html" %}
{% comment %}
# SPDX-License-Identifier: AGPL-3.0-or-later
{% endcomment %}
{% load bootstrap %}
{% load i18n %}
{% block form_description %}
<p>
{% blocktrans trimmed %}
If you purchased a domain name from a domain registrar, you can configure
it here. The name servers responsible for the domain must be pointing (A
and AAAA records) to the public IP addresses of the {{ box_name }}.
{% endblocktrans %}
</p>
<p>
{% blocktrans trimmed %}
If you wish to also use a subdomian of an already configured domain, add
another entry for it here. Ensure that the subdomain is configured to
point to {{ box_name }}. Subdomains are useful for hosting multiple
applications that each require a dedicted domain for themselves.
{% endblocktrans %}
</p>
{% endblock %}

View File

@ -106,7 +106,7 @@ class HostnameView(FormView):
class DomainAddView(FormView):
"""View to update system's static domain name."""
template_name = 'form.html'
template_name = 'names-domain-add.html'
form_class = DomainAddForm
prefix = 'domain-add'
success_url = reverse_lazy('names:index')

View File

@ -10,6 +10,9 @@
<h3>{{ title }}</h3>
{% block form_description %}
{% endblock %}
<form class="form form-{{ form.prefix }}" method="post">
{% csrf_token %}