debian-mirror-gitlab/app/views/shared/tokens/_scopes_form.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
692 B
Text
Raw Normal View History

2017-08-17 22:00:37 +05:30
- scopes = local_assigns.fetch(:scopes)
- prefix = local_assigns.fetch(:prefix)
2022-11-25 23:54:43 +05:30
- description_prefix = local_assigns.fetch(:description_prefix, prefix)
2017-08-17 22:00:37 +05:30
- token = local_assigns.fetch(:token)
2022-06-21 17:19:12 +05:30
- f = local_assigns.fetch(:f)
2017-08-17 22:00:37 +05:30
2022-06-21 17:19:12 +05:30
%fieldset
- scopes.each do |scope|
2022-11-25 23:54:43 +05:30
- help_text = t scope, scope: scope_description(description_prefix)
2022-06-21 17:19:12 +05:30
= f.gitlab_ui_checkbox_component :scopes, scope,
help_text: help_text,
checkbox_options: { checked: token.scopes.include?(scope), id: "#{prefix}_scopes_#{scope}", multiple: true, data: { qa_selector: "#{scope}_checkbox" } },
checked_value: scope,
unchecked_value: nil,
label_options: { data: { qa_selector: "#{scope}_label" } }