%- options = [ Fe::OptionGroup.new("Choose One", [ Fe::Option.new("drop-down", "Drop Down"), Fe::Option.new("radio", "Radio Buttons"), Fe::Option.new("rating", "Rating"), Fe::Option.new("acceptance", "Acceptance"), Fe::Option.new("yes-no", "Yes/No"), Fe::Option.new("country", "Country") ]), Fe::OptionGroup.new("Choose Many", [ Fe::Option.new("checkbox", "Checkboxes") ]) ] %>
<% text = prefix == "na" ? "\"Don"t Know\" " : "#{prefix.capitalize} Rating" %> <% label = "(Optional) #{text} Label" %> <%= f.text_field :"rating_#{prefix}_label", maxlength: Fe::Element.max_label_length %>
<% @page.question_sheet.languages.select(&:present?).each do |language| %><% translations_hash = @element.send("rating_#{prefix}_label_translations") || {} %> <%= text_field_tag "element[rating_#{prefix}_label_translations][#{language}]", translations_hash[language] %>
<% end %> <% end %> <% end %><%= f.text_area :content, rows: 6, cols: 80 %>
<% @page.question_sheet.languages.select(&:present?).each do |language| %><%= text_area_tag "element[content_translations][#{language}]", @element.content_translations[language], rows: 6, cols: 80 %>
<% end %><%= f.check_box :hide_option_labels, class: "inlinecheck" %>
<%= f.text_field :source %>
<%= f.text_field :text_xpath %>
<%= f.text_field :value_xpath %>