diff --git a/modoboa/admin/forms.py b/modoboa/admin/forms.py index 3ba571cdd..d9dbd52c5 100644 --- a/modoboa/admin/forms.py +++ b/modoboa/admin/forms.py @@ -125,7 +125,8 @@ class DomainForm(TabForms): if "instances" in kwargs: cbargs += [kwargs["instances"]["general"]] self.forms += events.raiseQueryEvent("ExtraDomainForm", *cbargs) - + if not self.forms: + self.active_id = "admins" super(DomainForm, self).__init__(*args, **kwargs) def save(self, user): diff --git a/modoboa/admin/models.py b/modoboa/admin/models.py index 92aadc4d6..383e243d3 100644 --- a/modoboa/admin/models.py +++ b/modoboa/admin/models.py @@ -719,6 +719,11 @@ class Mailbox(DatesAware): raise AdminError(_("Failed to remove mailbox: %s" % output)) def set_quota(self, value, override_domain=False): + """Set or update quota's value for this mailbox. + + :param integer value: the quota's value + :param bool override_domain: allow to override domain's limit or not + """ if value is None: self.quota = self.domain.quota elif int(value) > self.domain.quota and not override_domain: diff --git a/modoboa/admin/templates/admin/editdomainform.html b/modoboa/admin/templates/admin/editdomainform.html index e2987715d..24c731769 100644 --- a/modoboa/admin/templates/admin/editdomainform.html +++ b/modoboa/admin/templates/admin/editdomainform.html @@ -1,18 +1,24 @@ {% extends "common/tabforms.html" %}{% load i18n libextras admin_extras %} {% block extratabs %} -
| {% trans "Username" %} | {% trans "Name" %} | ||||
|---|---|---|---|---|---|
| {{ da.username }} | {{ da.fullname }} | {% domadmin_actions da.id domain.id %} | +{{ da.username }} | +{{ da.fullname }} | +{% if perms.admin.change_domain%}{% domadmin_actions da.id domain.id %}{% endif %} |