Skip to content

Commit

Permalink
Merge pull request #12723 from saraycp/render_modal_only_once
Browse files Browse the repository at this point in the history
Render modal only once
  • Loading branch information
hennevogel committed Jun 23, 2022
2 parents 504633f + 6cf9f93 commit f56aea1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/api/app/views/webui/users/tokens/users/index.html.haml
Expand Up @@ -30,10 +30,6 @@
action: token_user_path(token_id: @token.id, id: user.id),
confirmation_text: "Please confirm you want to remove this user #{user.login} from the token." }) do
%i.fa.fa-times-circle.text-danger{ title: 'Remove user from token' }
= render DeleteConfirmationDialogComponent.new(modal_id: 'delete-user-from-token-modal',
method: :delete,
options: { remote: false,
modal_title: 'Do you really want to remove this user?' })
.pt-4
= render(partial: 'webui/users/tokens/users/add_user_to_token_dialog', locals: { token: @token })
= link_to('#', data: { toggle: 'modal', target: '#add-user-to-token-modal' }, id: 'add-user-to-token') do
Expand Down Expand Up @@ -64,13 +60,17 @@
action: token_group_path(token_id: @token.id, id: group.id),
confirmation_text: "Please confirm you want to remove this group '#{group.title}' from the token." }) do
%i.fa.fa-times-circle.text-danger{ title: 'Remove group from token' }
= render DeleteConfirmationDialogComponent.new(modal_id: 'delete-group-from-token-modal',
method: :delete,
options: { remote: false,
modal_title: 'Do you really want to remove this group?' })
.pt-4
= render(partial: 'webui/users/tokens/users/add_group_to_token_dialog', locals: { token: @token })
= link_to('#', data: { toggle: 'modal', target: '#add-group-to-token-modal' }, id: 'add-group-to-token') do
%i.fas.fa-plus-circle.text-primary
Add Group

= render DeleteConfirmationDialogComponent.new(modal_id: 'delete-user-from-token-modal',
method: :delete,
options: { remote: false,
modal_title: 'Do you really want to remove this user?' })
= render DeleteConfirmationDialogComponent.new(modal_id: 'delete-group-from-token-modal',
method: :delete,
options: { remote: false,
modal_title: 'Do you really want to remove this group?' })

0 comments on commit f56aea1

Please sign in to comment.