<p>
<b>Submit data to project '<%= @project.name -%>':</b>
</p>
<%= start_form_tag({:action => 'upload'}, :multipart => true) %>

  <p><label for="project_upload_url">Upload from URL</label><br/>
  <%= text_field_tag 'upload_url', "http://", :size => 40 %><br/>

  <p><label for="project_upload_file">or Upload a local file</label><br/>
  <%= file_field_tag 'upload_file', :size => 25 %><br/>

  <% if @ftpList.length > 0 %>

    <p><label for="project_upload_ftp">
    or Choose a file from your <%= link_to 'FTP', '/help.html#ftpHelp' -%> space</label>
    <A HREF=<%= @ftpUrl -%>> <%= @ftpUrl -%></A><br/>
    <select id="ftp" name="ftp">
       <option selected></option>
       <% @ftpList.each do |file| %>
         <option><%= file %></option>
       <% end %>
    </select>
    <br/>

  <% else %>
    <% 
    ftpServer = "#{ActiveRecord::Base.configurations[RAILS_ENV]['ftpServer']}"
    ftpPort = "#{ActiveRecord::Base.configurations[RAILS_ENV]['ftpPort']}"
    ftpText = "ftp #{ftpServer}"
    if ftpPort != "21" 
      ftpText += " #{ftpPort}"
    end
    %>

    <p><label for="project_upload_ftp">
    or Upload your archive to your <%= link_to 'FTP', '/help.html#ftpHelp' -%> space</label>
    using your same login and password.<br/>
    &nbsp;&nbsp;&nbsp;<A HREF=<%= @ftpUrl -%>> <%= ftpText -%></A><br/>  
    Then <%= link_to 'refresh', {:action => 'upload', :id => @project.id} -%>.

  <% end %>

  <br/><br/>
  <%= check_box 'allow_reloads', '0' %>Allow reloading of a currently-loaded table (not recommended in most cases)<br/>

  <table cellpadding=0 cellspacing=0><tr>
  <td><%= submit_tag @autoUploadLabel %></td>
  <td><%= submit_tag "Cancel" %></td>
  </tr></table>
<%= end_form_tag -%>
<p>
Use 'Submit' to upload and expand the archive, validate the data and metadata, <br/>
and load the data to the database.
</p>
<p>
The compressed archive file must have one of these extensions: <br/>
.zip, .tar.gz, .tgz, .tar.bz2 <br/>
</p>
