summaryrefslogtreecommitdiff
path: root/app/views/shared/tokens/_scopes_form.html.haml
blob: 010376464f153613b884c011d9c7afb31ede749a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
- 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" } }