summaryrefslogtreecommitdiff
path: root/app/views/shared/tokens/_scopes_form.html.haml
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.haml9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/views/shared/tokens/_scopes_form.html.haml b/app/views/shared/tokens/_scopes_form.html.haml
new file mode 100644
index 00000000000..5074afb63a1
--- /dev/null
+++ b/app/views/shared/tokens/_scopes_form.html.haml
@@ -0,0 +1,9 @@
+- scopes = local_assigns.fetch(:scopes)
+- prefix = local_assigns.fetch(:prefix)
+- token = local_assigns.fetch(:token)
+
+- scopes.each do |scope|
+ %fieldset
+ = check_box_tag "#{prefix}[scopes][]", scope, token.scopes.include?(scope), id: "#{prefix}_scopes_#{scope}"
+ = label_tag "#{prefix}_scopes_#{scope}", scope
+ %span= "(#{t(scope, scope: [:doorkeeper, :scopes])})"