To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / .svn / pristine / 19 / 190f7780ebda85c20bf409af3fa0689d0dd1bde4.svn-base @ 1298:4f746d8966dd

History | View | Annotate | Download (1.16 KB)

1 1295:622f24f53b42 Chris
<h2><%= link_to l(:label_user_plural), users_path %> &#187; <%=l(:label_user_new)%></h2>
2
3
<%= labelled_form_for @user do |f| %>
4
  <%= render :partial => 'form', :locals => { :f => f } %>
5
  <% if email_delivery_enabled? %>
6
  <p><label><%= check_box_tag 'send_information', 1, true %> <%= l(:label_send_information) %></label></p>
7
  <% end %>
8
  <p>
9
    <%= submit_tag l(:button_create) %>
10
    <%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
11
  </p>
12
<% end %>
13
14
<% if @auth_sources.present? && @auth_sources.any?(&:searchable?) %>
15
  <%= javascript_tag do %>
16
    observeAutocompleteField('user_login', '<%= escape_javascript autocomplete_for_new_user_auth_sources_path %>', {
17
      select: function(event, ui) {
18
        $('input#user_firstname').val(ui.item.firstname);
19
        $('input#user_lastname').val(ui.item.lastname);
20
        $('input#user_mail').val(ui.item.mail);
21
        $('select#user_auth_source_id option').each(function(){
22
          if ($(this).attr('value') == ui.item.auth_source_id) {
23
            $(this).attr('selected', true);
24
            $('select#user_auth_source_id').trigger('change');
25
          }
26
        });
27
      }
28
    });
29
  <% end %>
30
<% end %>