Removed links to add_template_by_type_endpoint

The endpoint was removed, but was still linked to in a couple of
places. Some old links were no longer needed, so have been removed.

We do still need a link to `add_template_by_type` on the 'Choose reply'
page - this page is used to allow to let someone pick a template to
reply to inbound SMS with. Since the link only appears if they have no
SMS templates, we now link to `.choose_template` with the templates and
folders form already opened at the option to add a template.
This commit is contained in:
Katie Smith
2019-02-14 16:27:13 +00:00
parent 6a66ee0a4f
commit 862d077f66
5 changed files with 45 additions and 15 deletions

View File

@@ -135,6 +135,10 @@ def choose_template(service_id, template_type='all', template_folder_id=None):
if 'templates_and_folders' in templates_and_folders_form.errors:
flash('Select at least one template or folder')
initial_state = request.args.get('initial_state')
if request.method == 'GET' and initial_state:
templates_and_folders_form.op = initial_state
return render_template(
'views/templates/choose.html',
current_template_folder_id=template_folder_id,