Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/shared/tokens/_scopes_form.html.haml')
-rw-r--r--app/views/shared/tokens/_scopes_form.html.haml15
1 files changed, 10 insertions, 5 deletions
diff --git a/app/views/shared/tokens/_scopes_form.html.haml b/app/views/shared/tokens/_scopes_form.html.haml
index 33e95446bd7..010376464f1 100644
--- a/app/views/shared/tokens/_scopes_form.html.haml
+++ b/app/views/shared/tokens/_scopes_form.html.haml
@@ -1,9 +1,14 @@
- scopes = local_assigns.fetch(:scopes)
- prefix = local_assigns.fetch(:prefix)
- token = local_assigns.fetch(:token)
+- f = local_assigns.fetch(:f)
-- scopes.each do |scope|
- %fieldset.form-group.form-check
- = check_box_tag "#{prefix}[scopes][]", scope, token.scopes.include?(scope), id: "#{prefix}_scopes_#{scope}", class: "form-check-input", data: { qa_selector: "#{scope}_checkbox" }
- = label_tag "#{prefix}_scopes_#{scope}", scope, class: 'label-bold form-check-label'
- .text-secondary= t scope, scope: scope_description(prefix)
+%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" } }