Skip to content

Commit

Permalink
Add messages documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
danschultzer committed Mar 15, 2019
1 parent 2e57fe0 commit 1a12d97
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/extensions/email_confirmation/phoenix/messages.ex
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
defmodule PowEmailConfirmation.Phoenix.Messages do
@moduledoc false

@doc """
Flash message to show when email has been confirmed.
"""
def email_has_been_confirmed(_conn), do: "The email address has been confirmed."

@doc """
Flash message to show when email couldn't be confirmed.
"""
def email_confirmation_failed(_conn), do: "The email address couldn't be confirmed."

@doc """
Flash message to show when user is signs in or registers but e-mail is yet
to be confirmed.
"""
def email_confirmation_required(_conn), do: "You'll need to confirm your e-mail before you can sign in. An e-mail confirmation link has been sent to you."

@doc """
Flash message to show when user updates their e-mail and requires
confirmation.
"""
def email_confirmation_required_for_update(_conn), do: "You'll need to confirm the e-mail before it's updated. An e-mail confirmation link has been sent to you."
end
7 changes: 7 additions & 0 deletions lib/extensions/invitation/phoenix/messages.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
defmodule PowInvitation.Phoenix.Messages do
@moduledoc false

@doc """
Flash message to show when an invalid or expired invitation url is used.
"""
def invalid_invitation(_conn), do: "The invitation doesn't exist."

@doc """
Flash message to show when user has been invited and e-mail has been sent.
"""
def invitation_email_sent(_conn), do: "An e-mail with invitation link has been sent."
end
13 changes: 13 additions & 0 deletions lib/extensions/reset_password/phoenix/messages.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
defmodule PowResetPassword.Phoenix.Messages do
@moduledoc false

@doc """
Flash message to show when a reset password e-mail has been sent.
"""
def email_has_been_sent(_conn), do: "An email with reset instructions has been sent to you. Please check your inbox."

@doc """
Flash message to show when a an invalid or expired reset password link is
used.
"""
def invalid_token(_conn), do: "The reset token has expired."

@doc """
Flash message to show when password has been updated.
"""
def password_has_been_reset(_conn), do: "The password has been updated."
end

0 comments on commit 1a12d97

Please sign in to comment.