diff --git a/organizations/views.py b/organizations/views.py index df80d6f32dd7fee4722a2eae33c087c1283857c3..502cdfd4dd2be803417ef7d0c0745cf5667cc1ae 100644 --- a/organizations/views.py +++ b/organizations/views.py @@ -24,7 +24,7 @@ from .models import Organization, OrganizationEvent, ContactPerson, Contact, Con from funders.models import Funder from mails.utils import DirectMailUtil -from mails.views import MailEditingSubView +from mails.views import MailEditorSubview from organizations.decorators import has_contact from scipost.mixins import PermissionsMixin, PaginationMixin @@ -219,7 +219,7 @@ def email_contactperson(request, contactperson_id, mail=None): else: code = 'org_contacts/contactperson_initial_mail' suffix = ' (initial)' - mail_request = MailEditingSubView(request, mail_code=code, contactperson=contactperson) + mail_request = MailEditorSubview(request, code, contactperson=contactperson) if mail_request.is_valid(): comments = 'Email{suffix} sent to ContactPerson {name}.'.format( suffix=suffix, name=contactperson) @@ -231,10 +231,10 @@ def email_contactperson(request, contactperson_id, mail=None): noted_by=request.user) event.save() messages.success(request, 'Email successfully sent.') - mail_request.send() + mail_request.send_mail() return redirect(contactperson.organization.get_absolute_url()) else: - return mail_request.return_render() + return mail_request.interrupt() @permission_required('scipost.can_manage_organizations', return_403=True) @@ -379,7 +379,7 @@ def email_contactrole(request, contactrole_id, mail=None): else: code = 'org_contacts/contactrole_generic_mail' suffix = ' (generic)' - mail_request = MailEditingSubView(request, mail_code=code, contactrole=contactrole) + mail_request = MailEditorSubview(request, mail_code=code, contactrole=contactrole) if mail_request.is_valid(): comments = 'Email{suffix} sent to Contact {name}.'.format( suffix=suffix, name=contactrole.contact) @@ -391,7 +391,7 @@ def email_contactrole(request, contactrole_id, mail=None): noted_by=request.user) event.save() messages.success(request, 'Email successfully sent.') - mail_request.send() + mail_request.send_mail() return redirect(contactrole.organization.get_absolute_url()) else: - return mail_request.return_render() + return mail_request.interrupt() diff --git a/submissions/migrations/0053_merge_20190303_1304.py b/submissions/migrations/0053_merge_20190303_1304.py new file mode 100644 index 0000000000000000000000000000000000000000..cde7f1c6895df006b7138309cb227f3eaa6eebd5 --- /dev/null +++ b/submissions/migrations/0053_merge_20190303_1304.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.4 on 2019-03-03 12:04 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('submissions', '0052_merge_20190303_1241'), + ('submissions', '0052_merge_20190209_1124'), + ] + + operations = [ + ]