mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-20 06:08:35 +02:00
Partial implementation of ticket #40
(modifying an alias is not working yet)
This commit is contained in:
+3
-3
@@ -45,13 +45,13 @@ class AliasForm(forms.ModelForm):
|
||||
del kwargs["domain"]
|
||||
super(AliasForm, self).__init__(*args, **kwargs)
|
||||
self.fields['address'].widget.attrs['size'] = 14
|
||||
self.fields['mbox'].widget.attrs['size'] = 5
|
||||
self.fields['mboxes'].widget.attrs['size'] = 5
|
||||
if domain:
|
||||
self.fields['mbox'].queryset = Mailbox.objects.filter(domain=domain.id)
|
||||
self.fields['mboxes'].queryset = Mailbox.objects.filter(domain=domain.id)
|
||||
|
||||
class Meta:
|
||||
model = Alias
|
||||
fields = ('address', 'mbox', 'enabled')
|
||||
fields = ('address', 'mboxes', 'enabled')
|
||||
|
||||
class PermissionForm(forms.Form):
|
||||
domain = forms.ModelChoiceField(queryset=Domain.objects.all(), label=_("Domain"),
|
||||
|
||||
Reference in New Issue
Block a user