Initial implementation of projects, tasks and their basic actions #1
22
app/views/tasks/new.html.erb
Normal file
22
app/views/tasks/new.html.erb
Normal file
@@ -0,0 +1,22 @@
|
||||
<h3>Add new task for "<%= @project.project_name %>"</h3>
|
||||
|
||||
<%= form_with model: [@project, Task.new], local: true do |task| %>
|
||||
<p>
|
||||
<%= task.label :title %><br>
|
||||
<%= task.text_field :title %>
|
||||
<% @project.tasks.each do |t| %>
|
||||
<% t.errors.full_messages_for(:title).each do |message| %>
|
||||
<p><%= message %></p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= task.label :status %><br>
|
||||
<%= task.select :status, Task.statuses.keys %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= task.submit "Create Task" %>
|
||||
</p>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user