aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller
diff options
context:
space:
mode:
authorZarino Zappia <mail@zarino.co.uk>2016-09-13 17:44:43 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-09-20 15:47:44 +0100
commit4af27a5ea8c661299b38a27b2e337a71c7846bd3 (patch)
treea6449228e2b991577417645fb9069bbe80d748f0 /perllib/FixMyStreet/App/Controller
parentfc967a42ce5ff60b9987c2479016ece10b4c796e (diff)
New section headings in report form.
The report form is now split into "Public" and "Private" sections, with a third, matching heading, for the category_extras, if shown.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm13
1 files changed, 12 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index 7b012e0a1..1e0dff9d9 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -180,6 +180,8 @@ sub report_form_ajax : Path('ajax') : Args(0) {
# render templates to get the html
my $category = $c->render_fragment( 'report/new/category.html');
my $councils_text = $c->render_fragment( 'report/new/councils_text.html');
+ my $councils_text_private = $c->render_fragment( 'report/new/councils_text_private.html');
+ my $top_message = $c->render_fragment('report/new/top_message.html');
my $extra_name_info = $c->stash->{extra_name_info}
? $c->render_fragment('report/new/extra_name.html')
: '';
@@ -198,11 +200,13 @@ sub report_form_ajax : Path('ajax') : Args(0) {
my $body = encode_json(
{
councils_text => $councils_text,
+ councils_text_private => $councils_text_private,
category => $category,
extra_name_info => $extra_name_info,
titles_list => $extra_titles_list,
categories => $c->stash->{category_options},
%$contribute_as ? (contribute_as => $contribute_as) : (),
+ $top_message ? (top_message => $top_message) : (),
}
);
@@ -238,7 +242,14 @@ sub category_extras_ajax : Path('category_extras') : Args(0) {
$category_extra = $c->render_fragment( 'report/new/category_extras.html');
}
- my $body = encode_json({ category_extra => $category_extra });
+ my $councils_text = $c->render_fragment( 'report/new/councils_text.html');
+ my $councils_text_private = $c->render_fragment( 'report/new/councils_text_private.html');
+
+ my $body = encode_json({
+ category_extra => $category_extra,
+ councils_text => $councils_text,
+ councils_text_private => $councils_text_private,
+ });
$c->res->content_type('application/json; charset=utf-8');
$c->res->body($body);