]> git.openstreetmap.org Git - rails.git/commitdiff
Wrap the permission label with a <label> tag
authorEdward Betts <edward@4angle.com>
Thu, 24 May 2018 11:49:12 +0000 (12:49 +0100)
committerEdward Betts <edward@4angle.com>
Thu, 24 May 2018 14:41:32 +0000 (15:41 +0100)
Gives the user a larger target to toggle a permission.

app/views/oauth/authorize.html.erb

index 3108c551af65054394244d0cb6d393d7917aea4d..efb7de7ec995065294fdf243db2f62a8a988e689 100644 (file)
@@ -12,7 +12,7 @@
   <p><%= t '.allow_to' %></p>
   <ul>
   <% @token.client_application.permissions.each do |perm| %>
-    <li><%= check_box_tag perm.to_s, "yes", @token.read_attribute(perm) %><%= t ".#{perm}" %></li>
+    <li><%= check_box_tag perm.to_s, "yes", @token.read_attribute(perm) %><%= label_tag perm.to_s, t(".#{perm}") %></li>
   <% end %>
   </ul>
   <p><%= submit_tag t(".grant_access") %></p>