comfycamp/lib/comfycamp_web/controllers/oidc_uri_html.ex

27 lines
671 B
Elixir
Raw Normal View History

defmodule ComfycampWeb.OIDCRedirectURIHTML do
use ComfycampWeb, :html
def new(assigns) do
~H"""
<div>
<.header>Новый redirect URI</.header>
<.uri_form changeset={@changeset} action={~p"/admin/oidc_apps/#{@oidc_app}/redirect_uris"} />
</div>
"""
end
def uri_form(assigns) do
~H"""
<.simple_form :let={f} for={@changeset} action={@action}>
<.error :if={@changeset.action}>
Что-то пошло не так
</.error>
<.input field={f[:uri]} type="url" label="Redirect URI" />
<:actions>
<.button>Сохранить</.button>
</:actions>
</.simple_form>
"""
end
end