From e4f8a7942fc638b38124e9efa6fe09ecde8040db Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 20 Jun 2022 17:04:41 -0700 Subject: [PATCH] ejabberd: Revert changes to always keep localhost (aa5b1cea126d37) Signed-off-by: Sunil Mohan Adapa --- plinth/modules/ejabberd/__init__.py | 1 - plinth/modules/ejabberd/forms.py | 15 +++------------ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/plinth/modules/ejabberd/__init__.py b/plinth/modules/ejabberd/__init__.py index 2c6e46eb9..7cc86439a 100644 --- a/plinth/modules/ejabberd/__init__.py +++ b/plinth/modules/ejabberd/__init__.py @@ -213,7 +213,6 @@ def set_domains(domains): if not domains or app.needs_setup(): return - domains = list(set(domains) | {'localhost'}) commands = ['set-domains', '--domains'] commands.extend(domains) actions.superuser_run('ejabberd', commands) diff --git a/plinth/modules/ejabberd/forms.py b/plinth/modules/ejabberd/forms.py index 6122057b0..80c4e6eec 100644 --- a/plinth/modules/ejabberd/forms.py +++ b/plinth/modules/ejabberd/forms.py @@ -7,7 +7,6 @@ from django import forms from django.urls import reverse_lazy from django.utils.translation import gettext_lazy as _ -import plinth.forms from plinth import cfg from plinth.modules import ejabberd from plinth.modules.coturn.forms import turn_uris_validator @@ -17,8 +16,8 @@ from plinth.utils import format_lazy class EjabberdForm(forms.Form): """Ejabberd configuration form.""" domain_names = forms.MultipleChoiceField( - label=_('Domain names'), - widget=plinth.forms.CheckboxSelectMultipleWithReadOnly, help_text=_( + label=_('Domain names'), widget=forms.CheckboxSelectMultiple, + help_text=_( 'Domains to be used by ejabberd. Note that user accounts are ' 'unique for each domain, and migrating users to a new domain name ' 'is not yet implemented.'), choices=[]) @@ -62,15 +61,7 @@ class EjabberdForm(forms.Form): from plinth.modules.names.components import DomainName domains |= DomainName.list_names() - choices = [] - for domain in domains: - label = domain - if domain == 'localhost': - label = {'label': domain, 'disabled': True} - - choices.append((domain, label)) - - self.fields['domain_names'].choices = choices + self.fields['domain_names'].choices = zip(domains, domains) def clean_turn_uris(self): """Normalize newlines in URIs."""