Migrate form_tag to form_with in admin and auth views (#30692)

This commit is contained in:
Matt Jankowski 2024-06-14 05:49:10 -04:00 committed by GitHub
parent a7264a2b42
commit 8d5ed19c6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 122 additions and 69 deletions

View file

@ -21,18 +21,31 @@
= t(scope.access, scope: [:doorkeeper, :grouped_scopes, :access])
.actions
= form_tag oauth_authorization_path, method: :post do
= hidden_field_tag :client_id, @pre_auth.client.uid
= hidden_field_tag :redirect_uri, @pre_auth.redirect_uri
= hidden_field_tag :state, @pre_auth.state
= hidden_field_tag :response_type, @pre_auth.response_type
= hidden_field_tag :scope, @pre_auth.scope
= button_tag t('doorkeeper.authorizations.buttons.authorize'), type: :submit
= form_with url: oauth_authorization_path do |form|
= form.hidden_field :client_id,
value: @pre_auth.client.uid
= form.hidden_field :redirect_uri,
value: @pre_auth.redirect_uri
= form.hidden_field :state,
value: @pre_auth.state
= form.hidden_field :response_type,
value: @pre_auth.response_type
= form.hidden_field :scope,
value: @pre_auth.scope
= form.button t('doorkeeper.authorizations.buttons.authorize'),
type: :submit
= form_tag oauth_authorization_path, method: :delete do
= hidden_field_tag :client_id, @pre_auth.client.uid
= hidden_field_tag :redirect_uri, @pre_auth.redirect_uri
= hidden_field_tag :state, @pre_auth.state
= hidden_field_tag :response_type, @pre_auth.response_type
= hidden_field_tag :scope, @pre_auth.scope
= button_tag t('doorkeeper.authorizations.buttons.deny'), type: :submit, class: 'negative'
= form_with url: oauth_authorization_path, method: :delete do |form|
= form.hidden_field :client_id,
value: @pre_auth.client.uid
= form.hidden_field :redirect_uri,
value: @pre_auth.redirect_uri
= form.hidden_field :state,
value: @pre_auth.state
= form.hidden_field :response_type,
value: @pre_auth.response_type
= form.hidden_field :scope,
value: @pre_auth.scope
= form.button t('doorkeeper.authorizations.buttons.deny'),
type: :submit,
class: 'negative'