diff --git a/app/main/forms.py b/app/main/forms.py index 7ebf99f8b..7538c27c5 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -447,17 +447,6 @@ class EmailTemplateForm(BaseTemplateForm): class LetterTemplateForm(EmailTemplateForm): - postage = RadioField( - 'Choose postage', - choices=[ - ('first', 'First class'), - ('second', 'Second class'), - ('None', "Service default"), - ], - validators=[DataRequired()], - default='None' - ) - subject = TextAreaField( u'Main heading', validators=[DataRequired(message="Can’t be empty")]) diff --git a/app/main/views/templates.py b/app/main/views/templates.py index 195d291e6..8bfcbd51e 100644 --- a/app/main/views/templates.py +++ b/app/main/views/templates.py @@ -614,12 +614,6 @@ def edit_service_template(service_id, template_id): 'process_type': form.process_type.data, 'reply_to_text': template['reply_to_text'], } - if current_service.has_permission("choose_postage") and template["template_type"] == "letter": - postage = {"postage": form.postage.data} - else: - postage = {} - - new_template_data.update(postage) new_template = get_template(new_template_data, current_service) template_change = get_template(template, current_service).compare_to(new_template) @@ -648,7 +642,6 @@ def edit_service_template(service_id, template_id): service_id, subject, form.process_type.data, - postage=postage.get("postage") ) except HTTPError as e: if e.status_code == 400: @@ -679,7 +672,6 @@ def edit_service_template(service_id, template_id): return render_template( 'views/edit-{}-template.html'.format(template['template_type']), form=form, - can_choose_postage=current_service.has_permission("choose_postage"), template_id=template_id, template_type=template['template_type'], heading_action='Edit', diff --git a/app/notify_client/service_api_client.py b/app/notify_client/service_api_client.py index 9c1f25603..4b4b87ea1 100644 --- a/app/notify_client/service_api_client.py +++ b/app/notify_client/service_api_client.py @@ -150,7 +150,7 @@ class ServiceAPIClient(NotifyAdminAPIClient): @cache.delete('template-{id_}-version-None') @cache.delete('template-{id_}-versions') def update_service_template( - self, id_, name, type_, content, service_id, subject=None, process_type=None, postage=None + self, id_, name, type_, content, service_id, subject=None, process_type=None ): """ Update a service template. @@ -170,14 +170,6 @@ class ServiceAPIClient(NotifyAdminAPIClient): data.update({ 'process_type': process_type }) - if postage in ["first", "second"]: - data.update({ - 'postage': postage - }) - elif postage == 'None': - data.update({ - 'postage': None - }) data = _attach_current_user(data) endpoint = "/service/{0}/template/{1}".format(service_id, id_) return self.post(endpoint, data) diff --git a/app/templates/views/edit-letter-template.html b/app/templates/views/edit-letter-template.html index 6884c67a7..d78ba19f6 100644 --- a/app/templates/views/edit-letter-template.html +++ b/app/templates/views/edit-letter-template.html @@ -18,9 +18,6 @@