summaryrefslogtreecommitdiff
path: root/users/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'users/app/views')
-rw-r--r--users/app/views/emails/_email.html.haml10
-rw-r--r--users/app/views/users/_email_aliases.html.haml2
-rw-r--r--users/app/views/users/edit.html.haml24
3 files changed, 16 insertions, 20 deletions
diff --git a/users/app/views/emails/_email.html.haml b/users/app/views/emails/_email.html.haml
index f182ed9..3feb6f0 100644
--- a/users/app/views/emails/_email.html.haml
+++ b/users/app/views/emails/_email.html.haml
@@ -1,4 +1,6 @@
-%li.pull-right
- %code= email
- %i.icon-remove
-.clearfix
+- if email.valid?
+ %li.pull-right
+ %code= email
+ = link_to(user_email_alias_path(@user, email), :method => :delete) do
+ %i.icon-remove
+ .clearfix
diff --git a/users/app/views/users/_email_aliases.html.haml b/users/app/views/users/_email_aliases.html.haml
index 646480e..121acc4 100644
--- a/users/app/views/users/_email_aliases.html.haml
+++ b/users/app/views/users/_email_aliases.html.haml
@@ -2,5 +2,5 @@
%ul.unstyled
=render @user.email_aliases
.clearfix
-= f.simple_fields_for :email_aliases, Email.new do |e|
+= f.simple_fields_for :email_aliases, @email_alias do |e|
= e.input :email, :placeholder => "alias@#{request.domain}"
diff --git a/users/app/views/users/edit.html.haml b/users/app/views/users/edit.html.haml
index 92ab71b..820b80e 100644
--- a/users/app/views/users/edit.html.haml
+++ b/users/app/views/users/edit.html.haml
@@ -1,17 +1,11 @@
.span8.offset2
%h2=t :settings
- %ul.nav.nav-tabs
- %li.active
- %a{:href => '#account', 'data-toggle' => 'tab'}Account
- %li
- %a{:href => '#email', 'data-toggle' => 'tab'}Email
-
- .tab-content
- .tab-pane.active#account
- = user_form_with 'login_field', :legend => :change_login
- = user_form_with 'password_fields', :legend => :change_password
- = render 'cancel_account' if @user == current_user
- .tab-pane#email
- = user_form_with 'email_field', :legend => :set_email_address
- = user_form_with 'email_forward_field', :legend => :forward_email
- = user_form_with 'email_aliases', :legend => :add_email_alias
+ - 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
+ = user_form_with 'email_field', :legend => :set_email_address
+ = user_form_with 'email_forward_field', :legend => :forward_email
+ = user_form_with 'email_aliases', :legend => :add_email_alias
+ = render 'tabs/tabs', :tabs => [:account, :email]