1 <p class="alert alert-info" role="alert"><%= get_flash(@conn, :info) %></p>
2 <p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p>
3 <h2>OAuth Authorization</h2>
4 <%= form_for @conn, o_auth_path(@conn, :authorize), [as: "authorization"], fn f -> %>
5 <%= label f, :name, "Name or email" %>
6 <%= text_input f, :name %>
9 <%= label f, :password, "Password" %>
10 <%= password_input f, :password %>
14 <%= label f, :scope, "Permissions" %>
16 <%= for scope <- @scopes do %>
17 <%= checkbox f, :"scopes_#{scope}", value: scope, checked_value: scope, unchecked_value: "", name: "authorization[scopes][]" %>
18 <%= label f, :"scopes_#{scope}", String.capitalize(scope) %>
22 <%= hidden_input f, :client_id, value: @client_id %>
23 <%= hidden_input f, :response_type, value: @response_type %>
24 <%= hidden_input f, :redirect_uri, value: @redirect_uri %>
25 <%= hidden_input f, :state, value: @state%>
26 <%= submit "Authorize" %>