tracks/app/views/notes/_note_edit_form.rhtml
Reinier Balt 484356fe07 small improvements
render :partial => filename, :object => @object can be written shorter since rails 2.0 like
render :partial => @object or render :partial => @collection
Also form_for is smart bout put and post for update and creation.

it helps watching older railcasts episodes :-)
2011-02-03 18:17:28 +01:00

29 lines
No EOL
840 B
Text

<%
submit_text ||= t('common.update')
form_for(note_edit_form, :html => {
:id => dom_id(note_edit_form, 'edit_form'),
:class => "inline-form edit-note-form"}) do |f|
-%>
<div id="error_status"><%= error_messages_for("note") %></div>
<%= f.hidden_field( "project_id" ) %>
<%= f.text_area( "body", "cols" => 70, "rows" => 15, "tabindex" => 1 ) %>
<div class="submit_box">
<div class="widgets">
<button type="submit" class="positive" id="<%= dom_id(note_edit_form, 'submit') %>" tabindex="15">
<%=image_tag("accept.png", :alt => "") %>
<%= submit_text %>
</button>
<a href="" class="negative" id="neg_<%=dom_id(note_edit_form, 'edit_form')%>">
<%=image_tag("cancel.png", :alt => "") %>
<%= t 'common.cancel' %>
</a>
</div>
</div>
<br/><br/>
<% end -%>