Sha256: 8525a49161299a258d99cbb64cd3753f58fa15785cf616ce1a93468e3688ef3d

Contents?: true

Size: 1.91 KB

Versions: 1

Compression:

Stored size: 1.91 KB

Contents

<%= form_tag rodauth.oauth_applications_path, method: :post, class: "form-horizontal" do %>
  <h2>Register Oauth Application</h2>
  <%= rodauth.field_error('scope') %>
  <div class="form-group">
    <%= label_tag "name", "Name" %>
    <%= text_field_tag "name", rodauth.param('name'), class: "form-control#{' is-invalid' if rodauth.field_error('name')}" %>
    <%= rodauth.field_error('name') %>
  </div>
  <div class="form-group">
    <%= label_tag "description", "Description" %>
    <%= text_field_tag "description", rodauth.param('description'), class: "form-control#{' is-invalid' if rodauth.field_error('description')}" %>
    <%= rodauth.field_error('description') %>
  </div>
  <div class="form-group">
    <%= label_tag "homepage_url", "Homepage URL" %>
    <%= text_field_tag "homepage_url", rodauth.param('homepage_url'), class: "form-control#{' is-invalid' if rodauth.field_error('homepage_url')}" %>
    <%= rodauth.field_error('homepage_url') %>
  </div>
  <div class="form-group">
    <%= label_tag "redirect_uri", "Redirect URL" %>
    <%= text_field_tag "redirect_uri", rodauth.param('redirect_uri'), class: "form-control#{' is-invalid' if rodauth.field_error('redirect_uri')}" %>
    <%= rodauth.field_error('redirect_uri') %>
  </div>
  <div class="form-group">
    <%= label_tag "client_secret", "Secret (make it random and at least 32 character-long)" %>
    <%= text_field_tag "client_secret", rodauth.param('client_secret'), class: "form-control#{' is-invalid' if rodauth.field_error('client_secret')}" %>
    <%= rodauth.field_error('client_secret') %>
  </div>
  <% rodauth.oauth_application_scopes.each do |scope| %>
    <div class="form-check">
      <%= check_box_tag "scopes[]", scope, scope == rodauth.oauth_application_default_scope, id: scope, class: "form-check-input" %>
      <%= scope %>
    </div>
  <% end %>
  <div class="form-group">
    <%= submit_tag "Register", class: "btn btn-primary" %>
  </div>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rodauth-oauth-0.7.4 lib/generators/rodauth/oauth/templates/app/views/rodauth/new_oauth_application.html.erb