|
17 | 17 | </p> |
18 | 18 | </div> |
19 | 19 |
|
| 20 | +<% if @errors.any? %> |
| 21 | + <div class="notice is-danger is-filled"> |
| 22 | + <p>Your report could not be saved because:</p> |
| 23 | + <ul> |
| 24 | + <% @errors.each do |msg| %> |
| 25 | + <li><%= msg %></li> |
| 26 | + <% end %> |
| 27 | + </ul> |
| 28 | + </div> |
| 29 | +<% end %> |
| 30 | + |
20 | 31 | <div class="widget"> |
21 | 32 | <%= form_tag create_complaint_path, class: 'widget--body complaint-form' do %> |
22 | 33 | <div class="form-group"> |
23 | 34 | <%= label_tag :report_type, 'What are you reporting?' %> |
24 | 35 | <% @report_types.each do |key, type| %> |
25 | 36 | <div class="form-radio-group"> |
26 | | - <%= radio_button_tag :report_type, key, id: "report_type_#{key}", class: 'form-radio-element' %> |
| 37 | + <%= radio_button_tag :report_type, key, id: "report_type_#{key}", class: 'form-radio-element', |
| 38 | + required: true %> |
27 | 39 | <%= label_tag "report_type_#{key}", type['description'] %> |
28 | 40 | </div> |
29 | 41 | <% end %> |
|
35 | 47 | Enter a URL or link to where we can find this content on our network. You can use the Copy Link button under |
36 | 48 | posts to get a direct link to a post. |
37 | 49 | </div> |
38 | | - <%= text_field_tag :reported_url, nil, class: 'form-element' %> |
| 50 | + <%= text_field_tag :reported_url, nil, class: 'form-element', required: true %> |
39 | 51 | </div> |
40 | 52 |
|
41 | 53 | <div class="form-group hidden js-content-type" data-report-type="illegal"> |
|
63 | 75 | </div> |
64 | 76 |
|
65 | 77 | <div class="form-group"> |
66 | | - <%= label_tag :comment, 'Tell us more' %> |
| 78 | + <%= label_tag :content, 'Tell us more' %> |
67 | 79 | <div class="form-caption" data-report-type="none"> |
68 | 80 | Tell us any additional information you have about this report. |
69 | 81 | </div> |
|
83 | 95 | Tell us any additional information you have about this report. Is there any additional content we removed that |
84 | 96 | you would like to include? Provide detailed reasoning explaining why you disagree with our classification. |
85 | 97 | </div> |
86 | | - <%= text_area_tag :comment, nil, class: 'form-element', rows: 10 %> |
| 98 | + <%= text_area_tag :content, nil, class: 'form-element', required: true, rows: 10 %> |
87 | 99 | </div> |
88 | 100 |
|
89 | 101 | <div class="form-group"> |
90 | | - <%= label_tag :user_email, 'Your email address' %> |
| 102 | + <%= label_tag :email, 'Your email address' %> |
91 | 103 | <div class="form-caption"> |
92 | 104 | This is used for abuse prevention purposes, and to contact you if we need additional information or to update |
93 | 105 | you on the status of your report. If you do not wish to receive further updates about your report, please |
94 | 106 | opt out below. |
95 | 107 | </div> |
96 | | - <%= text_field_tag :user_email, user_signed_in? ? current_user.email : nil, class: 'form-element', |
97 | | - disabled: user_signed_in? %> |
| 108 | + <%= text_field_tag :email, user_signed_in? ? current_user.email : nil, class: 'form-element', |
| 109 | + disabled: user_signed_in?, required: true %> |
98 | 110 | </div> |
99 | 111 |
|
100 | 112 | <div class="form-group"> |
|
0 commit comments