-
Notifications
You must be signed in to change notification settings - Fork 715
Expand file tree
/
Copy pathnew.html.erb
More file actions
102 lines (97 loc) · 4.21 KB
/
new.html.erb
File metadata and controls
102 lines (97 loc) · 4.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<!--Descriptive page name, messages and instructions-->
<%= error_messages_for :feedback %>
<h2 class="heading"><%= t(".heading.page_title") %></h2>
<!--/descriptions-->
<!--subnav-->
<h4 class="landmark heading"><%= t(".heading.landmark.reference") %></h4>
<ul class="navigation actions" role="navigation">
<li><%= link_to t(".navigation.faqs"), archive_faqs_path %></li>
<li><%= link_to t(".navigation.release_notes"), admin_posts_path(:tag => 1) %></li>
<li><%= link_to t(".navigation.known_issues"), known_issues_path %></li>
</ul>
<!--/subnav-->
<!--main content-->
<% if @admin_setting.disable_support_form %>
<div class="userstuff">
<%= raw sanitize_field(@admin_setting, :disabled_support_form_text) %>
</div>
<% else %>
<h3 class="heading"><%= t(".heading.instructions") %></h3>
<div class="userstuff">
<p><%= t(".status.current_html",
status_page_link: link_to(t(".status.status_page"), "https://www.otwstatus.org"),
bluesky_link: link_to(t(".status.bluesky"), "https://bsky.app/profile/status.archiveofourown.org"),
tumblr_link: link_to(t(".status.tumblr"), "https://ao3org.tumblr.com")) %></p>
<p><%= t(".abuse.reports_html", contact_link: link_to(t(".abuse.contact"), new_abuse_report_path)) %></p>
<p><%= t(".reportable.intro") %></p>
<ul>
<li><%= t(".reportable.fnok.concerning_html", fnok_link: link_to(t(".reportable.fnok.fnok"), archive_faq_path("fannish-next-of-kin"))) %></li>
<li><%= t(".reportable.bugs") %></li>
<li><%= t(".reportable.site_questions") %></li>
<li><%= t(".reportable.account_creation") %></li>
<li><%= t(".reportable.lost_access") %></li>
<li><%= t(".reportable.tag_changes") %></li>
<li><%= t(".reportable.new_features") %></li>
<li><%= t(".reportable.orphaned_works") %></li>
<li><%= t(".reportable.work_problems") %></li>
<li><%= t(".reportable.policy_questions") %></li>
</ul>
<p><%= t(".do_not_spam_html") %></p>
<p><%= t(".languages_html", list_html: to_sentence(@support_languages.map { |language| tag.span(language.name, lang: language.short) })) %></p>
</div>
<%= form_for(@feedback, html: {class: "post feedback"}) do |f| %>
<fieldset>
<legend><%= t(".form.legend.contact_info") %></legend>
<dl>
<dt><%= f.label :username, t(".form.name.label") %></dt>
<dd>
<%= f.text_field :username %>
</dd>
<dt class="required"><%= f.label :email, t(".form.email.label") %></dt>
<dd class="required">
<%= f.text_field :email, size: 60 %>
</dd>
</dl>
</fieldset>
<fieldset>
<legend><%= t(".form.legend.feedback") %></legend>
<%= f.hidden_field :referer %>
<dl>
<dt class="required">
<%= f.label :language, t(".form.language.label") %>
</dt>
<dd class="required">
<%= f.select(:language, language_options_for_select(@support_languages, "name"),
{ selected: @feedback.language || Language.default.name }) %>
</dd>
<dt class="required">
<%= f.label :summary, t(".form.summary.label") %>
</dt>
<dd class="required">
<%= f.text_field :summary, size: 60, class: "observe_textlength" %>
<%= generate_countdown_html("feedback_summary", ArchiveConfig.FEEDBACK_SUMMARY_MAX_DISPLAYED) %>
<%= live_validation_for_field("feedback_summary",
failureMessage: t(".form.summary.error")) %>
</dd>
<dt class="required">
<%= f.label :comment, t(".form.comment.label") %>
</dt>
<dd class="required">
<p id="comment-field-description">
<%= t(".form.comment.description") %>
</p>
<%= f.text_area :comment, cols: 60, "aria-describedby" => "comment-field-description" %>
<%= live_validation_for_field("feedback_comment",
failureMessage: t(".form.comment.error")) %>
</dd>
</dl>
</fieldset>
<fieldset>
<legend><%= t(".form.legend.send") %></legend>
<p class="submit actions">
<%= f.submit t(".form.submit.active"), data: { disable_with: t(".form.submit.disabled") } %>
</p>
</fieldset>
<% end %>
<% end %>
<!--/content-->