gitlab-org--gitlab-foss/app/views/shared/tokens/_scopes_form.html.haml

14 lines
608 B
Text

- scopes = local_assigns.fetch(:scopes)
- prefix = local_assigns.fetch(:prefix)
- token = local_assigns.fetch(:token)
- f = local_assigns.fetch(:f)
%fieldset
- scopes.each do |scope|
- help_text = t scope, scope: scope_description(prefix)
= 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" } }