{% extends "withnav_template.html" %}
{% from "components/banner.html" import banner_wrapper %}
{% from "components/page-header.html" import page_header %}
{% from "components/page-footer.html" import page_footer %}
{% from "components/list.html" import list_of_placeholders, list_of_code_snippets %}
{% from "components/form.html" import form_wrapper %}
{% from "components/components/back-link/macro.njk" import usaBackLink %}

{% block service_page_title %}
  Confirm changes
{% endblock %}

{% block backLink %}
  {{ usaBackLink({ "href": url_for(".edit_service_template", service_id=current_service.id, template_id=new_template.id) }) }}
{% endblock %}

{% block maincolumn_content %}

  {{ page_header('Confirm changes') }}
  <div class="grid-row">
    <div class="grid-col-10">
      {% if template_change.placeholders_removed %}
        <p>
          You removed {{ list_of_placeholders(template_change.placeholders_removed) }}
        </p>
      {% endif %}
      <p>
        You added {{ list_of_placeholders(template_change.placeholders_added) }}
      </p>
      <p>
        Before you send any messages, make sure your API calls include {{ list_of_code_snippets(template_change.placeholders_added) }}.
      </p>
    </div>
  </div>

  {% call form_wrapper() %}
    <input type="hidden" name="name" value="{{ new_template.name }}" />
    <input type="hidden" name="subject" value="{{ new_template._subject or '' }}" />
    <input type="hidden" name="template_content" value="{{ new_template.content }}" />
    <input type="hidden" name="template_id" value="{{ new_template.id }}" />

    <input type="hidden" name="confirm" value="true" />
    {{ page_footer('Save changes to template') }}
  {% endcall %}

{% endblock %}
