forked from mysociety/fixmystreet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Bucks] Changes to parish/council name display
When making a report to a parish Bucks have asked for only the parish name to be displayed. This commit changes the header section of the category extras and adds a tiny bit of JS to handle updating the displayed body name when the grass cutting question is answered. Include the fix on .com as well.
- Loading branch information
1 parent
78a22aa
commit fa822e1
Showing
8 changed files
with
113 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
[% PROCESS 'footer_extra_js_base.html' highways=1 cobrand_js=1 validation=1 roadworks=1 %] | ||
[% | ||
IF bodyclass.match('mappage'); | ||
scripts.push( | ||
version('/cobrands/buckinghamshire/grass_cutting.js') | ||
); | ||
END | ||
%] |
7 changes: 7 additions & 0 deletions
7
templates/web/buckinghamshire/report/new/_category_extras_header.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[% IF category == 'Grass cutting' %] | ||
<p class="form-section-description"> | ||
Help us to direct your enquiry/report to the right team first time. Some services are provided by the Parish/Town Council, and are dependent on the location/road speed limit. | ||
</p> | ||
[% ELSE %] | ||
[% THROW file 'Not found' %] | ||
[% END %] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
(function(){ | ||
|
||
if (!fixmystreet.maps) { | ||
return; | ||
} | ||
|
||
$(function() { | ||
$(document).on('change', '#form_speed_limit_greater_than_30', function(e) { | ||
var bucks, parish; | ||
$.each(fixmystreet.bodies, function(i, body) { | ||
if (body === 'Buckinghamshire Council') { | ||
bucks = body; | ||
} else { | ||
parish = body; | ||
} | ||
}); | ||
if (!bucks || !parish) { | ||
return; | ||
} | ||
|
||
if ($(this).val() === 'no') { | ||
// Report for the parish | ||
fixmystreet.update_public_councils_text($('#js-councils_text').html(), [parish]); | ||
} else { | ||
// Report for the council | ||
fixmystreet.update_public_councils_text($('#js-councils_text').html(), [bucks]); | ||
} | ||
}); | ||
}); | ||
|
||
})(); |