Mercurial > hg > soundsoftware-site
view .svn/pristine/4d/4d65e1aecdec9bc91bde1f8154262c40f2c88d3a.svn-base @ 1539:22d57b0e0a77 live
OK, this script works now, but it should be using the API
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Thu, 21 May 2015 17:31:06 +0100 |
parents | 261b3d9a4903 |
children |
line wrap: on
line source
<%= title [l(:label_user_plural), users_path], l(:label_user_new) %> <%= labelled_form_for @user do |f| %> <%= render :partial => 'form', :locals => { :f => f } %> <% if email_delivery_enabled? %> <p><label><%= check_box_tag 'send_information', 1, true %> <%= l(:label_send_information) %></label></p> <% end %> <p> <%= submit_tag l(:button_create) %> <%= submit_tag l(:button_create_and_continue), :name => 'continue' %> </p> <% end %> <% if @auth_sources.present? && @auth_sources.any?(&:searchable?) %> <%= javascript_tag do %> observeAutocompleteField('user_login', '<%= escape_javascript autocomplete_for_new_user_auth_sources_path %>', { select: function(event, ui) { $('input#user_firstname').val(ui.item.firstname); $('input#user_lastname').val(ui.item.lastname); $('input#user_mail').val(ui.item.mail); $('select#user_auth_source_id option').each(function(){ if ($(this).attr('value') == ui.item.auth_source_id) { $(this).attr('selected', true); $('select#user_auth_source_id').trigger('change'); } }); } }); <% end %> <% end %>