2011-02-01 09:57:29 +08:00
<% define_content :link do %>
2013-02-19 05:35:51 +08:00
<%= HostUrl.protocol %>://<%= HostUrl.context_host(((asset.pseudonym || asset.user.pseudonym).account rescue nil)) %>/login
2011-02-01 09:57:29 +08:00
<% end %>
<% define_content :subject do %>
2011-07-01 02:35:34 +08:00
<%= t('subject', 'Forgot Password: Canvas') %>
2011-02-01 09:57:29 +08:00
<% end %>
2013-12-04 07:00:14 +08:00
<% pseudonyms = asset.user.all_active_pseudonyms %>
<% first_pseudonym = pseudonyms.first %>
2011-07-01 02:35:34 +08:00
<%= t('requested_password_reset', 'You requested a confirmation of your password for logging into Canvas.') %>
2013-12-04 07:00:14 +08:00
<% if pseudonyms.length > 1 %><%= before_label('associated_with_accounts', 'This address is associated with the following accounts') %>
2011-02-01 09:57:29 +08:00
2013-12-04 07:00:14 +08:00
<% pseudonyms.each do |p| %>
2011-07-01 02:35:34 +08:00
- <%= t('login_at_account', '%{login_email} at %{account_name}', :login_email => p.unique_id, :account_name => p.account.display_name) %>
<% if p.managed_password? %><%= t('login_managed_by_account', "this login's credentials are managed by %{account_name}", :account_name => p.account.name) %><% else %><%= before_label('change_password_at', "change this login's password at") %>
2013-02-19 05:35:51 +08:00
<%= HostUrl.protocol %>://<%= HostUrl.context_host((p.account rescue nil)) %>/pseudonyms/<%= p.id %>/change_password/<%= (p.communication_channel || asset).confirmation_code %><% end %>
2011-02-01 09:57:29 +08:00
<% end %>
<% else %>
2013-12-04 07:00:14 +08:00
<%= t('associated_login', 'This address is associated with the login, "%{login_identifier}".', :login_identifier => first_pseudonym.unique_id) %><% if first_pseudonym.managed_password? %> <%= t('password_from_account', "The password for this login should have been given to you by the system administrators at %{account_name}, and Instructure doesn't have access to your password. If your password is not working, please contact the system administrators about changing or verifying your password.", :account_name => first_pseudonym.account.display_name) %><% else %>
2011-02-01 09:57:29 +08:00
2011-07-01 02:35:34 +08:00
<%= before_label('click_to_reset', 'To set a new password, please click the following link') %>
2013-12-04 07:00:14 +08:00
<%= HostUrl.protocol %>://<%= HostUrl.context_host((first_pseudonym.account rescue nil)) %>/pseudonyms/<%= first_pseudonym.id %>/change_password/<%= asset.confirmation_code %><% end %>
2011-02-01 09:57:29 +08:00
<% end %>