about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
authornullkal <nullkal@users.noreply.github.com>2017-08-23 22:16:20 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-08-23 15:16:20 +0200
commit80393a23d0a0c296d4356a2a21cf8504435265bf (patch)
tree6d0bdc6c4e0b3d600c6a786c5e66e1e5ba254114 /app/views
parent8d23667536cec65292302774b3816467ad427a32 (diff)
Use checkboxes for application scope setting (#4671)
Diffstat (limited to 'app/views')
-rw-r--r--app/views/settings/applications/_fields.html.haml14
1 files changed, 12 insertions, 2 deletions
diff --git a/app/views/settings/applications/_fields.html.haml b/app/views/settings/applications/_fields.html.haml
index 536f69e04..83297a1ae 100644
--- a/app/views/settings/applications/_fields.html.haml
+++ b/app/views/settings/applications/_fields.html.haml
@@ -7,5 +7,15 @@
 
   %p.hint= t('doorkeeper.applications.help.native_redirect_uri', native_redirect_uri: Doorkeeper.configuration.native_redirect_uri)
 
-.fields-group
-  = f.input :scopes, wrapper: :with_label, label: t('activerecord.attributes.doorkeeper/application.scopes'), hint: t('doorkeeper.applications.help.scopes')
+.field-group
+  = f.input :scopes,
+    label: t('activerecord.attributes.doorkeeper/application.scopes'),
+    collection: Doorkeeper.configuration.scopes,
+    wrapper: :with_label,
+    include_blank: false,
+    selected: f.object.scopes.all,
+    required: false,
+    as: :check_boxes,
+    collection_wrapper_tag: 'ul',
+    item_wrapper_tag: 'li'
+