<% if is_offer %> <% @challenge.build_offer_restriction unless @challenge.offer_restriction %> <% restriction = @challenge.offer_restriction %> <% else %> <% @challenge.build_request_restriction unless @challenge.request_restriction %> <% restriction = @challenge.request_restriction %> <% end %> <%= challenge_form.fields_for(is_offer ? :offer_restriction : :request_restriction) do |prompt_restriction_form| %>
<% if is_offer %> <%= ts("Offer Settings") %>

<%= ts("Offer Settings") %>

<%= ts("These settings determine what each separate offer can contain. Note these can be entirely different from the request settings!") %>

<% else %> <%= ts("Request Settings") %>

<%= ts("Request Settings") %>

<%= ts("These settings determine what each separate request can contain, and in particular how many different tags of each kind.") %> <% unless type == "prompt_meme" %><%= ts("If you plan to use automated matching, keep in mind it will be slower the more tags you allow people to request.") %><% end %>

<% unless type == "prompt_meme" %>

<%= ts('Checking "Allow Any?" allows users to select "Any" for that field; this means they will match') %> <%= ts("anything") %> <%= ts("put in that field. This option is safer for offers than requests!") %>

<% end %>

<%= ts('If you allow three prompts and specify that fandom "must be unique", the user will have to choose completely different fandoms for all three prompts -- no overlap allowed. Please explain this in your signup instructions!') %>

<% end %>
<% if @challenge.new_record? || !@challenge.collection.prompts.exists? %>

<%= ts("These settings can only be changed until prompts are added.") %>

<% elsif %>

<%= ts("Prompts have been added so these settings can no longer be changed.") %>

<% end %> <% if type == "gift_exchange" %> <%= prompt_restriction_settings(prompt_restriction_form, (is_offer ? false : true), true, (@challenge.new_record? || !@challenge.collection.prompts.exists?)) %> <% else %> <%= prompt_restriction_settings(prompt_restriction_form, (is_offer ? false : true), false, (@challenge.new_record? || !@challenge.collection.prompts.exists?)) %> <% end %>
<% if show_tag_options %>
<%= ts("Tag Options") %>

<%= ts("Tag Options") %> <%= link_to_help("prompt-restriction-tag-set" + (type == "gift_exchange" ? "" : "-promptmeme")) %>

<%= link_to(ts("Tag sets"), tag_sets_path) %> <%= ts("show what tags can be used in your challenge. You can make your own or use any public tag set. Beware: owners can change the contents of their public tag set without warning.") %>

<% unless restriction.owned_tag_sets.empty? %>
<%= prompt_restriction_form.label :tag_sets_to_remove, ts("Current Tag Sets:") %>

<%= ts("Check to remove") %>

<%= checkbox_section(prompt_restriction_form, :tag_sets_to_remove, restriction.owned_tag_sets, :name_method => "title") %>
<% end %>
<%= prompt_restriction_form.label :tag_sets_to_add, ts("Tag Sets To Use:") %>
<%= prompt_restriction_form.text_field :tag_sets_to_add, autocomplete_options("owned_tag_sets") %>
<% TagSet::TAG_TYPES_RESTRICTED_TO_FANDOM.each do |tag_type| %>
<%= ts("%{tag_type} Settings:", tag_type: tag_type_label_name(tag_type)) %> <%= link_to_help("prompt-restriction-character-and-relationship") %>
  • <%= prompt_restriction_form.check_box "#{tag_type}_restrict_to_fandom", :checked => restriction.send("#{tag_type}_restrict_to_fandom") %> <%= prompt_restriction_form.label "#{tag_type}_restrict_to_fandom", ts("Fandom only?") %>
  • <%= prompt_restriction_form.check_box "#{tag_type}_restrict_to_tag_set", :checked => restriction.send("#{tag_type}_restrict_to_tag_set") %> <%= prompt_restriction_form.label "#{tag_type}_restrict_to_tag_set", ts("Tag set fandom only?") %>
<% end %>
<% end %> <% end %>