mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-03-31 16:55:29 +02:00
mailer now returns a tuple
This commit is contained in:
parent
128fd1e970
commit
d03375c604
2 changed files with 23 additions and 25 deletions
|
@ -3,7 +3,6 @@ defmodule Philomena.Users.UserNotifier do
|
||||||
alias Philomena.Mailer
|
alias Philomena.Mailer
|
||||||
|
|
||||||
defp deliver(to, subject, body) do
|
defp deliver(to, subject, body) do
|
||||||
email =
|
|
||||||
Email.new_email(
|
Email.new_email(
|
||||||
to: to,
|
to: to,
|
||||||
from: mailer_address(),
|
from: mailer_address(),
|
||||||
|
@ -11,8 +10,6 @@ defmodule Philomena.Users.UserNotifier do
|
||||||
text_body: body
|
text_body: body
|
||||||
)
|
)
|
||||||
|> Mailer.deliver_later()
|
|> Mailer.deliver_later()
|
||||||
|
|
||||||
{:ok, email}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
defp mailer_address do
|
defp mailer_address do
|
||||||
|
|
|
@ -200,9 +200,10 @@ defmodule PhilomenaWeb.AppView do
|
||||||
input_opts = Keyword.get(opts, :input_opts, [])
|
input_opts = Keyword.get(opts, :input_opts, [])
|
||||||
label_opts = Keyword.get(opts, :label_opts, [])
|
label_opts = Keyword.get(opts, :label_opts, [])
|
||||||
mapper = Keyword.get(opts, :mapper, &mapper_unwrapped/6)
|
mapper = Keyword.get(opts, :mapper, &mapper_unwrapped/6)
|
||||||
wrapper = Keyword.get(opts, :wrapper, &(&1))
|
wrapper = Keyword.get(opts, :wrapper, & &1)
|
||||||
|
|
||||||
inputs = Enum.map(collection, fn {label_content, value} ->
|
inputs =
|
||||||
|
Enum.map(collection, fn {label_content, value} ->
|
||||||
id = input_id(form, field) <> "_#{value}"
|
id = input_id(form, field) <> "_#{value}"
|
||||||
|
|
||||||
input_opts =
|
input_opts =
|
||||||
|
@ -221,7 +222,7 @@ defmodule PhilomenaWeb.AppView do
|
||||||
|
|
||||||
html_escape(
|
html_escape(
|
||||||
inputs ++
|
inputs ++
|
||||||
hidden_input(form, field, [name: name, value: ""])
|
hidden_input(form, field, name: name, value: "")
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue