Add configuration option to change the project/installation URL. This is used in the password reset emails and in the default document mailing templates.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -12,6 +12,9 @@
|
||||
Change the widget of the email fields in the mailer app to avoid
|
||||
browser side email validation. Closes GitLab issue #530.
|
||||
Thanks to Mark Maglana @relaxdiego for the report.
|
||||
* Add configuration option to change the project/installation URL.
|
||||
This is used in the password reset emails and in the default
|
||||
document mailing templates.
|
||||
|
||||
3.1.7 (2018-10-14)
|
||||
==================
|
||||
|
||||
@@ -15,7 +15,7 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from stronghold.decorators import public
|
||||
|
||||
from common.settings import setting_project_title
|
||||
from common.settings import setting_project_title, setting_project_url
|
||||
import mayan
|
||||
|
||||
from .forms import EmailAuthenticationForm, UsernameAuthenticationForm
|
||||
@@ -153,7 +153,7 @@ def password_reset_view(request):
|
||||
email_template_name='authentication/password_reset_email.html',
|
||||
extra_email_context={
|
||||
'project_title': setting_project_title.value,
|
||||
'project_website': mayan.__website__,
|
||||
'project_website': setting_project_url.value,
|
||||
'project_copyright': mayan.__copyright__,
|
||||
'project_license': mayan.__license__,
|
||||
}, subject_template_name='authentication/password_reset_subject.txt',
|
||||
|
||||
@@ -52,6 +52,12 @@ setting_project_title = namespace.add_setting(
|
||||
'Name to be displayed in the main menu.'
|
||||
),
|
||||
)
|
||||
setting_project_url = namespace.add_setting(
|
||||
global_name='COMMON_PROJECT_URL',
|
||||
default=mayan.__website__, help_text=_(
|
||||
'URL of the installation or homepage of the project.'
|
||||
),
|
||||
)
|
||||
setting_shared_storage = namespace.add_setting(
|
||||
global_name='COMMON_SHARED_STORAGE',
|
||||
default='django.core.files.storage.FileSystemStorage',
|
||||
|
||||
@@ -7,7 +7,7 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from acls.models import AccessControlList
|
||||
from common.forms import DynamicModelForm
|
||||
from common.settings import setting_project_title
|
||||
from common.settings import setting_project_title, setting_project_url
|
||||
|
||||
import mayan
|
||||
|
||||
@@ -35,7 +35,7 @@ class DocumentMailForm(forms.Form):
|
||||
'body'
|
||||
].initial = setting_document_body_template.value % {
|
||||
'project_title': setting_project_title.value,
|
||||
'project_website': mayan.__website__
|
||||
'project_website': setting_project_url.value
|
||||
}
|
||||
else:
|
||||
self.fields[
|
||||
@@ -43,7 +43,7 @@ class DocumentMailForm(forms.Form):
|
||||
].initial = setting_link_subject_template.value
|
||||
self.fields['body'].initial = setting_link_body_template.value % {
|
||||
'project_title': setting_project_title.value,
|
||||
'project_website': mayan.__website__
|
||||
'project_website': setting_project_url.value
|
||||
}
|
||||
|
||||
queryset = AccessControlList.objects.filter_by_access(
|
||||
|
||||
Reference in New Issue
Block a user