Using form partial for the new rate. #1916
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<% form_tag('/todo') do |f| %>
|
||||
<% form_for(@rate) do |f| %>
|
||||
<table class="list">
|
||||
<thead>
|
||||
<th style="width:15%"><%= l(:label_date) %></th>
|
||||
@@ -12,7 +12,7 @@
|
||||
<%= text_field_tag "date_from", nil, :size => 10 %><%= calendar_for('date_from') %>
|
||||
</td>
|
||||
<td>
|
||||
<%=
|
||||
<%= # TODO: move to controller once a hook is in place for the Admin panel
|
||||
projects = Project.find(:all, :conditions => { :status => Project::STATUS_ACTIVE}, :include => :parent)
|
||||
select_tag("project",projects_options_for_select(projects))
|
||||
%>
|
||||
|
||||
@@ -1,27 +1,3 @@
|
||||
<h1>New rate</h1>
|
||||
<h1><%= l(:rate_label_new_rate) %></h1>
|
||||
|
||||
<% form_for(@rate) do |f| %>
|
||||
<%= f.error_messages %>
|
||||
|
||||
<p>
|
||||
<%= f.label :amount %><br />
|
||||
<%= f.text_field :amount %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :user_id %><br />
|
||||
<%= f.text_field :user_id %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :project_id %><br />
|
||||
<%= f.text_field :project_id %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :date_in_effect %><br />
|
||||
<%= f.date_select :date_in_effect %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.submit "Create" %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<%= link_to 'Back', rates_path %>
|
||||
<%= render :partial => 'rates/form' %>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<h1><%= l(:rate_label_new_rate) %></h1>
|
||||
|
||||
<% @rate = Rate.new(:user => @user ) %>
|
||||
<%= render :partial => 'rates/form' %>
|
||||
|
||||
<h1><%= l(:rate_label_rate_history) %></h1>
|
||||
|
||||
Reference in New Issue
Block a user