From 64307aefd3eb8ea74a3827084eb3949013d81177 Mon Sep 17 00:00:00 2001 From: Benjamin Diedrichsen Date: Thu, 12 Mar 2015 18:35:58 +0100 Subject: [PATCH 1/9] Added examples for CSV import I found the descriptions for the import rather confusing and needed several tries to get it to work. I think examples help. --- modoboa/locale/en/LC_MESSAGES/django.po | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/modoboa/locale/en/LC_MESSAGES/django.po b/modoboa/locale/en/LC_MESSAGES/django.po index 67b20d79c..a25eb7666 100644 --- a/modoboa/locale/en/LC_MESSAGES/django.po +++ b/modoboa/locale/en/LC_MESSAGES/django.po @@ -1394,7 +1394,11 @@ msgid "" " %s\n" "\n" "

The first element of each line is mandatory and must be equal to one of " -"the previous values.

\n" +"the previous values.Example:

\n" +"\n" "

You can use a different character as separator.

\n" msgstr "" @@ -1423,7 +1427,12 @@ msgid "" "
  • dlist; address; enabled; recipient; recipient; ...
  • \n" "\n" "

    The first element of each line is mandatory and must be equal to one of " -"the previous values.

    \n" +"the previous values.Example:

    \n" +"\n" "\n" "

    You can use a different character as separator.

    \n" msgstr "" From 2f47184656453fa9bb4bec248c8676b0014089fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20G=C3=A9nieux?= Date: Sun, 29 Mar 2015 22:58:36 +0530 Subject: [PATCH 2/9] improved: webmail compose form now displays cc/cci only when required improved: webmail compose form error messages on To field are more clear --- .../webmail/templates/webmail/compose.html | 47 ++++++++++++++----- modoboa/extensions/webmail/validators.py | 2 +- 2 files changed, 37 insertions(+), 12 deletions(-) diff --git a/modoboa/extensions/webmail/templates/webmail/compose.html b/modoboa/extensions/webmail/templates/webmail/compose.html index 06db8600f..916323b34 100644 --- a/modoboa/extensions/webmail/templates/webmail/compose.html +++ b/modoboa/extensions/webmail/templates/webmail/compose.html @@ -2,42 +2,67 @@
    {% csrf_token %} -
    + + {# handling to field #}
    - + + {% if form.to.errors %} + {% for error in form.to.errors %} +

    {{ error }}

    + {% endfor %} + {% endif %}
    - {% if not form.cc.value %} + + {# handling cc and cci buttons #} + {% if not form.cc.value or not form.cci.valie %}
    - - + {% if not form.cc.value %} + + {% endif %} + {% if not form.cci.value %} + + {% endif %}
    - {% endif %} + {% endif %}
    + + {# display cc field when required #} {% if form.cc.value %} {% render_field form.cc label_width="col-sm-1" %} - {% render_field form.cci label_width="col-sm-1" %} {% else %} {% render_field form.cc label_width="col-sm-1" hidden=True %} + {% endif %} + + {# display cci field when required #} + {% if form.cci.value %} + {% render_field form.cci label_width="col-sm-1" %} + {% else %} {% render_field form.cci label_width="col-sm-1" hidden=True %} {% endif %} + {% render_field form.subject label_width="col-sm-1" %} - +
    - +
    {% if body %} - {% else %} {% endif %}
    -
    +
    diff --git a/modoboa/extensions/webmail/validators.py b/modoboa/extensions/webmail/validators.py index fab794a43..3ec697f0f 100644 --- a/modoboa/extensions/webmail/validators.py +++ b/modoboa/extensions/webmail/validators.py @@ -14,7 +14,7 @@ class EmailListValidator(object): value = force_text(value) emails = [unicode.strip(email) for email in value.split(",")] addresses = getaddresses(emails) - [validate_email(e) for r, e in addresses.values] + [validate_email(e) for r, e in addresses] validate_email_list = EmailListValidator() From ca22c6504038f86553268e0107717b9e3eb0009f Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Sun, 29 Mar 2015 19:29:41 +0200 Subject: [PATCH 3/9] Fix webmail error. --- modoboa/extensions/webmail/validators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modoboa/extensions/webmail/validators.py b/modoboa/extensions/webmail/validators.py index fab794a43..3ec697f0f 100644 --- a/modoboa/extensions/webmail/validators.py +++ b/modoboa/extensions/webmail/validators.py @@ -14,7 +14,7 @@ class EmailListValidator(object): value = force_text(value) emails = [unicode.strip(email) for email in value.split(",")] addresses = getaddresses(emails) - [validate_email(e) for r, e in addresses.values] + [validate_email(e) for r, e in addresses] validate_email_list = EmailListValidator() From 9b9a3734ff1dc9e55617cbdd706991244b4f47c8 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Wed, 1 Apr 2015 15:13:45 +0200 Subject: [PATCH 4/9] Rename license file. fix #703 --- COPYING => LICENSE | 0 MANIFEST.in | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename COPYING => LICENSE (100%) diff --git a/COPYING b/LICENSE similarity index 100% rename from COPYING rename to LICENSE diff --git a/MANIFEST.in b/MANIFEST.in index 88324387f..efcdcdd0c 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ -include README.rst COPYING requirements.txt +include README.rst LICENSE requirements.txt recursive-include modoboa *.html *.js *.css *.png *.po *.mo *.json *.gif *.ttf *.woff recursive-include modoboa/core/templates *.tpl recursive-include modoboa/core/commands/templates *.tpl From b556920af508da586756fc46d38e4828b79ce2f3 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Wed, 1 Apr 2015 15:24:31 +0200 Subject: [PATCH 5/9] Fixing factories. --- .../postfix_relay_domains/factories.py | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/modoboa/extensions/postfix_relay_domains/factories.py b/modoboa/extensions/postfix_relay_domains/factories.py index 1a0c0a5a2..74400e0fb 100644 --- a/modoboa/extensions/postfix_relay_domains/factories.py +++ b/modoboa/extensions/postfix_relay_domains/factories.py @@ -4,14 +4,22 @@ from . import models class ServiceFactory(factory.DjangoModelFactory): - FACTORY_FOR = models.Service - FACTORY_DJANGO_GET_OR_CREATE = ('name', ) + + """Factory to create Service instances.""" + + class Meta: + model = models.Service + django_get_or_create = ('name', ) name = 'dummy' class RelayDomainFactory(PermissionFactory): - FACTORY_FOR = models.RelayDomain + + """Factory to create RelayDomain instances.""" + + class Meta: + model = models.RelayDomain target_host = 'external.host.tld' enabled = True @@ -20,6 +28,10 @@ class RelayDomainFactory(PermissionFactory): class RelayDomainAliasFactory(PermissionFactory): - FACTORY_FOR = models.RelayDomainAlias + + """Factory to create RelayDomainAliases instances.""" + + class Meta: + model = models.RelayDomainAlias enabled = True From 256014b20377c4039d36ca092a39b34bf85d2e28 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Wed, 8 Apr 2015 16:35:30 +0200 Subject: [PATCH 6/9] Fix wrong attribute name. --- modoboa/extensions/webmail/templates/webmail/compose.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modoboa/extensions/webmail/templates/webmail/compose.html b/modoboa/extensions/webmail/templates/webmail/compose.html index 916323b34..9f649823b 100644 --- a/modoboa/extensions/webmail/templates/webmail/compose.html +++ b/modoboa/extensions/webmail/templates/webmail/compose.html @@ -18,7 +18,7 @@ {# handling cc and cci buttons #} - {% if not form.cc.value or not form.cci.valie %} + {% if not form.cc.value or not form.cci.value %}
    {% if not form.cc.value %}