<commit_before><%- 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')
                  ])
              ]
%>
    <div class="field"><label for="element_style" class="desc">Style</label>
        <%= select_tag 'element[style]', option_groups_from_collection_for_select(options, 'group', 'label', 'key', 'value', @element.style),
          :onchange => "if(['acceptance', 'yes-no'].include($F('element[style]'))) $('choices_section').hide(); else $('choices_section').show();" %></div>

<%= render 'fe/admin/panels/common_fields', :f => f %>

<div class="choices_section" style="display:<%= ['acceptance', 'yes-no'].include?(@element.style) ? 'none' : 'block' %>">
  <h3>Choices<br/>
  <% showXML = !@element.source.blank? %>
  <a class="link-show-xml" style="font-size: 11px; font-weight: normal; display:<% if showXML -%>none<%else-%>block<%end-%>" href="javascript:void(0);">Use External XML Feed</a>
  <a class="link-show-csv" style="font-size: 11px; font-weight: normal; display:<% if showXML -%>block<%else-%>none<%end-%>" href="javascript:void(0);">Manually Enter Choices</a></h3>

  <div class="csvChoices" style="display:<% if showXML -%>none<%else-%>block<%end-%>">
    <p>
      <label for="element_content" class="desc">Choices (English)</label>
      <%= f.text_area :content, :rows => 6, :cols => 80 %>
    </p>
    <% @page.question_sheet.languages.select(&:present?).each do |language| %>
      <p>
        <label for="element_content_translations_<%= language %>" class="desc">Choices (<%= Fe::LANGUAGES[language] %>)</label>
        <%= text_area_tag "element[content_translations][#{language}]", @element.content_translations[language], :rows => 6, :cols => 80 %>
      </p>
    <% end %>

  </div>

  <p>
    <%= f.check_box :hide_option_labels, :class => 'inlinecheck' %>
    <label for="element_hide_option_labels" class="inline">Hide Option Labels</label>
  </p>
<commit_msg>explain dropdown choices better<commit_after><%- 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')
                  ])
              ]
%>
    <div class="field"><label for="element_style" class="desc">Style</label>
        <%= select_tag 'element[style]', option_groups_from_collection_for_select(options, 'group', 'label', 'key', 'value', @element.style),
          :onchange => "if(['acceptance', 'yes-no'].include($F('element[style]'))) $('choices_section').hide(); else $('choices_section').show();" %></div>

<%= render 'fe/admin/panels/common_fields', :f => f %>

<div class="choices_section" style="display:<%= ['acceptance', 'yes-no'].include?(@element.style) ? 'none' : 'block' %>">
  <h3>Choices<br/>
  <% showXML = !@element.source.blank? %>
  <a class="link-show-xml" style="font-size: 11px; font-weight: normal; display:<% if showXML -%>none<%else-%>block<%end-%>" href="javascript:void(0);">Use External XML Feed</a>
  <a class="link-show-csv" style="font-size: 11px; font-weight: normal; display:<% if showXML -%>block<%else-%>none<%end-%>" href="javascript:void(0);">Manually Enter Choices</a></h3>

  <div class="csvChoices" style="display:<% if showXML -%>none<%else-%>block<%end-%>">
    <p>
    <label for="element_content" class="desc"><%= _('Choices (English) - One choice per line.  To specify a value, split the label and value with a semi-colon, ie. "Value;Label".  The value is what gets displayed on the read-only view.  If no value is specified, the value will default to the choice text.') %></label>
      <%= f.text_area :content, :rows => 6, :cols => 80 %>
    </p>
    <% @page.question_sheet.languages.select(&:present?).each do |language| %>
      <p>
        <label for="element_content_translations_<%= language %>" class="desc">Choices (<%= Fe::LANGUAGES[language] %>)</label>
        <%= text_area_tag "element[content_translations][#{language}]", @element.content_translations[language], :rows => 6, :cols => 80 %>
      </p>
    <% end %>

  </div>

  <p>
    <%= f.check_box :hide_option_labels, :class => 'inlinecheck' %>
    <label for="element_hide_option_labels" class="inline">Hide Option Labels</label>
  </p>

{'fraction_non_alphanumeric': 0.2111665004985045, 'fraction_numerical': 0.0055832502492522435, 'mean_word_length': 3.4745762711864407, 'pattern_counts': {'":': 0, '<': 98, '<?xml version=': 0, '>': 112, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7054607', 'n_tokens_mistral': 1735, 'n_tokens_neox': 1578, 'n_words': 308}