Virtual machines in a dropdown option in setup popup
[arvados.git] / apps / workbench / app / views / users / _setup_popup.html.erb
1   <div class="modal-header">
2     <h3 id="myModalLabel">Information you had already provided is prefilled for you. You may change it as needed.</h3>
3   </div>
4
5   <div class="modal-body">
6     <%= uuid = @object.uuid %>
7     <%= disable_email = @object.uuid? %>
8     <%= form_tag setup_user_url(id: uuid), method: 'get', remote: true, class: 'form-search' do %>    
9       <div>
10         <table><tbody>
11           <tr>
12             <% if disable_email %>
13               <td> Email : </td>
14               <td> <input id="email" maxlength="250" name="email" type="text" disabled=<%=disable_email%> > </td>
15             <% else %>
16               <td> Email : </td>
17               <td> <input id="email" maxlength="250" name="email" type="text" > </td>
18             <% end %>
19           </tr>
20           <tr>
21             <% if disable_email %>
22               <td> Openid Prefix : </td>
23               <td> <input id="openid_prefix" maxlength="250" name="openid_prefix" type="text" disabled=<%=disable_email%> > </td>
24             <% else %>
25               <td> Openid Prefix : </td>
26               <td> <input id="openid_prefix" maxlength="250" name="openid_prefix" type="text"> </td>
27             <% end %>
28           </tr>
29           <tr>
30             <td> Repository Name : </td>
31             <td> <input id="repo_name" maxlength="250" name="repo_name" type="text">
32           </tr>
33           <tr>
34             <td> Virtual Machine : </td>
35             <td>
36               <select name="vm_uuid">
37                 <% @vms.each do |vm| %>
38                   <option value=<%=vm.uuid%> > <%=vm.hostname%> </option>
39                 <% end %>
40               </select>
41             </td>
42           </tr>
43         </tbody></table>
44       </div>
45       <div align="left">
46         <button type="submit" class="btn">Submit</button>
47         <button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
48       </div>
49     <% end %>
50   </div>