From 2e2326d380ef1160c7d3cbfc446f96ef6eab2721 Mon Sep 17 00:00:00 2001 From: jessib Date: Tue, 19 Feb 2013 14:18:25 -0800 Subject: Needs some cleanup, but this has one form where user can change username and password (they can leave either the same if they just want to change one, but we should make this clearer.) --- users/app/views/users/_login_and_password_fields.html.haml | 3 +++ users/app/views/users/edit.html.haml | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 users/app/views/users/_login_and_password_fields.html.haml (limited to 'users/app/views') diff --git a/users/app/views/users/_login_and_password_fields.html.haml b/users/app/views/users/_login_and_password_fields.html.haml new file mode 100644 index 0000000..4d4585a --- /dev/null +++ b/users/app/views/users/_login_and_password_fields.html.haml @@ -0,0 +1,3 @@ += f.input :login, :required => true, :input_html => { :id => :srp_username } += f.input :password, :required => true, :validate => true, :input_html => { :id => :srp_password } += f.input :password_confirmation, :required => true, :input_html => { :id => :srp_password_confirmation } \ No newline at end of file diff --git a/users/app/views/users/edit.html.haml b/users/app/views/users/edit.html.haml index 950a3b1..0dcd474 100644 --- a/users/app/views/users/edit.html.haml +++ b/users/app/views/users/edit.html.haml @@ -1,8 +1,7 @@ .span8.offset2 %h2=t :settings - content_for :account do - = user_form_with 'login_field', :legend => :change_login - = user_form_with 'password_fields', :legend => :change_password + = user_form_with 'login_and_password_fields', :legend => :change_login_and_password = render 'cancel_account' if @user == current_user - content_for :email do %legend=t :email_address -- cgit v1.2.3