openstreetmap-website/app/views/message/new.rhtml
Tom Hughes e62eacd8d3 Remove bogus action attribute from the submit button - it should have
no effect as there is no such attribute defined, but Opera seems to
decide that it should post the form to that URL instead of the one
give on the form element.
2008-05-15 09:34:45 +00:00

32 lines
907 B
Text

<% user_id = params[:user_id] || @user_id %>
<% display_name = User.find_by_id(user_id).display_name %>
<h2>Send a new message to <%= h(display_name) %></h2>
<% if params[:display_name] %>
<p>Writing a new message to <%= h(params[:display_name]) %></p>
<p>TODO: drop down box of your friends</p>
<%end%>
<%= error_messages_for 'message' %>
<% form_for :message, :url => { :action => "new", :user_id => user_id } do |f| %>
<table>
<tr valign="top">
<th>Subject</th>
<td><%= f.text_field :title, :size => 60, :value => @title %></td>
</tr>
<tr valign="top">
<th>Body</th>
<td><%= f.text_area :body, :cols => 80, :value => @body %></td>
</tr>
<tr>
<th></th>
<td><%= submit_tag 'Send' %></td>
</tr>
</table>
<% end %>
<br />
<%= link_to 'Back to inbox', :controller => 'message', :action => 'inbox', :display_name => @user.display_name %>