forked from mysociety/fixmystreet
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
76 additions
and
64 deletions.
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
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,7 +1,10 @@ | ||
<p> | ||
Rapportera <strong>inte</strong> problem i din närmiljö genom det här formuläret. Breven går till FixaMinGata i stället för din kommun. Vill du rapportera ett problem i din närmiljö måste du <a href="/">gå till framsidan</a> och följa instruktionerna där. | ||
</p> | ||
|
||
<p> | ||
Vi vill gärna höra vad du tycker om FixaMinGata. Fyll i formuläret nedan och skicka in. | ||
</p> | ||
<p>Rapportera <strong>inte</strong> problem i din närmiljö genom det här | ||
formuläret. Breven går till FixaMinGata i stället för din kommun. Vill du | ||
rapportera ett problem i din närmiljö måste du <a href="/">gå till framsidan</a> | ||
och följa instruktionerna där.</p> | ||
<p>Vi vill gärna höra vad du tycker om FixaMinGata. Fyll i formuläret nedan och | ||
skicka in.</p> | ||
<p>Du kan även begära att få ditt konto borttaget via detta formulär. När kontot | ||
raderas anonymiseras dina uppgifter, inklusive din ditt namn, e-postadress och | ||
eventuella telefonnummer. Rapporter och uppdateringar finns dock kvar för | ||
statistik.</p> |
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,23 +1,27 @@ | ||
fixmystreet.inspect_form_no_scroll_on_load = 1; | ||
|
||
// Chrome ignores autocomplete="off" on the title input, | ||
// and incorrectly autocompletes it with the user's email address. | ||
// For now we'll reset the title to empty if it contains | ||
// an email address when the user has selected a category. | ||
// Hopefully we can get rid of this eventually if Chrome changes | ||
// its behaviour. | ||
// Chrome ignores autocomplete="off" on the title input, and incorrectly | ||
// autocompletes it with the user's email address. For now we'll reset the title | ||
// to empty if it contains an email address when the user has selected a | ||
// category. Hopefully we can get rid of this eventually if Chrome changes its | ||
// behaviour. | ||
fixmystreet.fixChromeAutocomplete = function() { | ||
var title = document.getElementById("form_title"); | ||
|
||
if (title) { | ||
if (title.value == "" || | ||
/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@(?:\S{1,63})$/.test(title.value)) { | ||
if ( | ||
title.value == "" || | ||
/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@(?:\S{1,63})$/.test(title.value) | ||
) { | ||
title.value = ""; | ||
} | ||
} | ||
}; | ||
|
||
// jQuery is not imported on every page | ||
// jQuery is not imported on every page. | ||
if (window.$) { | ||
$(fixmystreet).on('report_new:category_change', fixmystreet.fixChromeAutocomplete); | ||
$(fixmystreet).on( | ||
"report_new:category_change", | ||
fixmystreet.fixChromeAutocomplete | ||
); | ||
} |