|
| 1 | +<div class="resume"> |
| 2 | + <h3>Edit My Résumé</h3> |
| 3 | + |
| 4 | + <section class="profile"> |
| 5 | + <form name="edit_user" action="/users/edit" method="post" accept-charset="utf-8"> |
| 6 | + <input type="hidden" name="_method" value="put"> |
| 7 | + |
| 8 | + <label for="user[name]">Name</label> |
| 9 | + <input type="text" name="user[name]" value="<%= default_user.name %>"> |
| 10 | + <br> |
| 11 | + |
| 12 | + <label for="user[email]">Email</label> |
| 13 | + <input type="email" name="user[email]" value="<%= default_user.email %>"> |
| 14 | + <br> |
| 15 | + |
| 16 | + <label for="user[phone]">Phone</label> |
| 17 | + <input type="phone" name="user[phone]" value="<%= default_user.phone %>"> |
| 18 | + <br> |
| 19 | + |
| 20 | + <label for="user[website]">Website</label> |
| 21 | + <input type="url" name="user[website]" value="<%= default_user.website %>"> |
| 22 | + <br> |
| 23 | + |
| 24 | + <label for="user[bio]">Bio</label> |
| 25 | + <textarea name="user[bio]"><%= default_user.bio %></textarea> |
| 26 | + <br> |
| 27 | + |
| 28 | + <input type="submit" value="Update user"> |
| 29 | + </form> |
| 30 | + </section> |
| 31 | + |
| 32 | + <section class="jobs"> |
| 33 | + <h2>Jobs</h2> |
| 34 | + <ul> |
| 35 | + <% @jobs.each do |job| %> |
| 36 | + <li> |
| 37 | + <form name="edit_job" action="/jobs/edit" method="post" accept-charset="utf-8"> |
| 38 | + <input type="hidden" name="_method" value="put"> |
| 39 | + |
| 40 | + <input type="hidden" name="job[id]" value="<%= job.id %>"> |
| 41 | + |
| 42 | + <input type="text" name="job[job_title]" value="<%= job.job_title %>"> at |
| 43 | + <input type="text" name="job[company_name]" value="<%= job.company_name %>"> |
| 44 | + <br> |
| 45 | + |
| 46 | + <label for="job[job_description]">Job Description</label> |
| 47 | + <textarea name="job[job_description]"><%= job.job_description %></textarea> |
| 48 | + <br> |
| 49 | + |
| 50 | + <input type="submit" value="Update job"> |
| 51 | + </form> |
| 52 | + </li> |
| 53 | + <% end %> |
| 54 | + </ul> |
| 55 | + </section> |
| 56 | + |
| 57 | + <section class="skills"> |
| 58 | + <h2>Skills</h2> |
| 59 | + <ul> |
| 60 | + <% @skills.each do |skill| %> |
| 61 | + <li> |
| 62 | + <form name="edit_skill" action="/skills/edit" method="post" accept-charset="utf-8"> |
| 63 | + <input type="hidden" name="_method" value="put"> |
| 64 | + |
| 65 | + <input type="hidden" name="skill[id]" value="<%= skill.id %>"> |
| 66 | + |
| 67 | + <input type="text" name="skill[name]" value="<%= skill.name %>"> |
| 68 | + <br> |
| 69 | + |
| 70 | + <input type="submit" value="Update skill"> |
| 71 | + </form> |
| 72 | + </li> |
| 73 | + <% end %> |
| 74 | + </ul> |
| 75 | + </section> |
| 76 | +</div> |
0 commit comments