]> cat aescling's git repositories - mastodon.git/commitdiff
Add label for application scopes (#4691)
authorYamagishi Kazutoshi <ykzts@desire.sh>
Fri, 25 Aug 2017 11:03:26 +0000 (20:03 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Fri, 25 Aug 2017 11:03:26 +0000 (13:03 +0200)
* Add label for application scopes

* hint

app/views/settings/applications/_fields.html.haml

index 83297a1ae7e7b9314ac517306706bac4cf1077e7..b21f3cca62b2a717869776b84ca0f05e458c1ddc 100644 (file)
@@ -13,9 +13,9 @@
     collection: Doorkeeper.configuration.scopes,
     wrapper: :with_label,
     include_blank: false,
+    label_method: lambda { |scope| safe_join([scope, content_tag(:span, t("doorkeeper.scopes.#{scope}"), class: 'hint')]) },
     selected: f.object.scopes.all,
     required: false,
     as: :check_boxes,
     collection_wrapper_tag: 'ul',
     item_wrapper_tag: 'li'
-