mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-12-02 12:13:54 +01:00
@@ -22,7 +22,6 @@ from ..models import (
|
|||||||
DOMAIN_TYPES = [
|
DOMAIN_TYPES = [
|
||||||
("domain", _("Domain")),
|
("domain", _("Domain")),
|
||||||
]
|
]
|
||||||
DOMAIN_TYPES += events.raiseQueryEvent("ExtraDomainTypes")
|
|
||||||
|
|
||||||
|
|
||||||
class DomainFormGeneral(forms.ModelForm, DynamicForm):
|
class DomainFormGeneral(forms.ModelForm, DynamicForm):
|
||||||
@@ -30,7 +29,7 @@ class DomainFormGeneral(forms.ModelForm, DynamicForm):
|
|||||||
"""A form to create/edit a domain."""
|
"""A form to create/edit a domain."""
|
||||||
|
|
||||||
type = forms.ChoiceField(
|
type = forms.ChoiceField(
|
||||||
label=ugettext_lazy("Type"), choices=DOMAIN_TYPES
|
label=ugettext_lazy("Type"),
|
||||||
)
|
)
|
||||||
quota = forms.IntegerField(
|
quota = forms.IntegerField(
|
||||||
label=ugettext_lazy("Quota"),
|
label=ugettext_lazy("Quota"),
|
||||||
@@ -59,6 +58,9 @@ class DomainFormGeneral(forms.ModelForm, DynamicForm):
|
|||||||
self.oldname = kwargs["instance"].name
|
self.oldname = kwargs["instance"].name
|
||||||
super(DomainFormGeneral, self).__init__(*args, **kwargs)
|
super(DomainFormGeneral, self).__init__(*args, **kwargs)
|
||||||
|
|
||||||
|
self.fields["type"].choices = (
|
||||||
|
DOMAIN_TYPES + events.raiseQueryEvent("ExtraDomainTypes"))
|
||||||
|
|
||||||
self.field_widths = {
|
self.field_widths = {
|
||||||
"quota": 3
|
"quota": 3
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user