Redmine-Jobs/app/views/jobs/_form.html.erb

41 lines
1014 B
Plaintext
Raw Normal View History

2023-11-26 20:25:27 +00:00
<%= form_with model: @job, url: form_target, id: "job_form" do |f| %>
2023-11-24 16:51:15 +00:00
<%= error_messages_for @job %>
<div class="box tabular">
2023-11-16 20:23:09 +00:00
<p>
<%= f.label :name %>
<%= f.text_field :name %>
<p>
<%= f.label :description %>
<%= f.text_area :description %>
2023-11-30 19:08:55 +00:00
<p>
<%= f.label :category %>
<%= f.collection_select :category_id, JobCategory.all, :id, :name %>
2023-11-16 20:23:09 +00:00
<p>
<%= f.label :starts_on %>
<%= f.date_field :starts_on %>
<p>
<%= f.label :ends_on %>
<%= f.date_field :ends_on %>
2023-11-24 16:51:15 +00:00
<%= f.hidden_field :project_id, value: @job.project.id %>
2023-11-16 20:23:09 +00:00
<fieldset>
<legend>Budget</legend>
<%= f.fields_for :time_budgets do |ff| %>
<p>
<%= ff.label :hours, ff.object.category&.name || "Unassigned" %>
<%= ff.number_field :hours %>
<%= ff.hidden_field :category_id %>
<%= ff.hidden_field :job_id %>
<%= ff.hidden_field :_destroy, value: false %>
<% end %>
</fieldset>
2023-11-16 20:23:09 +00:00
</div>
<%= f.submit %>
<% end %>