if @user.errors.empty? page.call "crm.flip_form", :edit_profile page.call "crm.set_title", :edit_profile, t(:my_profile) page[:welcome_username].replace_html current_user.name page[:profile].replace_html :partial => "user" else page[:edit_profile].replace_html :partial => "profile" page[:edit_profile].visual_effect :shake, :duration => 0.25, :distance => 6 page[:user_email].focus end