Current section

Files

Jump to
phoenix_oauth2_provider priv boilerplate templates application form.html.eex
Raw

priv/boilerplate/templates/application/form.html.eex

<%%= form_for @changeset, @action, fn f -> %>
<%%= if @changeset.action do %>
<div class="alert alert-danger">
<p>Oops, something went wrong! Please check the errors below.</p>
</div>
<%% end %>
<div class="form-group">
<%%= label f, :name, class: "control-label" %>
<%%= text_input f, :name, class: "form-control" %>
<%%= error_tag f, :name %>
</div>
<div class="form-group">
<%%= label f, :redirect_uri, class: "control-label" %>
<%%= textarea f, :redirect_uri, class: "form-control" %>
<%%= error_tag f, :redirect_uri %>
<span class="help-block">Use one line per URI</span>
<%%= unless is_nil(ExOauth2Provider.Config.native_redirect_uri) do %>
<span class="help-block">
Use <code><%%= ExOauth2Provider.Config.native_redirect_uri %></code> for local tests
</span>
<%% end %>
</div>
<div class="form-group">
<%%= label f, :scopes, class: "control-label" %>
<%%= text_input f, :scopes, class: "form-control" %>
<%%= error_tag f, :scopes %>
<span class="help-block">
Separate scopes with spaces. Leave blank to use the default scopes.
</span>
</div>
<div class="form-group">
<%%= submit "Submit", class: "btn btn-primary" %>
</div>
<%% end %>