diff options
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Peterborough.pm | 2 | ||||
-rw-r--r-- | templates/web/peterborough/admin/bodies/_category_field.html | 21 |
2 files changed, 23 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Peterborough.pm b/perllib/FixMyStreet/Cobrand/Peterborough.pm index 199fcdd36..cb7da18af 100644 --- a/perllib/FixMyStreet/Cobrand/Peterborough.pm +++ b/perllib/FixMyStreet/Cobrand/Peterborough.pm @@ -32,6 +32,8 @@ sub disambiguate_location { sub get_geocoder { 'OSM' } +sub contact_extra_fields { [ 'display_name' ] } + sub geocoder_munge_results { my ($self, $result) = @_; $result->{display_name} = '' unless $result->{display_name} =~ /City of Peterborough/; diff --git a/templates/web/peterborough/admin/bodies/_category_field.html b/templates/web/peterborough/admin/bodies/_category_field.html new file mode 100644 index 000000000..6497e3511 --- /dev/null +++ b/templates/web/peterborough/admin/bodies/_category_field.html @@ -0,0 +1,21 @@ +[% IF contact.in_storage %] + <h1>[% contact.category | html %]</h1> + <input type="hidden" name="category" value="[% contact.category | html %]" > + + <div class="admin-hint"> + <p>A display name will be used in preference to the main category name on web pages and dropdown menus, but not in URLs.</p> + </div> + + <p> + <label> + Display name: + <input type="text" class="form-control" name="extra[display_name]" id="display_name" + value="[% contact.get_extra_metadata('display_name') | html %]" size="30"> + </label> + </p> + +[% ELSE %] + <p> + <strong>[% loc('Category') %] </strong><input type="text" class="form-control" name="category" size="30" value="[% contact.category | html %]" required> + </p> +[% END %] |