Commit 69597f5

mo <mo@mokhan.ca>
2018-10-20 20:03:47
allow creation of client with multiple redirect uris
1 parent ca9e8a8
Changed files (2)
app
app/views/my/clients/index.html.erb
@@ -7,14 +7,14 @@
         <thead>
           <th>Client ID</th>
           <th>Name</th>
-          <th>Redirect URI</th>
+          <th>Redirect URIs</th>
         </thead>
         <tbody>
         <% @clients.each do |client| %>
           <tr>
             <td><%= client.to_param %></td>
             <td><%= client.name %></td>
-            <td><%= client.redirect_uri %></td>
+            <td><%= client.redirect_uris.join(',') %></td>
           </tr>
         <% end %>
         </tbody>
app/views/my/clients/new.html.erb
@@ -13,7 +13,7 @@
           </div>
           <div class="form-group">
             <%= form.label :redirect_uris %>
-            <%= form.url_field :redirect_uris, data: { target: 'clients--new.redirect_uris' } %>
+            <%= form.url_field :redirect_uris, data: { target: 'clients--new.redirect_uris' }, multiple: true %>
           </div>
           <%= form.submit t(".enable"), class: 'btn btn-primary', data: { disable_with: 'Saving…' } %>
           <%= link_to t(".cancel"), my_clients_path, class: 'btn' %>