1 <%= if get_flash(@conn, :info) do %>
2 <p class="alert alert-info" role="alert"><%= get_flash(@conn, :info) %></p>
4 <%= if get_flash(@conn, :error) do %>
5 <p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p>
8 <h2>Registration Details</h2>
10 <p>If you'd like to register a new account,
12 please provide the details below.</p>
15 <%= form_for @conn, o_auth_path(@conn, :register), [], fn f -> %>
18 <%= label f, :nickname, "Nickname" %>
19 <%= text_input f, :nickname, value: @nickname %>
22 <%= label f, :email, "Email" %>
23 <%= text_input f, :email, value: @email %>
26 <%= submit "Proceed as new user", name: "op", value: "register" %>
31 <p>Alternatively, sign in to connect to existing account.</p>
34 <%= label f, :auth_name, "Name or email" %>
35 <%= text_input f, :auth_name %>
38 <%= label f, :password, "Password" %>
39 <%= password_input f, :password %>
42 <%= submit "Proceed as existing user", name: "op", value: "connect" %>
44 <%= hidden_input f, :client_id, value: @client_id %>
45 <%= hidden_input f, :redirect_uri, value: @redirect_uri %>
46 <%= hidden_input f, :scope, value: Enum.join(@scopes, " ") %>