aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/Cobrand/Zurich.pm29
-rw-r--r--templates/web/zurich/admin/report_edit-sdm.html4
2 files changed, 22 insertions, 11 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm
index fc16dcf8d..6753d580c 100644
--- a/perllib/FixMyStreet/Cobrand/Zurich.pm
+++ b/perllib/FixMyStreet/Cobrand/Zurich.pm
@@ -160,17 +160,26 @@ sub admin_report_edit {
} elsif ($c->req->param('submit')) {
$c->forward('check_token');
+ my $extra = $problem->extra || {};
+ $extra->{internal_notes} ||= '';
+ if ($c->req->param('internal_notes') && $c->req->param('internal_notes') ne $extra->{internal_notes}) {
+ $extra->{internal_notes} = $c->req->param('internal_notes');
+ $problem->extra( { %$extra } );
+ $problem->update;
+ }
+
# Add new update from status_update
- my $update = $c->req->param('status_update');
- FixMyStreet::App->model('DB::Comment')->create( {
- text => $update,
- user => $c->user->obj,
- state => 'unconfirmed',
- problem => $problem,
- mark_fixed => 0,
- problem_state => 'fixed - council',
- anonymous => 1,
- } );
+ if (my $update = $c->req->param('status_update')) {
+ FixMyStreet::App->model('DB::Comment')->create( {
+ text => $update,
+ user => $c->user->obj,
+ state => 'unconfirmed',
+ problem => $problem,
+ mark_fixed => 0,
+ problem_state => 'fixed - council',
+ anonymous => 1,
+ } );
+ }
$c->stash->{status_message} = '<p><em>' . _('Updated!') . '</em></p>';
diff --git a/templates/web/zurich/admin/report_edit-sdm.html b/templates/web/zurich/admin/report_edit-sdm.html
index 5bfab360a..fd18e40ae 100644
--- a/templates/web/zurich/admin/report_edit-sdm.html
+++ b/templates/web/zurich/admin/report_edit-sdm.html
@@ -15,7 +15,9 @@
<li><input type="submit" name="send_back" value="[% loc('Send back to division') %]">
</li>
-<li>[% loc('Internal notes:') %] [% problem.extra | html %]
+<li><label for="internal_notes">[% loc('Internal notes:') %]</label>
+<textarea name='internal_notes' id='internal_notes' cols=60 rows=5>[% problem.extra.internal_notes | html %]</textarea></li>
+
<li>[% loc('Category:') %] [% problem.category | html %] </li>
<li>[% loc('Name:') %] [% problem.name | html %]
<li>[% loc('Email:') %] [% problem.user.email | html %]