<commit_before>[% PROCESS 'admin/report_blocks.html'; # For the report state dropdown %]
[% permissions = c.user.permissions(c, problem.bodies_str) %]
[% second_column = BLOCK -%]
  <div id="side-report-secondary">
    <div class="problem-inspector-fields clearfix">
      [% INCLUDE 'errors.html' %]

      <form id="report_inspect_form" method="post" action="[% c.uri_for( '/report', problem.id, 'inspect' ) %]">
        <p class="left">
          <label for="problem_id">[% loc('Report ID:') %]</label>
          <input type="text" readonly id="problem_id" value="[% problem.id %]">
        </p>

[% IF permissions.report_edit_priority OR permissions.report_inspect %]
        <p class="right">
          <label for="problem_priority">[% loc('Priority:') %]</label>
          <select name="priority" id="problem_priority">
            <option value="" [% 'selected' UNLESS problem.response_priority_id %]>-</option>
            [% FOREACH priority IN problem.response_priorities %]
              <option value="[% priority.id %]" [% 'selected' IF problem.response_priority_id == priority.id %] [% 'disabled' IF priority.deleted %]>[% priority.name %]</option>
            [% END %]
          </select>
        </p>
[% END %]

[% IF permissions.report_inspect %]
        <p class="left">
          <label for="state">[% loc('State:') %]</label>
            [%# XXX this is duplicated from admin/report_edit.html, should be refactored %]
          <select name="state" id="state">
            [% FOREACH group IN state_groups %]
              <optgroup label="[% group.0 %]">
                [% FOREACH state IN group.1 %]
                  <option [% 'selected ' IF state == problem.state %] value="[% state %]">[% state_pretty.$state %]</option>
                [% END %]
              </optgroup>
            [% END %]
          </select>
        </p>
[% END %]

[% IF permissions.report_edit_category OR permissions.report_inspect %]
        <p class="right">
          <label for="category">[% loc('Category:') %]</label>
            [%# XXX this is duplicated from admin/report_edit.html, should be refactored %]
          <select name="category" id="category">
            [% IF NOT problem.category OR NOT categories.grep(problem.category).size %]
            <optgroup label="[% loc('Existing category') %]">
              <option selected value="[% problem.category | html %]">[% (problem.category OR '-') | html %]</option>
            </optgroup>
            [% END %]
            [% IF categories.size %]
              <optgroup label="[% loc('Available categories') %]">
                [% FOREACH cat IN categories %]
                  <option[% ' selected' IF problem.category == cat %]>[% cat | html %]</option>
                [% END %]
              </optgroup>
            [% END %]
          </select>
        </p>
[% END %]

        <p>
          [% SET local_coords = problem.local_coords; %]
          <strong>[% loc('Easting/Northing:') %]</strong>
          <span id="problem_easting">[% local_coords.0 IF local_coords %]</span>,
          <span id="problem_northing">[% local_coords.1 IF local_coords %]</span>
          <input type="hidden" name="longitude" value="[% problem.longitude %]">
          <input type="hidden" name="latitude" value="[% problem.latitude %]">
        </p>
        <p style="clear:both;">
          <a href="#" id="geolocate_link">[% loc('Use my current location') %]</a>,
          [% loc('or drag the pin on the map') %] &raquo;
        </p>

[% IF permissions.report_inspect %]
        <p>
          <label for="detailed_information">[% loc('Detailed problem location:') %]</label>
          <textarea rows="2" name="detailed_location">[% problem.get_extra_metadata('detailed_location') | html %]</textarea>
        </p>
        <p>
          <label for="detailed_information">[% loc('Detailed problem information:') %]</label>
          <textarea rows="2" name="detailed_information">[% problem.get_extra_metadata('detailed_information') | html %]</textarea>
        </p>
        <p>
          <label for="traffic_information">[% loc('Traffic management information:') %]</label>
          <textarea rows="2" name="traffic_information">[% problem.get_extra_metadata('traffic_information') | html %]</textarea>
        </p>
[% END %]

        <p>
          <input type="hidden" name="token" value="[% csrf_token %]">
          <a href="[% c.uri_for( '/report', problem.id ) %]" class="btn">[% loc('Cancel') %]</a>
          <input type="submit" value="[% loc('Save changes') %]" name="save" />
        </p>
        [% UNLESS problem.get_extra_metadata('inspected') %]
          <p>
            <label for="public_update">[% loc('Public update:') %]</label>
            [% INCLUDE 'admin/response_templates_select.html' for='public_update' %]
            <textarea rows="2" name="public_update" id="public_update" required>[% public_update | html %]</textarea>
          </p>
          <p>
            <input type="submit" value="[% loc('Save changes + send') %]" name="save_inspected" />
          </p>
        [% ELSE %]
          <p>
            [% IF problem.whensent %]
              [% loc("<strong>Note:</strong> This report has been sent onwards for action. Any changes made won't be passed on.") %]
            [% ELSE %]
              [% loc("<strong>Note:</strong> This report hasn't yet been sent onwards for action. Any changes made may not be passed on.") %]
            [% END %]
          </p>
        [% END %]
      </form>
    </div>
  </div>
[%- END %]<commit_msg>Only show save and send fields to inspectors.<commit_after>[% PROCESS 'admin/report_blocks.html'; # For the report state dropdown %]
[% permissions = c.user.permissions(c, problem.bodies_str) %]
[% second_column = BLOCK -%]
  <div id="side-report-secondary">
    <div class="problem-inspector-fields clearfix">
      [% INCLUDE 'errors.html' %]

      <form id="report_inspect_form" method="post" action="[% c.uri_for( '/report', problem.id, 'inspect' ) %]">
        <p class="left">
          <label for="problem_id">[% loc('Report ID:') %]</label>
          <input type="text" readonly id="problem_id" value="[% problem.id %]">
        </p>

[% IF permissions.report_edit_priority OR permissions.report_inspect %]
        <p class="right">
          <label for="problem_priority">[% loc('Priority:') %]</label>
          <select name="priority" id="problem_priority">
            <option value="" [% 'selected' UNLESS problem.response_priority_id %]>-</option>
            [% FOREACH priority IN problem.response_priorities %]
              <option value="[% priority.id %]" [% 'selected' IF problem.response_priority_id == priority.id %] [% 'disabled' IF priority.deleted %]>[% priority.name %]</option>
            [% END %]
          </select>
        </p>
[% END %]

[% IF permissions.report_inspect %]
        <p class="left">
          <label for="state">[% loc('State:') %]</label>
            [%# XXX this is duplicated from admin/report_edit.html, should be refactored %]
          <select name="state" id="state">
            [% FOREACH group IN state_groups %]
              <optgroup label="[% group.0 %]">
                [% FOREACH state IN group.1 %]
                  <option [% 'selected ' IF state == problem.state %] value="[% state %]">[% state_pretty.$state %]</option>
                [% END %]
              </optgroup>
            [% END %]
          </select>
        </p>
[% END %]

[% IF permissions.report_edit_category OR permissions.report_inspect %]
        <p class="right">
          <label for="category">[% loc('Category:') %]</label>
            [%# XXX this is duplicated from admin/report_edit.html, should be refactored %]
          <select name="category" id="category">
            [% IF NOT problem.category OR NOT categories.grep(problem.category).size %]
            <optgroup label="[% loc('Existing category') %]">
              <option selected value="[% problem.category | html %]">[% (problem.category OR '-') | html %]</option>
            </optgroup>
            [% END %]
            [% IF categories.size %]
              <optgroup label="[% loc('Available categories') %]">
                [% FOREACH cat IN categories %]
                  <option[% ' selected' IF problem.category == cat %]>[% cat | html %]</option>
                [% END %]
              </optgroup>
            [% END %]
          </select>
        </p>
[% END %]

        <p>
          [% SET local_coords = problem.local_coords; %]
          <strong>[% loc('Easting/Northing:') %]</strong>
          <span id="problem_easting">[% local_coords.0 IF local_coords %]</span>,
          <span id="problem_northing">[% local_coords.1 IF local_coords %]</span>
          <input type="hidden" name="longitude" value="[% problem.longitude %]">
          <input type="hidden" name="latitude" value="[% problem.latitude %]">
        </p>
        <p style="clear:both;">
          <a href="#" id="geolocate_link">[% loc('Use my current location') %]</a>,
          [% loc('or drag the pin on the map') %] &raquo;
        </p>

[% IF permissions.report_inspect %]
        <p>
          <label for="detailed_information">[% loc('Detailed problem location:') %]</label>
          <textarea rows="2" name="detailed_location">[% problem.get_extra_metadata('detailed_location') | html %]</textarea>
        </p>
        <p>
          <label for="detailed_information">[% loc('Detailed problem information:') %]</label>
          <textarea rows="2" name="detailed_information">[% problem.get_extra_metadata('detailed_information') | html %]</textarea>
        </p>
        <p>
          <label for="traffic_information">[% loc('Traffic management information:') %]</label>
          <textarea rows="2" name="traffic_information">[% problem.get_extra_metadata('traffic_information') | html %]</textarea>
        </p>
[% END %]

        <p>
          <input type="hidden" name="token" value="[% csrf_token %]">
          <a href="[% c.uri_for( '/report', problem.id ) %]" class="btn">[% loc('Cancel') %]</a>
          <input type="submit" value="[% loc('Save changes') %]" name="save" />
        </p>
[% IF permissions.report_inspect %]
        [% UNLESS problem.get_extra_metadata('inspected') %]
          <p>
            <label for="public_update">[% loc('Public update:') %]</label>
            [% INCLUDE 'admin/response_templates_select.html' for='public_update' %]
            <textarea rows="2" name="public_update" id="public_update" required>[% public_update | html %]</textarea>
          </p>
          <p>
            <input type="submit" value="[% loc('Save changes + send') %]" name="save_inspected" />
          </p>
        [% ELSE %]
          <p>
            [% IF problem.whensent %]
              [% loc("<strong>Note:</strong> This report has been sent onwards for action. Any changes made won't be passed on.") %]
            [% ELSE %]
              [% loc("<strong>Note:</strong> This report hasn't yet been sent onwards for action. Any changes made may not be passed on.") %]
            [% END %]
          </p>
        [% END %]
[% END %]
      </form>
    </div>
  </div>
[%- END %]
{'fraction_non_alphanumeric': 0.17867383512544802, 'fraction_numerical': 0.0014336917562724014, 'mean_word_length': 2.405859017393958, 'pattern_counts': {'":': 0, '<': 199, '<?xml version=': 0, '>': 199, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '962332', 'n_tokens_mistral': 3534, 'n_tokens_neox': 3423, 'n_words': 778}