Skip to content

Commit

Permalink
feat(shares): update new page (#67)
Browse files Browse the repository at this point in the history
* feat(shares): update new page

update email text

* feat(shares): fix code
  • Loading branch information
andreybakanovsky authored Sep 5, 2023
1 parent a89125a commit 81ca75d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 18 deletions.
3 changes: 1 addition & 2 deletions app/views/account_share_mailer/account_share.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
<p>Click the link to approve the share</p>
<%= link_to 'Go and approve the share', accept_account_share_url(token: @account_share.token) %>
<br>
<!-- TODO: add curent user name -->
<p>Sincerely, </p>
<p>Sincerely, <%= [@account_share.user.name, @account_share.user.email].compact.reject(&:empty?).first %> </p>
16 changes: 0 additions & 16 deletions app/views/account_shares/new.html.erb

This file was deleted.

15 changes: 15 additions & 0 deletions app/views/account_shares/new.html.slim
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit 81ca75d

Please sign in to comment.