aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2019-01-09 14:01:53 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2019-01-09 17:24:15 +0000
commit205a8eb0c57e6616a537d1d83a9a4578baf59149 (patch)
tree78ff99966319c4e86fba3f65c09d6690aa82cd96
parenta9ca70f152ad75b80da0d15ad415782d15469782 (diff)
Factor out update form wrapper.
-rw-r--r--templates/web/base/report/display.html13
-rw-r--r--templates/web/base/report/update-form-wrapper.html12
2 files changed, 13 insertions, 12 deletions
diff --git a/templates/web/base/report/display.html b/templates/web/base/report/display.html
index 752c2b51c..ade6b808e 100644
--- a/templates/web/base/report/display.html
+++ b/templates/web/base/report/display.html
@@ -61,18 +61,7 @@
) %]
</p>
[% 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 %]
+ [% PROCESS 'report/update-form-wrapper.html' %]
[% END %]
</div>
diff --git a/templates/web/base/report/update-form-wrapper.html b/templates/web/base/report/update-form-wrapper.html
new file mode 100644
index 000000000..3a75036cc
--- /dev/null
+++ b/templates/web/base/report/update-form-wrapper.html
@@ -0,0 +1,12 @@
+[% 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 %]