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.haml11
-rw-r--r--users/app/views/users/_email_aliases.html.haml2
2 files changed, 7 insertions, 6 deletions
diff --git a/users/app/views/emails/_email.html.haml b/users/app/views/emails/_email.html.haml
index f5eb2d0..3feb6f0 100644
--- a/users/app/views/emails/_email.html.haml
+++ b/users/app/views/emails/_email.html.haml
@@ -1,5 +1,6 @@
-%li.pull-right
- %code= email
- = link_to(user_email_alias_path(@user, email), :method => :delete) do
- %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}"