forked from AdaGold/task-list
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a delete button with confirmation pop up box. Dried the code fo…
…r new and edit by using a partial view _form
- Loading branch information
Showing
10 changed files
with
673 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<section id = "new_task_section"> | ||
<%= form_for @task do |f| %> | ||
<%= f.label :name %> | ||
<%= f.text_field :name %> | ||
<%= f.label :description %> | ||
<%= f.text_field :description %> | ||
<%= f.submit %> | ||
<% end %> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1 @@ | ||
|
||
|
||
<!-- <%= form_for @task do |f| %> | ||
<%= f.label :name %> | ||
<%= f.text_field :name %> | ||
<%= f.label :description %> | ||
<%= f.text_field :description %> | ||
<%= f.submit %> | ||
<% end %> --> | ||
|
||
|
||
<section id = "edit_task_section"> | ||
<h2>Edit task</h2> | ||
<%= form_for @task do |f| %> | ||
<%= f.label :name %> | ||
<%= f.text_field :name %> | ||
<%= f.label :description %> | ||
<%= f.text_field :description %> | ||
<%= f.submit %> | ||
<% end %> | ||
</section> | ||
<%= render partial: "form"%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1 @@ | ||
<!-- | ||
<form action="/tasks" method="post" accept-charset="utf-8"> | ||
--> | ||
<!-- SPECIAL INPUT TO ALLOW RAILS TO USE THIS FORM --> | ||
|
||
<!-- | ||
<input name="authenticity_token" value="<%= form_authenticity_token %>" type="hidden"> | ||
<label for="name">Task</label> | ||
<input type="text" name="task[name]" value="" id="name"> | ||
<label for="description">Description</label> | ||
<input type="text" name="task[description]" value="" id="description"> | ||
<input type="submit" value="Submit"> | ||
</form> | ||
--> | ||
|
||
<!-- | ||
#in new.html.erb | ||
<%= datetime_local_field(:task, :completion_date) %> | ||
#instead of: | ||
#<label for="completion_date">Due Date</label> | ||
#<input type="datetime" name="task[completion_date]" value="" id="completion_date"> | ||
--> | ||
|
||
<!-- <%= form_for @task do |f| %> | ||
<%= f.label :name %> | ||
<%= f.text_field :name %> | ||
<%= f.label :description %> | ||
<%= f.text_field :description %> | ||
<%= f.submit %> | ||
<% end %> --> | ||
|
||
|
||
|
||
<section id = "new_task_section"> | ||
<h2>Enter a new task</h2> | ||
<%= form_for @task do |f| %> | ||
<%= f.label :name %> | ||
<%= f.text_field :name %> | ||
<%= f.label :description %> | ||
<%= f.text_field :description %> | ||
<%= f.submit %> | ||
<% end %> | ||
</section> | ||
<%= render partial: "form"%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.