<h1>Edit outgoing message</h1>

<%= error_messages_for 'outgoing_message' %>

<%= form_tag admin_request_update_outgoing_path(@outgoing_message) do %>

   <p><label for="outgoing_message_body">Body of message</label><br/>
   <%= text_area 'outgoing_message', 'body', :rows => 10, :cols => 60  %></p>

  <p><strong>Note:</strong> This is mainly to be used to excise information
  that users inadvertently put in their messages, not realising it would be
  public. It will already have been sent to the public authority, and their
  reply may also include that information and be automatically published on
  this site. You could also use this to edit a message before resending it, but
  only the edited version will be shown on the public page if you do that.</p>

  <p><%= submit_tag 'Save', :accesskey => 's' %></p>
<% end %>

<p>
<%= link_to 'Show', admin_request_show_path(@outgoing_message.info_request) %> |
<%= link_to 'List all', admin_request_list_path %>
</p>

<%= form_tag admin_request_destroy_outgoing_path do %>
  <div>
      <%= hidden_field_tag 'outgoing_message_id', @outgoing_message.id %>
      Warning, this is permanent! ---&gt; 
      <%= submit_tag "Destroy outgoing message" %>
  </div>
<% end %>



<h1>Edit outgoing message</h1>

<%= error_messages_for 'outgoing_message' %>

<%= form_tag admin_request_update_outgoing_path(@outgoing_message) do %>

   <p><label for="outgoing_message_body">Body of message</label><br/>
   <%= text_area 'outgoing_message', 'body', :rows => 10, :cols => 60  %></p>

  <p><strong>Note:</strong> This is mainly to be used to excise information
  that users inadvertently put in their messages, not realising it would be
  public. It will already have been sent to the public authority, and their
  reply may also include that information and be automatically published on
  this site. You could also use this to edit a message before resending it, but
  only the edited version will be shown on the public page if you do that.</p>

  <p><%= submit_tag 'Save', :accesskey => 's' %></p>
<% end %>

<p>
<%= link_to 'Show', admin_request_show_path(@outgoing_message.info_request) %> |
<%= link_to 'List all', admin_request_list_path %>
</p>

<%= form_tag admin_request_destroy_outgoing_path do %>
  <div>
      <%= hidden_field_tag 'outgoing_message_id', @outgoing_message.id %>
      <%= submit_tag "Destroy outgoing message", :class => "btn btn-danger", :confirm => "This is permanent! Are you sure?" %>
  </div>
<% end %>



Add confirmation to outgoing messsage destroy.
Add confirmation to outgoing messsage destroy.

Closes #1053.
