<h1>Upload new photo</h1>

<%= error_messages_for("photo") %>
<% form_for(:photo, 
            :url => {:action => 'save'}, 
            :html => { :multipart => true }) do |form| %>
    <p>
	 <%= form.label :actor_id,  'For Actor/ Actress:'%><br />
	 <%= form.select :actor_id, 
	 Actor.find(:all, :order => 'last_name').collect {|a| [a.full_name, a.id]} %>
	</p>
    Upload your picture: <%= form.file_field("uploaded_photo") %><br/>
    <hr>
    Description: <%= form.text_field :description %><br/>
  <p>
    Date taken: <%= form.date_select :date_taken, :start_year => 1959 %>
  </p>
    <%= submit_tag("Upload file") %>
<% end %>
<p></p>
<%= link_to "List existing", :controller => "photos", :action => "index" %>