]> git.openstreetmap.org Git - rails.git/blob - app/views/issues/new.html.erb
Proper implementation of report strings + cleaning up
[rails.git] / app / views / issues / new.html.erb
1 <% content_for :heading do %>
2     <h1>Report <%= reportable_url(@issue.reportable) %></h1>
3 <% end %>
4
5 <%= form_for(@issue) do |f| %>
6     <%= f.error_messages %>
7         <fieldset>
8             <div class='form-row'>
9                 <%= f.hidden_field :reportable_id %>
10                 <%= f.hidden_field :reportable_type %>
11                 <%= f.hidden_field :reported_user_id %>
12             </div>
13
14             <div class='form-row'>
15                 <p>Select one (or more) reasons for your report:</p>
16
17                 <% @report_strings_yaml.each do |k,v| %>
18                     <div class="new-report-form">
19                         <div class="new-report-checkbox">
20                         <%= check_box_tag k.to_sym, v[:type].to_s %>
21                         </div>
22                         <div class="new-report-string">
23                             <%= label_tag v[:details].to_s %> <br/>
24                         </div>
25                     </div>
26                     <br/>
27                 <% end %> 
28                 
29                 <label class="standard-label"><b><%= t 'issue.new.message' -%>: </b></label> <br/>
30                 <%= text_area :report, :details, :cols => 80, :rows => 20, placeholder: t('issues.new.details'), required: true %>
31             </div>
32
33             <div class='buttons'>
34                 <%= submit_tag %>
35             </div>
36         
37         </fieldset>
38 <% end %>