Files
danbooru/app/views/bulk_update_requests/_form.html.erb
2019-01-08 12:57:37 -08:00

59 lines
1.9 KiB
Plaintext

<%= simple_form_for(@bulk_update_request) do |f| %>
<%= error_messages_for("bulk_update_request") %>
<% if @bulk_update_request.new_record? %>
<%= f.input :title, :as => :string %>
<% end %>
<div class="input">
<label class="text optional" for="bulk_update_request_script">Script</label>
<%= text_area :bulk_update_request, :script, :size => "50x10" %>
<p><a href="#" id="script-help-link">Help</a></p>
<ul class="hint" id="script-help" title="Bulk Update Request Help">
<li>unalias aaa -> bbb</li>
<li>unimply aaa -> bbb</li>
<li>alias aaa -> bbb</li>
<li>imply aaa -> bbb</li>
<li>update aaa -> bbb</li>
<li>category tag_name -> category_name</li>
</ul>
</div>
<% if @bulk_update_request.new_record? %>
<div class="input">
<%= dtext_field "bulk_update_request", "reason", :name => "Reason" %>
</div>
<% end %>
<% if @bulk_update_request.errors.any? %>
<div class="input">
<label class="checkbox optional" for="bulk_update_request_skip_secondary_validations">
<%= check_box "bulk_update_request", "skip_secondary_validations" %>
Skip validations
</label>
<p class="hint">You can ignore the wiki page and minimum count requirements</p>
</div>
<% end %>
<% if @bulk_update_request.new_record? %>
<%= f.input :forum_topic_id, :hint => " (optional)" %>
<% elsif @bulk_update_request.persisted? && CurrentUser.is_admin? %>
<%= f.input :forum_topic_id %>
<%= f.input :forum_post_id %>
<% end %>
<%= f.button :submit, :value => "Submit" %>
<%= dtext_preview_button "bulk_update_request", "reason" %>
<% end %>
<%= content_for(:html_header) do %>
<script>
$(function() {
$("#script-help").hide();
$("#script-help-link").click(function() {
$("#script-help").dialog({width: "30em"});
return false;
});
});
</script>
<% end %>