<%= link_to(l(:button_back), { :controller => 'admin', :action => 'projects', :status => '' }, :class => 'icon icon-cancel') %>
<%= f.select(:redirect_type, options_for_select([ [ l(:label_no_redirect), 'no_redirect' ],
[ l(:label_redirect_to_url), 'to_url' ],
[ l(:label_redirect_to_redmine), 'to_redmine' ] ],
@redirect ? @redirect.redirect_type : 'no_redirect'), {},
:onchange => "toggle_redirect_form_visibility(this.value);") %>
<%= f.text_field(:url, :size => 80) %>
<%= l(:sample_redirect_url) %>
<%= f.text_field(:base_url, :size => 80) %>
<%= l(:sample_redirect_base_url) %> (<%= l(:hint_project_name_same) %>)
<%= f.text_field(:delay, :size => 5) %>
<%= l(:label_seconds) %> (<%= l(:hint_redirect_delay) %>)
<%= f.text_area(:message, :cols => 80, :rows => 10, :class => 'wiki-edit', :accesskey => accesskey(:edit)) %>
<%= submit_tag(l(:button_save)) %>
<% if defined? link_to_remote %>
<%= link_to_remote(l(:label_preview), { :url => { :action => 'preview', :id => @project },
:method => 'post',
:update => 'preview',
:with => "Form.serialize('project-redirect-form')",
:complete => "Element.scrollTo('preview')"
}, :accesskey => accesskey(:preview)) %>
<% else %>
<%= preview_link({ :action => 'preview', :id => @project }, 'project-redirect-form') %>
<% end %>
<%= wikitoolbar_for('redirect_message') %>
<%= javascript_tag("toggle_redirect_form_visibility('#{@redirect ? @redirect.redirect_type : 'no_redirect'}');")%>
<% end %>
<%= form if Rails::VERSION::MAJOR >= 3 %>