|
21 | 21 | - else |
22 | 22 | %a{:href => "/hackers/#{@hacker.username}/follow"} Follow #{@hacker.username} |
23 | 23 | - else |
24 | | - %h2 Your Account |
25 | | - %p You can use these forms to update your information: |
| 24 | + %a{:href => "#", :class => "button" } Change My Settings |
| 25 | + %div{:id => "account_settings", :style => "display:none"} |
| 26 | + %h2 Your Account |
| 27 | + %p You can use these forms to update your information: |
| 28 | + %br |
| 29 | + %p |
| 30 | + %form{:action => "/hackers/update", :method => "POST"} |
| 31 | + %table |
| 32 | + %tr |
| 33 | + %td |
| 34 | + %label{:for => "password[new]"} New Password |
| 35 | + %td |
| 36 | + %input{:type => "password", :name => "password[new]"} |
| 37 | + %tr |
| 38 | + %td |
| 39 | + %label{:for => "password[confirm]"} Confirm New Password |
| 40 | + %td |
| 41 | + %input{:type => "password", :name => "password[confirm]"} |
| 42 | + %tr |
| 43 | + %td |
| 44 | + %td |
| 45 | + %input{:type => "submit", :value => "Change password"} |
| 46 | + %hr |
| 47 | + %p |
| 48 | + %form{:action => "/hackers/update", :method => "POST"} |
| 49 | + %label{:for => "hacker[about]"} About Me |
| 50 | + %br |
| 51 | + %textarea{:name => "hacker[about]", :rows => 10, :cols => 40} |
| 52 | + %br |
| 53 | + %input{:type => "submit", :value => "Update About"} |
26 | 54 | %br |
27 | | - %p |
28 | | - %form{:action => "/hackers/update", :method => "POST"} |
29 | | - %table |
30 | | - %tr |
31 | | - %td |
32 | | - %label{:for => "password[new]"} New Password |
33 | | - %td |
34 | | - %input{:type => "password", :name => "password[new]"} |
35 | | - %tr |
36 | | - %td |
37 | | - %label{:for => "password[confirm]"} Confirm New Password |
38 | | - %td |
39 | | - %input{:type => "password", :name => "password[confirm]"} |
40 | | - %tr |
41 | | - %td |
42 | | - %td |
43 | | - %input{:type => "submit", :value => "Change password"} |
44 | | - %hr |
45 | | - %p |
46 | | - %form{:action => "/hackers/update", :method => "POST"} |
47 | | - %label{:for => "hacker[about]"} About Me |
48 | | - %br |
49 | | - %textarea{:name => "hacker[about]", :rows => 10, :cols => 40} |
50 | | - %br |
51 | | - %input{:type => "submit", :value => "Update About"} |
52 | | - |
| 55 | + %br |
| 56 | + %br |
| 57 | +- content_for :head do |
| 58 | + :javascript |
| 59 | + $(function() { |
| 60 | + $( ".button").button(); |
| 61 | + $(".button").click(function() { |
| 62 | + $(".button").hide("blinds"); |
| 63 | + $('#account_settings').toggle("blinds"); |
| 64 | + }); |
| 65 | + }); |
0 commit comments