Import and PEP8 cleanups
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from navigation.api import bind_links
|
||||
from documents.models import Document
|
||||
from acls.api import class_permissions
|
||||
|
||||
@@ -16,8 +16,7 @@ class DocumentMailForm(forms.Form):
|
||||
else:
|
||||
self.fields['subject'].initial = settings.LINK_SUBJECT_TEMPLATE
|
||||
self.fields['body'].initial = settings.LINK_BODY_TEMPLATE
|
||||
|
||||
|
||||
|
||||
email = forms.EmailField(label=_(u'Email address'))
|
||||
subject = forms.CharField(label=_(u'Subject'), required=False)#, initial=_(u'Link for document: {{ document }}'))
|
||||
body = forms.CharField(label=_(u'Body'), widget=forms.widgets.Textarea(), required=False)#, initial=_(u'To access this document click on the following link: <a href="{{ link }}">{{ link }}</a>'))
|
||||
subject = forms.CharField(label=_(u'Subject'), required=False)
|
||||
body = forms.CharField(label=_(u'Body'), widget=forms.widgets.Textarea(), required=False)
|
||||
|
||||
@@ -79,7 +79,7 @@ def send_document_link(request, document_id=None, document_id_list=None, as_atta
|
||||
else:
|
||||
messages.error(request, _(u'Error sending document link for document %(document)s; %(error)s.') % {
|
||||
'document': document, 'error': exc})
|
||||
|
||||
|
||||
else:
|
||||
if as_attachment:
|
||||
messages.success(request, _(u'Successfully sent document via email.'))
|
||||
|
||||
Reference in New Issue
Block a user