mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
24 lines
698 B
Python
24 lines
698 B
Python
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
"""Forms for the SOGo app."""
|
|
|
|
from django import forms
|
|
from django.utils.translation import gettext_lazy as _
|
|
|
|
from freedombox.modules.names.components import DomainName
|
|
|
|
|
|
def _get_domain_choices():
|
|
"""Double domain entries for inclusion in the choice field."""
|
|
return ((domain.name, domain.name) for domain in DomainName.list())
|
|
|
|
|
|
class DomainForm(forms.Form):
|
|
domain = forms.ChoiceField(
|
|
choices=_get_domain_choices,
|
|
label=_('Domain'),
|
|
help_text=_(
|
|
'Mails are received for all domains configured in the system. '
|
|
'Among these, select the most important one.'),
|
|
required=True,
|
|
)
|