summaryrefslogtreecommitdiff
path: root/users/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'users/app/views')
-rw-r--r--users/app/views/users/_cancel_account.html.haml9
-rw-r--r--users/app/views/users/_login_and_password_fields.html.haml2
-rw-r--r--users/app/views/users/_password_fields.html.haml2
-rw-r--r--users/app/views/users/edit.html.haml25
4 files changed, 23 insertions, 15 deletions
diff --git a/users/app/views/users/_cancel_account.html.haml b/users/app/views/users/_cancel_account.html.haml
index 41580b0..756170b 100644
--- a/users/app/views/users/_cancel_account.html.haml
+++ b/users/app/views/users/_cancel_account.html.haml
@@ -1,6 +1,9 @@
%legend
- =t :cancel_account
- %small You will not be able to login anymore.
+ - if @user == current_user
+ =t :cancel_account
+ %small You will not be able to login anymore.
+ - else
+ =t :admin_cancel_account, :username => @user.login
= link_to user_path(@user), :method => :delete, :class => "btn btn-danger" do
%i.icon-remove.icon-white
- Remove my Account
+ =t :remove_account
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..0baefc7
--- /dev/null
+++ b/users/app/views/users/_login_and_password_fields.html.haml
@@ -0,0 +1,2 @@
+= render :partial => 'login_field', :locals => {:f => f}
+= render :partial => 'password_fields', :locals => {:f => f, :password_confirmation_hint => t(:can_retype_old_password)} \ No newline at end of file
diff --git a/users/app/views/users/_password_fields.html.haml b/users/app/views/users/_password_fields.html.haml
index c2e6a69..47b7b07 100644
--- a/users/app/views/users/_password_fields.html.haml
+++ b/users/app/views/users/_password_fields.html.haml
@@ -1,2 +1,2 @@
= f.input :password, :required => true, :validate => true, :input_html => { :id => :srp_password }
-= f.input :password_confirmation, :required => true, :input_html => { :id => :srp_password_confirmation }
+= f.input :password_confirmation, :required => true, :hint => local_assigns[:password_confirmation_hint], :input_html => { :id => :srp_password_confirmation }
diff --git a/users/app/views/users/edit.html.haml b/users/app/views/users/edit.html.haml
index 950a3b1..4de72f6 100644
--- a/users/app/views/users/edit.html.haml
+++ b/users/app/views/users/edit.html.haml
@@ -1,14 +1,17 @@
.span8.offset2
%h2=t :settings
+ - tabs = []
- content_for :account do
- = user_form_with 'login_field', :legend => :change_login
- = user_form_with 'password_fields', :legend => :change_password
- = render 'cancel_account' if @user == current_user
- - content_for :email do
- %legend=t :email_address
- The associated email address is
- = render @user.email_address, :as => :span
- = user_form_with 'public_key_field', :legend => :public_key
- = user_form_with 'email_forward_field', :legend => :forward_email
- = user_form_with 'email_aliases', :legend => :add_email_alias
- = render 'tabs/tabs', :tabs => [:account, :email]
+ = user_form_with 'login_and_password_fields', :legend => :change_login_and_password if @user == current_user
+ = render 'cancel_account'
+ - tabs << :account
+ - if @user == current_user
+ - content_for :email do
+ %legend=t :email_address
+ =t :associated_email
+ = render @user.email_address, :as => :span
+ = user_form_with 'public_key_field', :legend => :public_key
+ = user_form_with 'email_forward_field', :legend => :forward_email
+ = user_form_with 'email_aliases', :legend => :add_email_alias
+ - tabs << :email
+ = render 'tabs/tabs', :tabs => tabs