Files
danbooru/app/views/bulk_update_requests/_form.html.erb
evazion bb0540e1a1 Fix #4747: BUR layout partly broken on iOS.
Move the BUR help text from the <textarea> placeholder attribute to a
<details> tag that embeds the [[help:bur_notice]] wiki page.

Also update some CSS for the <details> tag that was meant to only apply
to the user upgrades page and didn't look good here.
2021-03-05 19:53:42 -06:00

39 lines
1.4 KiB
Plaintext

<%= edit_form_for(@bulk_update_request) do |f| %>
<div class="prose">
<details>
<summary>Help: How to make a bulk update request</summary>
<%= embed_wiki "help:bur_notice" %>
</details>
<p>
<% if @bulk_update_request.new_record? && @bulk_update_request.forum_topic.present? %>
This request will be attached to
<%= link_to "topic ##{@bulk_update_request.forum_topic_id}: #{@bulk_update_request.forum_topic.title}", @bulk_update_request.forum_topic %>.
<%= f.input :forum_topic_id, as: :hidden, input_html: { value: params.dig(:bulk_update_request, :forum_topic_id) } %>
<% elsif @bulk_update_request.new_record? && @bulk_update_request.forum_topic.blank? %>
This request will create a new forum topic. To attach this request to an existing topic, find
the forum topic and click "Request alias/implication" at the top of the page.
<%= f.input :title, label: "Forum Title", as: :string %>
<% end %>
</p>
</div>
<%= f.input :script, label: "Request", as: :text %>
<% if @bulk_update_request.new_record? %>
<div class="input">
<%= f.input :reason, as: :dtext %>
</div>
<% end %>
<% if @bulk_update_request.persisted? && policy(@bulk_update_request).can_update_forum? %>
<%= f.input :forum_topic_id %>
<%= f.input :forum_post_id %>
<% end %>
<%= f.submit value: "Submit" %>
<%= dtext_preview_button "bulk_update_request_reason" %>
<% end %>