Bug 1225433 - (Fennec) Update text and style of "forbidden" page. r=francois

This commit is contained in:
Sebastian Kaspari 2016-01-19 10:21:10 +01:00
parent a46c93e49a
commit 0e1e3bf3d8
3 changed files with 14 additions and 4 deletions

View File

@ -136,11 +136,16 @@
el.parentNode.removeChild(el);
el = document.getElementById("errorShortDescText_forbidden");
el.parentNode.removeChild(el);
el = document.getElementById("whyForbiddenButton");
el.parentNode.removeChild(el);
} else {
el = document.getElementById("ignoreWarningButton");
el.parentNode.removeChild(el);
el = document.getElementById("reportButton");
el.parentNode.removeChild(el);
// Remove red style: A "forbidden site" does not warrant the same level of anxiety as a security concern.
document.getElementById("errorPage").className = "";
}
if (!getOverride()) {
@ -171,7 +176,7 @@
<h1 id="errorTitleText_phishing" class="errorTitleText">&safeb.blocked.phishingPage.title2;</h1>
<h1 id="errorTitleText_malware" class="errorTitleText">&safeb.blocked.malwarePage.title;</h1>
<h1 id="errorTitleText_unwanted" class="errorTitleText">&safeb.blocked.unwantedPage.title;</h1>
<h1 id="errorTitleText_forbidden" class="errorTitleText">&safeb.blocked.forbiddenPage.title;</h1>
<h1 id="errorTitleText_forbidden" class="errorTitleText">&safeb.blocked.forbiddenPage.title2;</h1>
</div>
<div id="errorLongContent">
@ -181,7 +186,7 @@
<p id="errorShortDescText_phishing">&safeb.blocked.phishingPage.shortDesc2;</p>
<p id="errorShortDescText_malware">&safeb.blocked.malwarePage.shortDesc;</p>
<p id="errorShortDescText_unwanted">&safeb.blocked.unwantedPage.shortDesc;</p>
<p id="errorShortDescText_forbidden">&safeb.blocked.forbiddenPage.shortDesc;</p>
<p id="errorShortDescText_forbidden">&safeb.blocked.forbiddenPage.shortDesc2;</p>
</div>
<!-- Long Description -->
@ -196,6 +201,7 @@
<!-- Commands handled in browser.js -->
<button id="getMeOutButton">&safeb.palm.accept.label;</button>
<button id="reportButton">&safeb.palm.reportPage.label;</button>
<button id="whyForbiddenButton">&safeb.palm.whyForbidden.label;</button>
</div>
</div>
<div id="ignoreWarning">

View File

@ -5331,6 +5331,9 @@ var ErrorPageEventHandler = {
// ....but add a notify bar as a reminder, so that they don't lose
// track after, e.g., tab switching.
NativeWindow.doorhanger.show(Strings.browser.GetStringFromName("safeBrowsingDoorhanger"), "safebrowsing-warning", [], BrowserApp.selectedTab.id);
} else if (target == errorDoc.getElementById("whyForbiddenButton")) {
// This is the "Why is this site blocked" button for family friendly browsing.
BrowserApp.selectedBrowser.loadURI("https://support.mozilla.org/kb/controlledaccess");
}
}
break;

View File

@ -6,6 +6,7 @@
<!ENTITY safeb.palm.decline.label "Ignore this warning">
<!ENTITY safeb.palm.notforgery.label2 "This isn't a web forgery…">
<!ENTITY safeb.palm.reportPage.label "Why was this page blocked?">
<!ENTITY safeb.palm.whyForbidden.label "Why was this page blocked?">
<!ENTITY safeb.blocked.malwarePage.title "Reported Attack Page!">
<!-- Localization note (safeb.blocked.malware.shortDesc) - Please don't translate the contents of the <span id="malware_sitename"/> tag. It will be replaced at runtime with a domain name (e.g. www.badsite.com) -->
@ -21,6 +22,6 @@
<!ENTITY safeb.blocked.unwantedPage.shortDesc "This web page at <span id='unwanted_sitename'/> has been reported to contain unwanted software and has been blocked based on your security preferences.">
<!ENTITY safeb.blocked.unwantedPage.longDesc "Unwanted software pages try to install software that can be deceptive and affect your system in unexpected ways.">
<!ENTITY safeb.blocked.forbiddenPage.title "Forbidden Site">
<!ENTITY safeb.blocked.forbiddenPage.title2 "Blocked Site">
<!-- Localization note (safeb.blocked.forbiddenPage.shortDesc) - Please don't translate the contents of the <span id="forbidden_sitename"/> tag. It will be replaced at runtime with a domain name (e.g. www.badsite.com) -->
<!ENTITY safeb.blocked.forbiddenPage.shortDesc "This Web page at <span id='forbidden_sitename'/> has been blocked based on your browser configuration.">
<!ENTITY safeb.blocked.forbiddenPage.shortDesc2 "The Web page at <span id='forbidden_sitename'/> has been blocked by your admin profile.">