aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base/admin/open311-form-fields.html
blob: 008853b0be2d6f3bced7b9f011360c317b0d21ec (plain)
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
103
104
105
106
107
108
109
110
111
112
<div class="admin-open311-only">
  <p class="fms-admin-info">
    [% loc(
      "These settings are for bodies that use Open311 (or other back-end integration) to receive problem reports.<br>
       <strong>You don't need to set them if the Send Method is email.</strong>.
       For more information on Open311, see
       <a href='https://www.mysociety.org/2013/01/17/open311-explained/' class='admin-offsite-link'>this article</a>.
       "
    ) %]
  </p>

  <div class="admin-hint">
    <p>
      [% loc(
        "The <strong>endpoint</strong> is the URL of the service that FixMyStreet will connect to
        when sending reports to this body."
      ) %]
    </p>
  </div>
  <p>
      <label for="endpoint">[% loc('Endpoint') %]</label>
      <input type="text" class="form-control" name="endpoint" id="endpoint" value="[% object.endpoint | html %]" size="50">
  </p>

  <div class="admin-hint">
    <p>
      [% loc(
        "The <strong>jurisdiction</strong> is only needed if the endpoint is serving more
        than one. If the body is running its own endpoint, you can usually leave this blank."
      ) %]
    </p>
  </div>
  <p>
      <label for="jurisdiction">Open311 Jurisdiction</label>
      <input type="text" class="form-control" name="jurisdiction" id="jurisdiction" value="[% object.jurisdiction | html %]" size="50">
  </p>

  <div class="admin-hint">
    <p>
      [% loc(
        "Some endpoints require an <strong>API key</strong> to indicate that the reports are being
        sent from your FixMyStreet installation."
      ) %]
    </p>
  </div>
  <p>
      <label for="api_key">Open311 API Key</label>
      <input type="text" class="form-control" name="api_key" id="api_key" value="[% object.api_key | html %]" size="25">
  </p>

  [% IF show_body_fields %]
    [%# These fields aren't shown for contacts %]
    <div class="admin-hint">
      <p>
        [% loc(
          "Enable <strong>Open311 update-sending</strong> if the endpoint will send and receive
          updates to existing reports. If you're not sure, it probably does not, so leave this unchecked.
          For more information, see
          <a href='https://www.mysociety.org/2013/02/20/open311-extended/' class='admin-offsite-link'>this article</a>."
        ) %]
      </p>
    </div>
    <p>
        <input type="checkbox" id="send_comments" name="send_comments"[% ' checked' IF object.send_comments %]>
        <label for="send_comments" class="inline">Use Open311 update-sending extension</label>
    </p>

    <div class="admin-hint">
      <p>
        [% loc(
          "If you've enabled Open311 update-sending above, you must identify which
          FixMyStreet <strong>user</strong> will be attributed as the creator of those updates
          when they are shown on the site. Enter the ID (number) of that user."
        ) %]
      </p>
    </div>
    <p>
        <label for"comment_user_id">User ID to attribute fetched comments to</label>
        <input type="text" class="form-control" name="comment_user_id" value="[% object.comment_user_id %]">
        [% IF object.comment_user_id %]
        <a href="[% c.uri_for('user_edit', object.comment_user_id) %]">[% loc('edit user') %]</a>
        [% END %]
    </p>

    <div class="admin-hint">
      <p>
        [% loc(
          "If you've enabled Open311 update-sending above, enable <strong>suppression of alerts</strong>
          if you do <strong>not</strong> want that user to be notified whenever these updates are created."
        ) %]
      </p>
    </div>
    <p>
        <input type="checkbox" id="suppress_alerts" name="suppress_alerts"[% ' checked' IF object.suppress_alerts %]>
        <label for="suppress_alerts" class="inline">Do not send email alerts on fetched comments to problem creator</label>
    </p>

    <div class="admin-hint">
      <p>
        [% loc(
          "If you've enabled Open311 update-sending above, Open311 usually only accepts OPEN or CLOSED status in
          its updates. Enable <strong>extended Open311 stauses</strong> if you want to allow extra states to be passed.
          Check that your cobrand supports this feature before switching it on."
        ) %]
      </p>
    </div>
    <p>
        <input type="checkbox" id="send_extended_statuses" name="send_extended_statuses"[% ' checked' IF object.send_extended_statuses %]>
        <label for="send_extended_statuses" class="inline">Send extended Open311 statuses with service request updates</label>
    </p>
  [% END %]
</div>