This makes it more conventional, rather than handling posts to the new action. The posting of the form was also reworked to use a hidden field for the displayname, rather than in the url, again for convention.
23 lines
945 B
Text
23 lines
945 B
Text
<% content_for :heading do %>
|
|
<h2><%= raw(t '.send_message_to', :name => link_to(h(@message.recipient.display_name), user_path(@message.recipient))) %></h2>
|
|
<% end %>
|
|
|
|
<%= error_messages_for 'message' %>
|
|
|
|
<%= form_for @message, :html => { :class => 'standard-form' } do |f| %>
|
|
<%= hidden_field_tag :display_name, @message.recipient.display_name %>
|
|
<fieldset>
|
|
<div class='form-row'>
|
|
<label class="standard-label" for="message_title"><%= t '.subject' %></label>
|
|
<%= f.text_field :title, :size => 60, :class => "richtext_title" %>
|
|
</div>
|
|
<div class='form-row'>
|
|
<label class="standard-label" for="message_body"><%= t '.body' %></label>
|
|
<%= richtext_area :message, :body, :cols => 80, :rows => 20 %>
|
|
</div>
|
|
<div class='buttons'>
|
|
<%= submit_tag t('.send_button') %>
|
|
<%= link_to t('.back_to_inbox'), inbox_messages_path, :class => 'deemphasize button' %>
|
|
</div>
|
|
</fieldset>
|
|
<% end %>
|