<% page_title "Edit user: #{h @user.label}" %> <%= form_for(@user, :html => {:multipart => true}) do |f| %> <%= f.error_messages %> <%= hidden_field_tag :require_complete_profile, true if params[:require_complete_profile] %> <% if admin? %>
<% end %> <% if admin? || can_edit?(@user) %>
<%= f.text_field :email, :class => "form-control" %>
<% end %>
<%= f.text_field :first_name, :class => "form-control" %>
<%= f.text_field :last_name, :class => "form-control" %>
<%= f.text_field :affiliation, :class => "form-control" %>
<%= f.text_field :website, :class => "form-control" %>
<%= f.text_field :blog_url, :class => "form-control" %>
<%= f.text_field :twitter, :class => "form-control" %>
<%= f.text_field :identica, :class => "form-control" %>
<%= image_tag @user.photo.url(:avatar) if @user.photo.file? %> <%= f.file_field :photo %>
(<%= display_textile_help_link %>) <%= f.text_area :biography, :class => "form-control" %>
<%= f.submit("Save my profile", :class => "btn btn-primary") %> <%= f.submit("Complete my speaker profile...", :name => :require_complete_profile, :class => "btn btn-default") unless @user.complete_profile? %> <%= link_to "Cancel", @user, :class => "btn btn-default" %> <% if admin? %> <%= link_to "Delete", @user, :method => :delete, :data => { :confirm => "Delete user #{h @user.label}?" }, :class => "btn btn-danger pull-right" %> <% end %>

<%= required_field %> Fields marked with a red asterisk required and must be filled.

<% end %>