move to 2.5.5
[anni] / lib / pleroma / web / templates / o_auth / o_auth / _scopes.html.eex
1 <div class="scopes-input">
2   <%= label @form, :scope, Gettext.dpgettext("static_pages", "oauth scopes message", "The following permissions will be granted") %>
3   <div class="scopes">
4     <%= for scope <- @available_scopes do %>
5       <%# Note: using hidden input with `unchecked_value` in order to distinguish user's empty selection from `scope` param being omitted %>
6       <%= if scope in @scopes do %>
7         <div class="scope">
8           <%= checkbox @form, :"scope_#{scope}", value: scope in @scopes && scope, checked_value: scope, unchecked_value: "", name: "authorization[scope][]" %>
9           <%= label @form, :"scope_#{scope}", String.capitalize(scope) %>
10           <%= if scope in @scopes && scope do %>
11             <%= String.capitalize(scope) %>
12           <% end %>
13         </div>
14       <% else %>
15         <%= checkbox @form, :"scope_#{scope}", value: scope in @scopes && scope, checked_value: scope, unchecked_value: "", name: "authorization[scope][]" %>
16       <% end %>
17     <% end %>
18   </div>
19 </div>