When someone went to /message/new/:user the "Subject" are would be pre-filled out with t('message.new.title'). The problem was that the @title template variable was being used for two purposes, to set the HTML <title> AND to pre-fill out the subject. We don't always want these two to be the same, but sometimes we do. E.g. when someone replies to a diary entry and visits /message/new/:user?title=Foo we want Foo in the <title> and in the pre-filled out Subject, and the same goes for replying to a message. So I've split up the @title variable into @title and @subject.
24 lines
783 B
Text
24 lines
783 B
Text
<h2><%= t'message.new.send_message_to', :name => h(@to_user.display_name) %></h2>
|
|
|
|
<%= error_messages_for 'message' %>
|
|
|
|
<% form_for :message, :url => { :action => "new", :display_name => @to_user.display_name } do |f| %>
|
|
<table>
|
|
<tr valign="top">
|
|
<th><%= t'message.new.subject' %></th>
|
|
<td><%= f.text_field :title, :size => 60, :value => @subject %></td>
|
|
</tr>
|
|
<tr valign="top">
|
|
<th><%= t'message.new.body' %></th>
|
|
<td><%= f.text_area :body, :cols => 80, :value => @body %></td>
|
|
</tr>
|
|
<tr>
|
|
<th></th>
|
|
<td><%= submit_tag t('message.new.send_button') %></td>
|
|
</tr>
|
|
</table>
|
|
<% end %>
|
|
|
|
<br />
|
|
|
|
<%= link_to t('message.new.back_to_inbox'), :controller => 'message', :action => 'inbox', :display_name => @user.display_name %>
|