lib/generators/rodauth/oauth/templates/app/views/rodauth/new_oauth_application.html.erb in rodauth-oauth-0.7.4 vs lib/generators/rodauth/oauth/templates/app/views/rodauth/new_oauth_application.html.erb in rodauth-oauth-0.8.0

- old
+ new

@@ -1,38 +1,50 @@ +<h2><%= rodauth.new_oauth_application_page_title %></h2> <%= 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" %> + <%= label_tag "name", rodauth.oauth_applications_name_label %> <%= 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" %> + <%= label_tag "description", rodauth.oauth_applications_description_label %> <%= 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')}" %> + <%= label_tag "homepage_url", rodauth.oauth_applications_homepage_url_label %> + <%= text_field_tag "homepage_url", rodauth.param('homepage_url'), id: "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')}" %> + <%= label_tag "redirect_uri", rodauth.oauth_applications_redirect_uri_label %> + <%= text_field_tag "redirect_uri", rodauth.param('redirect_uri'), id: "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')}" %> + <%= label_tag "client_secret", rodauth.oauth_applications_client_secret_label %> + <%= text_field_tag "client_secret", rodauth.param('client_secret'), id: "client-secret", class: "form-control#{' is-invalid' if rodauth.field_error('client_secret')}" %> <%= rodauth.field_error('client_secret') %> </div> + <% if rodauth.features.include?(:oauth_jwt) %> + <div class="form-group"> + <%= label_tag "jws_jwk", rodauth.oauth_applications_jws_jwk_label %> + <%= text_field_tag "jws_jwk", rodauth.param('jws_jwk'), id: "jws-jwk", class: "form-control#{' is-invalid' if rodauth.field_error('jws_jwk')}" %> + <%= rodauth.field_error('jws_jwk') %> + </div> + <div class="form-group"> + <%= label_tag "jwt_public_key", rodauth.oauth_applications_jwt_public_key_label %> + <%= text_field_tag "jwt_public_key", rodauth.param('jwt_public_key'), id: "jwt-public-key", class: "form-control#{' is-invalid' if rodauth.field_error('jwt_public_key')}" %> + <%= rodauth.field_error('jwt_public_key') %> + </div> + <% end %> <% 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" %> + <%= submit_tag rodauth.oauth_application_button, class: "btn btn-primary" %> </div> <% end %> \ No newline at end of file