test/dummy/app/views/tasks/_form.html.erb in railstar-0.0.9 vs test/dummy/app/views/tasks/_form.html.erb in railstar-0.0.10
- old
+ new
@@ -1,29 +1,17 @@
-<%= form_for(@task) do |f| %>
- <% if @task.errors.any? %>
- <div id="error_explanation">
- <h2><%= pluralize(@task.errors.count, "error") %> prohibited this task from being saved:</h2>
+<%= form_for(@task, :url => save_action(@task, :mode => "draft")) do |f| %>
+<% if @task.errors.any? %>
+<% @task.errors.full_messages.each do |msg| %>
+<p><%= msg %></p>
+<% end %>
+<% end %>
- <ul>
- <% @task.errors.full_messages.each do |msg| %>
- <li><%= msg %></li>
- <% end %>
- </ul>
- </div>
- <% end %>
- <div class="field">
- <%= f.label :name %><br />
- <%= f.text_field :name %>
- </div>
- <div class="field">
- <%= f.label :project_id %><br />
- <%= f.number_field :project_id %>
- </div>
- <div class="field">
- <%= f.label :status %><br />
- <%= f.number_field :status %>
- </div>
- <div class="actions">
- <%= f.submit %>
- </div>
+<table class="bordered-table zebra-striped">
+ <tr>
+ <th><%= f.label :name %></th>
+ <td><%= f.text_field :name %></td>
+ </tr>
+</table>
+
+<%= f.submit :class => "btn primary" %>
<% end %>