aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/web/base/report/display.html20
-rw-r--r--templates/web/base/report/update-form.html2
2 files changed, 13 insertions, 9 deletions
diff --git a/templates/web/base/report/display.html b/templates/web/base/report/display.html
index eedbc4f85..cb5bf327c 100644
--- a/templates/web/base/report/display.html
+++ b/templates/web/base/report/display.html
@@ -61,14 +61,18 @@
c.uri_for( '/report/new', { longitude => longitude, latitude => latitude } )
) %]
</p>
-[% ELSIF NOT shown_form %]
- [% IF two_column_sidebar %]
- <button class="btn btn--provide-update js-provide-update hidden-nojs">[% loc('Provide an update') %]</button>
- <div class="hidden-js">
- [% END %]
- [% INCLUDE 'report/update-form.html' %]
- [% IF two_column_sidebar %]
- </div>
+[% ELSIF NOT shown_form %]
+ [% UNLESS c.cobrand.updates_disallowed(problem) %]
+ [% IF two_column_sidebar %]
+ <button class="btn btn--provide-update js-provide-update hidden-nojs">[% loc('Provide an update') %]</button>
+ <div class="hidden-js">
+ [% END %]
+ [% INCLUDE 'report/update-form.html' %]
+ [% IF two_column_sidebar %]
+ </div>
+ [% END %]
+ [% ELSE %]
+ [% TRY %][% INCLUDE 'report/_updates_disallowed_message.html' %][% CATCH file %][% END %]
[% END %]
[% END %]
diff --git a/templates/web/base/report/update-form.html b/templates/web/base/report/update-form.html
index 9276acde9..a68ce117f 100644
--- a/templates/web/base/report/update-form.html
+++ b/templates/web/base/report/update-form.html
@@ -1,4 +1,4 @@
-[% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_body) %]
+[% allow_creation = (!c.cobrand.only_authed_can_create || (c.user && c.user.from_body)) AND NOT c.cobrand.updates_disallowed(problem) %]
[% RETURN IF NOT allow_creation OR problem.extra.closed_updates %]
<div id="update_form">