From a234c763260f7510258b0837959b4c6452dc74e7 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Mon, 12 Mar 2012 23:43:08 -0400 Subject: [PATCH] Change POP3 email setup form widget to hide the password --- apps/sources/forms.py | 3 +++ apps/sources/models.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/sources/forms.py b/apps/sources/forms.py index 002c584f4c..1ec31b9c9e 100644 --- a/apps/sources/forms.py +++ b/apps/sources/forms.py @@ -119,3 +119,6 @@ class SourceTransformationForm_create(forms.ModelForm): class POP3EmailSetupForm(forms.ModelForm): class Meta: model = POP3Email + widgets = { + 'password': forms.widgets.PasswordInput, + } diff --git a/apps/sources/models.py b/apps/sources/models.py index 9992cccad8..6cd35235a7 100644 --- a/apps/sources/models.py +++ b/apps/sources/models.py @@ -195,10 +195,10 @@ class POP3Email(BaseModel): host = models.CharField(max_length=64, verbose_name=_(u'host')) ssl = models.BooleanField(verbose_name=_(u'SSL')) - port = models.PositiveIntegerField(blank=True, null=True, verbose_name=_(u'port'), help_text=_(u'Typical values are: %d and %d for SSL. These are the defaults if no port is specified.') % (POP3_PORT, POP3_SSL_PORT)) + port = models.PositiveIntegerField(blank=True, null=True, verbose_name=_(u'port'), help_text=_(u'Override the defaults values of %d and %d for SSL, can be left blank otherwise.') % (POP3_PORT, POP3_SSL_PORT)) username = models.CharField(max_length=64, verbose_name=_(u'username')) password = models.CharField(max_length=64, verbose_name=_(u'password')) - uncompress = models.CharField(max_length=1, choices=SOURCE_UNCOMPRESS_CHOICES, verbose_name=_(u'uncompress'), help_text=_(u'Whether to expand or not compressed archives.')) + uncompress = models.CharField(max_length=1, choices=SOURCE_UNCOMPRESS_CHOICES, verbose_name=_(u'uncompress'), help_text=_(u'Whether to expand or not, compressed archives.')) interval = models.PositiveIntegerField(default=DEFAULT_POP3_INTERVAL, verbose_name=_(u'interval'), help_text=_(u'Interval in seconds between document downloads from this account.')) document_type = models.ForeignKey(DocumentType, null=True, blank=True, verbose_name=_(u'document type'), help_text=_(u'Assign a document type to documents uploaded from this source.'))