aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2017-11-23 17:38:34 +0000
committerDave Arter <davea@mysociety.org>2017-11-24 13:56:47 +0000
commit5777b0be63e1200880671aaf7128ca7e0ebb18f9 (patch)
tree7a1909a0ae58dd4d85e2b2690d29079311da8dcc
parent794ab08b0a889011228a2e6041c336f87f8285f9 (diff)
Fix UI bug stopping superusers making reports
The `fixmystreet.update_pin` function removes the 'body' option from the 'report as' dropdown, which was leaving the UI in an inconsistent state if the 'body' option had previously been selected. This commit ensures the change handler is called when the content of the dropdown is modified. Fixes #1913.
-rw-r--r--CHANGELOG.md1
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js1
2 files changed, 2 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 06bc040c4..fed62f541 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -31,6 +31,7 @@
- Prevent text overflow bug on homepage stats #1722
- Stop page jumping too far down on inspect form. #1863
- Prevent multiple 'Expand map' links appearing. #1909
+ - Superusers without a from_body can make reports again. #1913
- Admin improvements:
- Character length limit can be placed on report detailed information #1848
- Inspector panel shows nearest address if available #1850
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index e5272dd70..e5eba676c 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -867,6 +867,7 @@ fixmystreet.update_pin = function(lonlat, savePushState) {
if (!data.contribute_as.body) {
$select.find('option[value=body]').remove();
}
+ $select.change();
$('#js-contribute-as-wrapper').show();
} else {
$('#js-contribute-as-wrapper').hide();