- var emailRegExp = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
- var validEmail = false;
- if (emailRegExp.test(email_value )) {
- validEmail = true;
- }
-
- if ((email_disabled == false) && (!validEmail || email_value == null ||
- email_value == "" || prefix_value == null || prefix_value == "")){
- trigger = true;
- }
-
- trigger ? $register.attr('disabled', true) : $register.removeAttr('disabled');
- });
+ <input id="user_uuid" maxlength="250" name="user_uuid" type="hidden" value="<%=uuid%>">
+ <div class="form-group">
+ <label for="email">Email</label>
+ <% if disable_email %>
+ <input class="form-control" id="email" maxlength="250" name="email" type="text" value="<%=email%>" disabled>
+ <% else %>
+ <input class="form-control" id="email" maxlength="250" name="email" type="text">
+ <% end %>
+ </div>
+ <div class="form-group">
+ <label for="openid_prefix">Identity URL Prefix</label>
+ <% if disable_url_prefix %>
+ <input class="form-control" id="openid_prefix" maxlength="250" name="openid_prefix" type="text"
+ value="<%=identity_url_prefix%>" disabled=true>
+ <% else %>
+ <input class="form-control" id="openid_prefix" maxlength="250" name="openid_prefix" type="text"
+ value="<%= Rails.configuration.default_openid_prefix %>">
+ <% end %>
+ </div>
+ <div class="form-group">
+ <label for="vm_uuid">Virtual Machine</label>
+ <select class="form-control" name="vm_uuid">
+ <option value="" <%= 'selected' unless selected_vm %>>
+ Choose One:
+ </option>
+ <% @vms.each do |vm| %>
+ <option value="<%=vm.uuid%>"
+ <%= 'selected' if selected_vm == vm.uuid %>>
+ <%= vm.hostname %>
+ </option>
+ <% end %>
+ </select>
+ </div>
+ <div class="groups-group">
+ <label for="groups">Groups for virtual machine (comma separated list)</label>
+ <input class="form-control" id="groups" maxlength="250" name="groups" type="text" value="<%=groups%>">
+ </div>
+ </div>