diff --git a/app/views/account_share_mailer/account_share.html.erb b/app/views/account_share_mailer/account_share.html.erb index a86e8f93..0d11155b 100644 --- a/app/views/account_share_mailer/account_share.html.erb +++ b/app/views/account_share_mailer/account_share.html.erb @@ -3,5 +3,4 @@

Click the link to approve the share

<%= link_to 'Go and approve the share', accept_account_share_url(token: @account_share.token) %>
- -

Sincerely,

+

Sincerely, <%= [@account_share.user.name, @account_share.user.email].compact.reject(&:empty?).first %>

diff --git a/app/views/account_shares/new.html.erb b/app/views/account_shares/new.html.erb deleted file mode 100644 index 000794e9..00000000 --- a/app/views/account_shares/new.html.erb +++ /dev/null @@ -1,16 +0,0 @@ -
-
- <%= link_to 'Back', account_shares_path, class: 'button is-light' %> -
-
-
-
-<%= form_with url: account_shares_path, method: :post do |form| %> -
- <%= form.label :name %> - <%= form.text_field :name, name: 'account_share[name]', type:"text", class: 'input'%> - <%= form.label :email %> - <%= form.email_field :email, name: 'account_share[email]', type: "email"%> -
- <%= form.submit :Create, class: 'button is-light' %> -<% end %> diff --git a/app/views/account_shares/new.html.slim b/app/views/account_shares/new.html.slim new file mode 100644 index 00000000..52ce512f --- /dev/null +++ b/app/views/account_shares/new.html.slim @@ -0,0 +1,15 @@ +.columns.is-centered + .column.is-one-third + h1.title.is-5.has-text-centered + | Share account: + .subtitle.is-5.has-text-centered + = link_to account.name, account_path(account) + = form_with url: account_shares_path, method: :post do |f| + .field + = f.text_field :name, name: 'account_share[name]', autofocus: true, class: "input", placeholder: "Name" + .field + = f.email_field :email, name: 'account_share[email]', type: "email" + br + div.buttons.is-flex.is-justify-content-flex-end + = link_to 'Back', account_shares_path, class: 'button is-light' + = f.submit "Send invitation", class: 'button is-primary'