Skip to content

Commit

Permalink
Should only show hint on update. Fixes hacketyhack#123
Browse files Browse the repository at this point in the history
  • Loading branch information
abhirao committed Feb 2, 2012
1 parent a79f8fb commit 686e7fd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/views/users/_form.html.haml
Expand Up @@ -5,12 +5,13 @@
= f.input :username, :autofocus => true
= f.input :email, :autofocus => true
.inputs
= f.input :password, :hint => "Leave it blank if you don't want to change it", :required => false
- pwd_options = resource.new_record? ? {} : {:hint => "Leave it blank if you don't want to change it"}
= f.input :password, pwd_options.merge({:required => false})
= f.input :password_confirmation, :required => false
.inputs
= f.input :about, :as => :text
- unless resource.new_record?
.inputs
= f.input :current_password, :required => true, :hint => "We need your password to update your account."
.actions
= f.button :submit, submit_label, :class => "btn primary"
= f.button :submit, submit_label, :class => "btn primary"

0 comments on commit 686e7fd

Please sign in to comment.