To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / app / views / users / new.html.erb @ 1531:ae8145b28b2b
History | View | Annotate | Download (1.14 KB)
| 1 |
<%= title [l(:label_user_plural), users_path], l(:label_user_new) %>
|
|---|---|
| 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 %>
|