<h1><%= @survey.title %> <%= t('survey.set_answers') %></h1>

<%= form_for @survey, :url => panel_survey_back_end_survey_path(@survey), :html => {:class => 'clear'} do |f| %>
  <div id="post-body">
    <div id="post-body-content" class="clear">
      <div class="type">
        <%= f.label :result_type, t('survey.result_type')%> 
        <%= f.select :result_type, {
          t('survey.chart') => Survey::ResultChart, 
          t('survey.extern_link') => Survey::ResultExtern,
          t('survey.upload_file') => Survey::ResultFile
        }, {}, :class => "tinput-medium" %>      
      </div>
      <div class="extern_link">
        <%= f.label :extern_link, t('survey.extern_link') %>
        <%= f.text_field :extern_link, :style=>"width:98%;", :class=>'post-extern_link' %>
      </div>
      <div class="upload_file">
        <%= f.label :upload_file, t('survey.upload_file') %>
        <%= f.file_field :upload_file %>
        <% if @survey.upload_file? %>
          <%= link_to t(:view), @survey.upload_file.url, {:class => 'for_preview btn', :target => '_blank', :title => t(:view), "data-trigger" => :hover} %>
          <%= f.label :remove_upload_file, t('survey.remove_upload_file')%> 
          <%= f.check_box :remove_upload_file %>
        <% end %>
      </div>
      <div class="form-actions">
        <%= hidden_field_tag 'page', params[:page] if !params[:page].blank? %>
        <%= f.submit t('submit'), :class=>'btn btn-primary' %>
        <%= link_to t('cancel'), get_go_back, :class=>"btn" %> 
      </div>
    </div>
  </div>
<% end %>