diff options
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin.pm | 7 | ||||
-rw-r--r-- | templates/web/default/admin/council_edit.html | 27 |
2 files changed, 34 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm index d917441a1..f05639b41 100644 --- a/perllib/FixMyStreet/App/Controller/Admin.pm +++ b/perllib/FixMyStreet/App/Controller/Admin.pm @@ -304,6 +304,10 @@ sub update_contacts : Private { $contact->note( $c->req->param('note') ); $contact->whenedited( \'ms_current_timestamp()' ); $contact->editor( $editor ); + $contact->endpoint( $c->req->param('endpoint') ); + $contact->jurisdiction( $c->req->param('jurisdiction') ); + $contact->api_key( $c->req->param('api_key') ); + $contact->send_method( $c->req->param('send_method') ); if ( $contact->in_storage ) { $c->stash->{updated} = _('Values updated'); @@ -463,6 +467,9 @@ sub council_edit : Path('council_edit') : Args(2) { $c->stash->{history} = $history; + my @methods = map { $_ =~ s/FixMyStreet::SendReport:://; $_ } keys %{ FixMyStreet::SendReport->get_senders }; + $c->stash->{send_methods} = \@methods; + return 1; } diff --git a/templates/web/default/admin/council_edit.html b/templates/web/default/admin/council_edit.html index 0968d3570..716c2cb08 100644 --- a/templates/web/default/admin/council_edit.html +++ b/templates/web/default/admin/council_edit.html @@ -30,6 +30,33 @@ <strong>[% loc('Note:') %] </strong><textarea name="note" rows="3" cols="40">[% contact.note | html %]</textarea> <br> + <h2>[% loc('Configure Endpoint') %]</h2> + <form method="post" action="[% c.uri_for('council_contacts', area_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + <p> + <label for="endpoint">Endpoint</label>: + <input type="text" name="endpoint" id="endpoint" value="[% contact.endpoint %]" size="50"> + </p> + + <p> + <label for="jurisdiction">Jurisdiction</label>: + <input type="text" name="jurisdiction" id="jurisdiction" value="[% contact.jurisdiction %]" size="50"> + </p> + + <p> + <label for="api_key">Api Key</label>: + <input type="text" name="api_key" id="api_key" value="[% contact.api_key %]" size="25"> + </p> + + <p> + <label for="send_method">Send Method</label>: + <select name="send_method"> + <option value=""> -- Select a method -- </option> + [% FOR method IN send_methods %] + <option value="[% method %]"[% ' selected' IF contact.send_method == method %]>[% method %]</option> + [% END %] + </select> + </p> + <input type="hidden" name="area_id" value="[% area_id %]"> <input type="hidden" name="posted" value="new"> <input type="submit" name="Save changes" value="[% loc('Save changes') %]"> |