<% form_for(@rate) do |f| %>
<%= l(:label_date) %> <%= l(:label_project) %> <%= l(:rate_label_rate) %>
<%= f.text_field "date_in_effect", :size => 10 %><%= calendar_for('rate_date_in_effect') %> <%= # TODO: move to controller once a hook is in place for the Admin panel projects = Project.find(:all, :conditions => { :status => Project::STATUS_ACTIVE}) select_tag("rate[project_id]", project_options_for_select_with_selected(projects, @rate.project)) %> <%= l(:rate_label_currency) %> <%= f.text_field "amount", :size => 10 %> <%= f.hidden_field "user_id" %> <%= hidden_field_tag "back_url", @back_url %> <% if @rate.unlocked? %> <%= submit_tag((@rate.new_record? ? l(:button_add) : l(:button_update)), :class => 'button-small')-%> <% else %> <%= image_tag('locked.png') %> <% end %>
<% end %>