Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Welcome email copy changes and canned response API error handlin…
…g [cw-1290] (#7054) Fixes: https://linear.app/chatwoot/issue/CW-1290/minor-ui-issues
- Loading branch information
1 parent
c70367b
commit 7dd1562
Showing
7 changed files
with
42 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 13 additions & 8 deletions
21
app/views/devise/mailer/confirmation_instructions.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,27 @@ | ||
<p>Welcome, <%= @resource.name %>!</p> | ||
<p>Hi <%= @resource.name %>,</p> | ||
|
||
<% account_user = @resource&.account_users&.first %> | ||
<% if account_user&.inviter.present? && @resource.unconfirmed_email.blank? %> | ||
<p><%= account_user.inviter.name %>, with <%= account_user.account.name %>, has invited you to try out <%= global_config['BRAND_NAME'] || 'Chatwoot' %>! </p> | ||
<p><%= account_user.inviter.name %>, with <%= account_user.account.name %>, has invited you to try out <%= global_config['BRAND_NAME'] || 'Chatwoot' %>.</p> | ||
<% end %> | ||
<% if @resource.confirmed? %> | ||
<p>You can login to your account through the link below:</p> | ||
<p>You can login to your <%= global_config['BRAND_NAME'] || 'Chatwoot' %> account through the link below:</p> | ||
<% else %> | ||
<p>You can confirm your account email through the link below:</p> | ||
<p> | ||
Welcome to <%= global_config['BRAND_NAME'] || 'Chatwoot' %>! We have a suite of powerful tools ready for you to explore. Before that we quickly need to verify your email address to know it's really you. | ||
</p> | ||
<p>Please take a moment and click the link below and activate your account.</p> | ||
<% end %> | ||
<% if @resource.unconfirmed_email.present? %> | ||
<p><%= link_to 'Confirm my account', frontend_url('auth/confirmation', confirmation_token: @token) %></p> | ||
<p><%= link_to 'Confirm my account', frontend_url('auth/confirmation', confirmation_token: @token) %></p> | ||
<% elsif @resource.confirmed? %> | ||
<p><%= link_to 'Login to my account', frontend_url('auth/sign_in') %></p> | ||
<p><%= link_to 'Login to my account', frontend_url('auth/sign_in') %></p> | ||
<% elsif account_user&.inviter.present? %> | ||
<p><%= link_to 'Confirm my account', frontend_url('auth/password/edit', reset_password_token: @resource.send(:set_reset_password_token)) %></p> | ||
<p><%= link_to 'Confirm my account', frontend_url('auth/password/edit', reset_password_token: @resource.send(:set_reset_password_token)) %></p> | ||
<% else %> | ||
<p><%= link_to 'Confirm my account', frontend_url('auth/confirmation', confirmation_token: @token) %></p> | ||
<p><%= link_to 'Confirm my account', frontend_url('auth/confirmation', confirmation_token: @token) %></p> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters