1 <div class="modal-body">
2 <% uuid = @object.uuid %>
3 <% disable_email = @object.uuid? %>
4 <% identity_url_prefix = @current_selections[:identity_url_prefix] %>
5 <% selected_repo = @current_selections[:repo_name] %>
6 <% selected_vm = @current_selections[:vm_uuid] %>
8 <%= form_tag setup_user_url(id: uuid), {id: 'setup_form', name: 'setup_form', method: 'get', class: 'form-search', remote: true, onSubmit: "validate(); return false;"} do %>
12 <% if disable_email %>
14 <td> <input id="email" maxlength="250" name="email" type="text" value="<%=@object.email%>" disabled=<%=disable_email%> > </td>
17 <td> <input id="email" maxlength="250" name="email" type="text" > </td>
21 <% if disable_email %>
22 <td> Identity URL Prefix </td>
23 <td> <input id="openid_prefix" maxlength="250" name="openid_prefix" type="text" value="<%=identity_url_prefix%>" disabled=<%=disable_email%> > </td>
25 <td> Openid Prefix </td>
26 <td> <input id="openid_prefix" maxlength="250" name="openid_prefix" type="text" value="https://www.google.com/accounts/o8/id"> </td>
30 <td> Repository Name </td>
31 <td> <input id="repo_name" maxlength="250" name="repo_name" type="text" value="<%=selected_repo%>">
34 <td> Virtual Machine </td>
36 <select name="vm_uuid">
37 <% @vms.each do |vm| %>
38 <% if selected_vm == vm.uuid %>
39 <option value=<%=vm.uuid%> selected> <%=vm.hostname%> </option>
41 <option value=<%=vm.uuid%> > <%=vm.hostname%> </option>
50 <button type="submit" id="register" class="btn btn-primary" autofocus>Submit</button>
51 <button class="btn btn-primary" data-dismiss="modal" aria-hidden="true">Cancel</button>
57 var $input = $('input:text'),
58 $register = $('#register');
59 $register.attr('disabled', true);
61 $input.keyup(function() {
63 $input.each(function() {
68 trigger ? $register.attr('disabled', true) : $register.removeAttr('disabled');