diff options
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Zurich.pm | 7 | ||||
-rw-r--r-- | templates/web/zurich/admin/report_edit-sdm.html | 10 |
2 files changed, 10 insertions, 7 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm index 0e4c1d907..4551fcc4a 100644 --- a/perllib/FixMyStreet/Cobrand/Zurich.pm +++ b/perllib/FixMyStreet/Cobrand/Zurich.pm @@ -892,8 +892,7 @@ sub admin_report_edit { if ($type eq 'sdm') { - my $editable = $type eq 'sdm' && $body->id eq $problem->bodies_str; - $c->stash->{sdm_disabled} = $editable ? '' : 'disabled'; + my $editable = $body->id eq $problem->bodies_str; # Has cut-down edit template for adding update and sending back up only $c->stash->{template} = 'admin/report_edit-sdm.html'; @@ -971,6 +970,10 @@ sub admin_report_edit { } } + $c->stash->{sdm_disabled} = $editable ? '' : 'disabled'; + $c->stash->{sdm_disabled_internal} = $problem->non_public ? 'disabled' : ''; + $c->stash->{sdm_disabled_fixed} = $problem->is_fixed ? 'disabled' : ''; + return $self->admin_report_edit_done; } diff --git a/templates/web/zurich/admin/report_edit-sdm.html b/templates/web/zurich/admin/report_edit-sdm.html index 9d4afef20..8d1fa464c 100644 --- a/templates/web/zurich/admin/report_edit-sdm.html +++ b/templates/web/zurich/admin/report_edit-sdm.html @@ -87,15 +87,15 @@ [% IF problem.non_public %] <p align="right" class="screen-only"> - <input [% sdm_disabled %] type="submit" class="btn" name="stop_internal" value="Keine interne Meldung"> + <input [% sdm_disabled %] [% sdm_disabled_fixed %] type="submit" class="btn" name="stop_internal" value="Keine interne Meldung"> </p> [% END %] -<p align="right" class="screen-only"><input [% sdm_disabled %] type="submit" class="btn" name="send_back" value="[% loc('Not for my subdivision') %]"></p> +<p align="right" class="screen-only"><input [% sdm_disabled %] [% sdm_disabled_fixed %] type="submit" class="btn" name="send_back" value="[% loc('Not for my subdivision') %]"></p> [% status_message | safe %] -<p align="right" class="screen-only"><input [% sdm_disabled %] type="submit" class="btn" name="not_contactable" value="[% loc('Customer not contactable') %]"></p> +<p align="right" class="screen-only"><input [% sdm_disabled %] [% sdm_disabled_internal %] [% sdm_disabled_fixed %] type="submit" class="btn" name="not_contactable" value="[% loc('Customer not contactable') %]"></p> <ul class="no-bullets screen-only"> <li> @@ -104,7 +104,7 @@ </li> <li> <label for="status_update">[% loc('New note to DM:') %]</label> - <textarea [% sdm_disabled %] class="form-control" name='status_update' id='status_update' cols=60 rows=4></textarea> + <textarea [% sdm_disabled %] [% sdm_disabled_internal %] [% sdm_disabled_fixed %] class="form-control" name='status_update' id='status_update' cols=60 rows=4></textarea> </li> </ul> @@ -115,7 +115,7 @@ <p class="clearfix screen-only"> <input [% sdm_disabled %] style="float:left" type="submit" class="btn" name="Submit changes" value="[% loc('Submit changes') %]" > - <input [% sdm_disabled %] style="float:right" type="submit" class="btn" name="no_more_updates" value="[% loc('No further updates') %]"> + <input [% sdm_disabled %] [% sdm_disabled_fixed %] style="float:right" type="submit" class="btn" name="no_more_updates" value="[% loc('No further updates') %]"> </p> [% INCLUDE 'admin/list_updates.html' %] |