Skip to content
Browse files

ready changes to launch landing page for new privacy hub fixes bug 80…

…9079
  • Loading branch information...
1 parent 163beba commit 15f3da10c0302f38d25746c8ddfb3147ecd97a7f @schalkneethling schalkneethling committed with rik Nov 13, 2012
View
31 apps/privacy/forms.py
@@ -0,0 +1,31 @@
+from django import forms
+from django.forms import widgets
+
+
+class EmailInput(widgets.TextInput):
+ input_type = 'email'
+
+
+class PrivacyContactForm(forms.Form):
+ name = forms.CharField(
+ required=True,
+ widget=forms.TextInput(
+ attrs={
+ 'required': 'true'
+ }))
+ sender = forms.EmailField(
+ required=True,
+ widget=EmailInput(
+ attrs={
+ 'required': 'true',
+ 'placeholder': 'you@yourdomain.com'
+ }))
+ comments = forms.CharField(
+ required=True,
+ widget=forms.Textarea(
+ attrs={
+ 'required': 'true',
+ 'placeholder': 'Enter your comments...',
+ 'rows': '10',
+ 'cols': '77'
+ }))
View
2 apps/privacy/templates/privacy/emails/info.txt
@@ -0,0 +1,2 @@
+Email: {{ sender }}
+Comment: {{ comments }}
View
332 apps/privacy/templates/privacy/index.html
@@ -2,82 +2,25 @@
{% block body_id %}privacy{% endblock %}
-{% block page_title %}Privacy Policy{% endblock %}
+{% block page_title %}Your Privacy{% endblock %}
{% block extrahead %}
{{ css('privacy') }}
{% endblock %}
-{% block js %}
- {{ js('pager') }}
- <script>Mozilla.Pager.AUTO_ROTATE_INTERVAL = 5000;</script>
-{% endblock %}
-
{% block content %}
<hgroup id="main-feature" class="huge center">
<h1>Your Privacy</h1>
- <h2>Putting users in control of their private information</h2>
+ <h2>Putting you in control of your personal information</h2>
</hgroup>
-<section id="privacy-promo" class="pager pager-with-tabs pager-auto-rotate pager-no-history">
- <div class="pager-content">
-
- <div class="default-page pager-page" id="promo-beta">
- <script>
- document.getElementById('promo-beta').id = 'page-promo-beta';
- </script>
- <a href="{{ php_url('/firefox/beta/') }}?WT.mc_id=mofxbeta&amp;WT.mc_ev=click" class="container">
- <img src="{{ media('img/home/promo-beta.jpg') }}" alt="Firefox Beta blueprint artwork">
- <div>
- <h3>Get a sneak peek at the Firefox of tomorrow.</h3>
- <p>Download Firefox Beta today »</p>
- </div>
- </a>
- </div>
-
- <div class="pager-page" id="promo-flicks">
- <script>
- document.getElementById('promo-flicks').id = 'page-promo-flicks';
- </script>
- <a href="https://firefoxflicks.mozilla.org/?WT.mc_id=mofxflicks&amp;WT.mc_ev=click" class="container">
- <img src="{{ media('img/home/promo-flicks.jpg') }}" alt="Firefox Flicks artwork">
- <div>
- <h3>Congratulations to all the winners of Firefox Flicks!</h3>
- <p>Watch the winning videos »</p>
- </div>
- </a>
- </div>
-
- <div class="pager-page" id="promo-affiliates">
- <script>
- document.getElementById('promo-affiliates').id = 'page-promo-affiliates';
- </script>
- <a href="https://affiliates.mozilla.org/?WT.mc_id=moaff&amp;WT.mc_ev=click" class="container">
- <img src="{{ media('img/home/promo-affiliates.jpg') }}" alt="Firefox Affiliates banners and buttons">
- <div>
- <h3>Help share Firefox with the world.</h3>
- <p>Become an Affiliate today »</p>
- </div>
- </a>
- </div>
-
- <ul class="pager-tabs">
- <li id="tab-beta"><a href="#p1">●</a></li>
- <li id="tab-flicks"><a href="#p2">●</a></li>
- <li id="tab-affiliates"><a href="#p3">●</a></li>
- </ul>
-
- </div>
-</section>
-
<nav id="top" class="menu-bar billboard">
<ul>
<li><a href="#principles">Our Principles</a></li>
<li><a href="#your-information">Your Information</a></li>
<li><a href="#choices">Your Choices</a></li>
- <li><a href="#third-parties">Third Parties</a></li>
- <li><a href="#footer-email-form">Get Updates</a></li>
+ <li><a href="#contactus">Contact Us</a></li>
</ul>
</nav>
@@ -86,229 +29,116 @@
<article class="main-column">
<section id="principles" class="section-content">
<h1>Our Principles</h1>
- <p>Six core privacy principles guide our data practices and operations at Mozilla. These principles stem from the Mozilla Manifesto.
- In short, we're a non-profit dedicated to putting the user in control and shaping the future of the Web for the public good. These
- principles remind us that our users’ interests come first and encourage us to build a consistent approach to privacy and security:</p>
+ <p>Six core privacy principles guide our data practices and operations at Mozilla. These principles stem from
+ the Mozilla Manifesto. In short, we're a non-profit dedicated to putting the user in control and shaping the
+ future of the Web for the public good. These principles remind us that our users’ interests come first and
+ encourage us to build a consistent approach to privacy and security:</p>
<ol>
- <li>
- <h4>No Surprises</h4>
- <p>Only use and share information about our users for their benefit and as spelled out in our notices.</p>
- </li>
- <li>
- <h4>Real Choices</h4>
- <p>Educate users at the point that we collect any data and give them the option to opt out whenever possible.</p>
- </li>
- <li>
- <h4>Sensible Settings </h4>
- <p>Establish default settings that balance safety and user experience appropriately for each transaction.</p>
- </li>
- <li>
- <h4>Limited Data</h4>
- <p>Collect and retain the least amount of user information necessary and share data anonymously whenever possible.</p>
- </li>
- <li>
- <h4>User Control</h4>
- <p>Innovate, develop and advocate for privacy enhancements that put users in control of their online experiences.</p>
- </li>
- <li>
- <h4>Trusted Third Parties</h4>
- <p>Make privacy a key factor in selecting and interacting with partners.</p>
- </li>
+ <li>
+ <h4>No Surprises</h4>
+ <p>Only use and share information about our users for their benefit and as spelled out in our notices.</p>
+ </li>
+ <li>
+ <h4>Limited Data</h4>
+ <p>Collect and retain the least amount of user information necessary and share data anonymously whenever possible.</p>
+ </li>
+ <li>
+ <h4>Real Choices</h4>
+ <p>Educate users at the point that we collect any data and give them the option to opt out whenever possible.</p>
+ </li>
+ <li>
+ <h4>User Control</h4>
+ <p>Innovate, develop and advocate for privacy enhancements that put users in control of their online experiences.</p>
+ <li>
+ <h4>Sensible Settings </h4>
+ <p>Establish default settings that balance safety and user experience appropriately for each transaction.</p>
+ </li>
+ <li>
+ <h4>Trusted Third Parties</h4>
+ <p>Make privacy a key factor in selecting and interacting with partners.</p>
+ </li>
</ol>
<p><a href="#top" class="top">back to top</a></p>
</section>
<section id="your-information" class="section-content">
<h1>Your Information</h1>
- <p>We know how much you value your privacy, so we try to collect as little information about you as possible.</p>
- <p>Our privacy policies explain in detail exactly what our different products will and won't do with your information. If you want
- to know exactly what gets collected when and for what reason, then be sure to check the relevant policy.</p>
- <h3 class="sub-section-header">Types of Information</h3>
- <h4>Aggregate Data</h4>
- <p>Information recorded about people and collected into groups so it no longer references an individually identifiable person.</p>
- <h4>Non-Personal Information</h4>
- <p>Information that cannot be directly associated with a specific person or entity.</p>
- <h4>Potentially Personal Information</h4>
- <p>Aggregate or non-personal information that could be used in conjunction with other information to personally identify a person.</p>
- <h4>Personal Information</h4>
- <p>Information that a person provides to us that personally identifies him or her.</p>
-
- <h3 class="sub-section-header">Overview of Information Uses</h3>
+ <p>We know how much you value your privacy and we design our products and features with your privacy in mind.</p>
+ <p>Our privacy policies and notices explain in detail what our different products will and won't do with yourinformation. They
+ tell you what is collected, when it is collected, and for what reason it is collected. We want to be transparent and open
+ about our privacy practices.</p>
+ <h2>For us, "personal information" means:</h2>
<ul>
- <li>We collect non–personally identifying information, like your browser type, and potentially personal information, like your IP
- address, to understand how our sites are being used and how to improve them. You can learn more about modifying your settings with
- regards to this practice in Your Choices.</li>
- <li>We may ask for personal information, like your mailing address, when we need to ship you stuff, like a Mozilla membership card
- or an awesome t-shirt, or to detect and prevent fraud.</li>
- <li>Sometimes, we post or share aggregate, non-personal information with our community to enhance their ability to improve Mozilla’s
- products and services.</li>
- <li>We collect non-personally identifying information contributed to us by our users on an opt-in basis for research and
- product-improvement purposes, like in Test Pilot.</li>
- <li>We never share personal information publicly if we promised to keep it confidential at the time of collection unless we have
- your express permission to do so.</li>
- <li>We sometimes share information with employees, contractors, subsidiaries, contributors or other people working with or for us.
- We always endeavor to make them promise not to disclose or use that information except for Mozilla-related or non-commercial purposes. We always try to put information in non-personally identifying forms when we can.</li>
- <li>When you give us suggestions, comments, and questions about our sites and products, we sometimes make them viewable by other
- people, and they may get re-posted on other sites. Please don't include personal information when you submit comments and feedback,
- or when you post questions or answers on our support site!</li>
+ <li>information which identifies you, like your name or email address; or</li>
+ <li>a combination of several pieces of information which couldn't identify you on their own, but which we believe could
+ become identifiable to you when combined.</li>
</ul>
+ <p>Any information that falls outside of this is "non-personal information." If we store your personal information with information that is non-personal, we will consider the combination as personal information. If we remove all personal information from a set of data then the remaining is non-personal information.</p>
<p><a href="#top" class="top">back to top</a></p>
</section>
<section id="choices" class="section-content">
<h1>Your Choices</h1>
- <h2>Analytics</h2>
- <p>We use web analytics software to keep track of how many visitors we have, which links are most popular, and other information
- about how people use Mozilla websites. We use this information to help make our sites more useful and usable. If you don't want
- your session visit information on our websites to be collected and analyzed by Mozilla (or its third-party analytics providers),
- you can use the <a href="http://www.mozilla.org/opt-out.html">opt-out mechanisms.</a></p>
- <p><em><a href="https://ondemand.webtrends.com/support/optout.asp?action=out">You may opt-out of Webtrends analytics</a> across all
- sites including Mozilla sites.</em></p>
- <h3 class="sub-section-header">Advertising</h3>
- <p>We think that we make great stuff, and we think that folks can get a lot out of using it, so we sometimes advertize on other
- sites. If you have enabled Do Not Track in your browser, our ads on other websites will honor your request not to be tracked. For
- those who are using a browser without DNT, like older versions of Firefox or browsers produced by other vendors, we provide an
- opt-out cookie that you can install by <a href="http://media.mozilla.com/optout.html">visiting this page</a>.</p>
- <p>You have not opted out.</p>
- <p><input type="submit" id="opt_out_advertising" value="Opt-out of advertising tracking now »" class="button"></p>
<h3 class="sub-section-header">Email</h3>
<p>If you signed up to receive a newsletter or other email communication from Mozilla, but no longer wish to do so, you can opt out
from receiving them by following the “unsubscribe” instructions in the next email you receive.</p>
<h3 class="sub-section-header">Do Not Track</h3>
<p>Do Not Track is a feature in Firefox (and some other sweet browsers) which lets you tell websites that you'd rather that they
- don't keep track of you thankyouverymuch. You can <a href="http://dnt.mozilla.org">read more about Do Not Track</a> and how to
+ don't keep track of you. You can <a href="http://dnt.mozilla.org">read more about Do Not Track</a> and how to
turn it on in Firefox.</p>
- <p><a class="button" href="http://dnt.mozilla.org/">Do Not Track Is On »</a></p>
- <h3 class="sub-section-header">Other Stuff</h3>
- <p>In all the stuff we make, there are a bunch of privacy and security settings and a whole load of functionality. There are also
- plenty of add-ons which you can use to get even more control over your online experience, interactions and information:
- <a href="https://addons.mozilla.org/en-US/firefox/extensions/privacy-security/">https://addons.mozilla.org/en-US/firefox/extensions/privacy-security/</a></p>
+ <p><a id="dnt-enabled" class="button" href="http://dnt.mozilla.org/"></a></p>
+ <h3 class="sub-section-header">In Products</h3>
+ <p>In the software we make we include privacy and security settings with a lot of functionality. There are also plenty of <a href="https://addons.mozilla.org/en-US/firefox/extensions/privacy-security/">add-ons for some of our products, like Firefox</a>, which you can use to get even more control over your online experience, interactions and information.</p>
+ <h3 class="sub-section-header">When we share your Information</h3>
+ <p>We may release information in the following situations:</p>
+ <ul>
+ <li>When we tell you we will and you consent to the sharing.</li>
+ <li>For processing or providing products and services to you, but only if those entities receiving your information are contractually obligated to handle the data in ways that are approved by Mozilla.</li>
+ <li>When we engage vendors, we negotiate to include contract terms that require vendors: (a) to limit use of the user information that we provide them only for the provision of their services to us and (b) not to correlate that user information with other information they might have.</li>
+ <li>When we are fulfilling our <a href="http://www.mozilla.org/about/manifesto.html">mission of being open</a>. We sometimes release information to make our products better and foster an open web, but we will try to remove your personal information and disclose it in a way that minimizes the risk of you being re-identified.</li>
+ <li>When the law requires it. We follow the law whenever we receive requests about you from a government or related to a lawsuit, and we'll notify you when we’re asked to hand over your personal information unless we're legally prohibited from doing so. When we receive requests like this, we'll only release your information if we have a good faith belief that the law requires us to do so. Nothing in this policy is intended to limit any legal defenses or objections that you may have to a third party’s request to disclose your information.</li>
+ <li>When we believe it is necessary to prevent harm to you or someone else, provided that we will do so only if we have a good faith belief that it is reasonably necessary to protect the rights, property or safety of you, our other users, Mozilla or the public.</li>
+ <li>If our organizational structure or status changes (if we undergo a restructuring, are acquired, or go bankrupt) we may pass your information to a successor or affiliate.</li>
<p><a href="#top" class="top">back to top</a></p>
</section>
- <section id="third-parties" class="section-content">
- <h1>Third Parties</h1>
- <p>It takes a lot of work to bring you our many websites, products and services, but Mozilla can’t take all the credit. We work with
- a number of third party service providers who we expect will respect your privacy and security.</p>
- <p>Each of our third-party providers is under a licensing agreement with Mozilla. This agreement does three things:</p>
- <ol>
- <li>It prohibits the release of personal or potentially personal information to the public.</li>
- <li>It allows each provider to use this information only in conjunction with the service or services it’s providing.</li>
- <li>It prohibits the correlation of any user data with any information collected through that provider's other products, services or
- Web properties.</li>
- </ol>
- <h3 class="sub-section-header">Current Third Party Service Providers</h3>
- <h4>Third Party Service Providers for Websites and Email</h4>
- <table class="data-table">
- <thead>
- <tr>
- <th>Service Provider</th>
- <th>Purpose</th>
- <th>Privacy Policy Link</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>Webtrends</td>
- <td>Website analytics</td>
- <td>Webtrends Privacy Policy <br /><a href="http://www.webtrends.com/AboutWebtrends/PrivacyPolicy.aspx">http://www.webtrends.com/AboutWebtrends/PrivacyPolicy.aspx</a></td>
- </tr>
- <tr>
- <td>Responsys</td>
- <td>Email</td>
- <td>Your Online Privacy Rights <br /><a href="http://www.responsys.com/legal/privacy.php">http://www.responsys.com/legal/privacy.php</a></td>
- </tr>
- <tr>
- <td>Jobvite</td>
- <td>Job applications</td>
- <td>Jobvite Privacy Policy <br /><a href="http://recruiting.jobvite.com/privacy-policy.php">http://recruiting.jobvite.com/privacy-policy.php</a></td>
- </tr>
- <tr>
- <td>SurveyGizmo</td>
- <td>Website polls and surveys</td>
- <td>The Fine Print <br /><a href="http://www.surveygizmo.com/the-fine-print/">http://www.surveygizmo.com/the-fine-print/</a></td>
- </tr>
- <tr>
- <td>Zazzle</td>
- <td>Online store</td>
- <td>Zazzle Privacy Policy <br /><a href="http://www.zazzle.com/mk/policy/privacy_policy">http://www.zazzle.com/mk/policy/privacy_policy</a></td>
- </tr>
- <tr>
- <td>Merchandise Mania</td>
- <td>Online store</td>
- <td>Terms and Conditions and General Trading Information <br /><a href="http://www.merchandisemania.co.uk/content/terms.html">http://www.merchandisemania.co.uk/content/terms.html</a></td>
- </tr>
- </tbody>
- </table>
- <h4>Third Party Service Providers for Firefox</h4>
- <table class="data-table">
- <thead>
- <tr>
- <th>Service Provider</th>
- <th>Purpose</th>
- <th>Privacy Policy Link</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>Google Geolocation</td>
- <td>Location-aware feature</td>
- <td>Google Geolocation Privacy Policy<br /> <a href="http://www.google.com/privacy/lsf.html">http://www.google.com/privacy/lsf.html</a></td>
- </tr>
- <tr>
- <td>Google Safe Browsing</td>
- <td>Protection against suspected forgery and attack sites feature</td>
- <td>Google Safe Browsing in Mozilla Firefox Version 3+<br /> <a href="http://code.google.com/apis/safebrowsing/firefox3_privacy.html">http://code.google.com/apis/safebrowsing/firefox3_privacy.html</a></td>
- </tr>
- <tr>
- <td>Google</td>
- <td>Search feature</td>
- <td>Google Privacy Center<br /> <a href="http://www.google.com/intl/en/privacy.html">http://www.google.com/intl/en/privacy.html</a></td>
- </tr>
- <tr>
- <td>Microsoft Bing</td>
- <td>Search feature</td>
- <td>Microsoft Bing Privacy Policy<br /> <a href="http://privacy.microsoft.com/en-us/bing.mspx">http://privacy.microsoft.com/en-us/bing.mspx</a></td>
- </tr>
- <tr>
- <td>Yahoo!</td>
- <td>Search feature</td>
- <td>Yahoo! Privacy Center<br /> <a href="http://info.yahoo.com/privacy/us/yahoo/details.html">http://info.yahoo.com/privacy/us/yahoo/details.html</a></td>
- </tr>
- <tr>
- <td>Amazon.com</td>
- <td>Search feature</td>
- <td>Amacon.com Privacy Notice <a href="http://www.amazon.com/gp/help/customer/display.html/ref=hp_lnav_dyn?ie=UTF8&amp;nodeId=468496">http://www.amazon.com/gp/help/customer/display.html/ref=hp_lnav_dyn?ie=UTF8&amp;nodeId=468496</a></td>
- </tr>
- <tr>
- <td>eBay</td>
- <td>Search feature</td>
- <td>eBay Privacy Policy<br /> <a href="http://pages.ebay.com/help/policies/privacy-policy.html">http://pages.ebay.com/help/policies/privacy-policy.html</a></td>
- </tr>
- <tr>
- <td>Wikipedia</td>
- <td>Search feature</td>
- <td>Wikipedia Privacy Policy<br /> <a href="http://wikimediafoundation.org/wiki/Privacy_policy">http://wikimediafoundation.org/wiki/Privacy_policy</a></td>
- </tr>
- </tbody>
- </table>
- <p>Note: We will try to keep this information updated, but we may sometimes fall behind. If you have questions about who provides services for Mozilla, then please email us at privacy at mozilla dot com.</p>
+ <section id="contactus" class="section-content">
+ <h1>Contact Us</h1>
+ <p>Mozilla Corporation<br />
+ Attn: Legal Notices - Privacy<br />
+ 650 Castro Street, Suite 300<br />
+ Mountain View, CA 94041-2729<br />
+ Phone: +1-650-903-0800</p>
+
+ {% include "privacy/privacy_contact.html" %}
<p><a href="#top" class="top">back to top</a></p>
</section>
</article>
<aside class="sidebar reference">
<h4>Our Privacy Policies</h4>
<p>Mozilla's specific privacy policies for our many websites, products and services:</p>
<ul class="policy-nav">
- <li><a href="{{ url('privacy.websites') }}" class="policy-moz-websites">Mozilla Websites</a></li>
- <li><a href="{{ url('privacy.firefox') }}" class="policy-firefox">Firefox</a></li>
- <li><a href="{{ url('privacy.thunderbird') }}" class="policy-thunderbird">Thunderbird</a></li>
- <li><a href="{{ url('privacy.marketplace') }}" class="policy-marketplace">Marketplace</a></li>
- <li><a href="{{ url('privacy.persona') }}" class="policy-persona">Persona</a></li>
- <li><a href="{{ url('privacy.sync') }}" class="policy-sync">Sync</a></li>
- <li><a href="{{ url('privacy.test-pilot') }}" class="policy-test-pilot">Test Pilot</a></li>
+ <li><a href="http://www.mozilla.org/en-US/privacy-policy.html" class="policy-moz-websites">Mozilla Websites</a></li>
+ <li><a href="http://www.mozilla.org/en-US/legal/privacy/firefox.html" class="policy-firefox">Firefox</a></li>
+ <li><a href="http://www.mozilla.org/en-US/thunderbird/legal/privacy/" class="policy-thunderbird">Thunderbird</a></li>
+ <li><a href="https://marketplace.mozilla.org/privacy-policy" class="policy-marketplace">Marketplace</a></li>
+ <li><a href="http://www.mozilla.org/en-US/persona/privacy-policy/" class="policy-persona">Persona</a></li>
+ <li><a href="https://services.mozilla.com/privacy-policy/" class="policy-sync">Sync</a></li>
+ <li><a href="https://testpilot.mozillalabs.com/privacy.php" class="policy-test-pilot">Test Pilot</a></li>
</ul>
+ <div class="get-involved">
+ <h4>Get Involved</h4>
+ <p>To review and comment on proposed changes to our privacy policies <a href="https://groups.google.com/forum/?fromgroups#!forum/mozilla.governance">subscribe to Mozilla's Governance Group</a>.</p>
+ <p>Our ongoing work on privacy is covered by the <a href="https://blog.mozilla.org/privacy/ ">Privacy &amp; Data Safety Blog</a> and information about our ongoing work is available on <a href="https://wiki.mozilla.org/Privacy">Mozilla's privacy team wiki</a>.</p>
+ </div>
</aside>
</div>
</div>
{% endblock %}
+
+{% block email_form %}{% endblock %}
+
+{% block js %}
+ {{ js('privacy') }}
+ <script>Mozilla.Pager.AUTO_ROTATE_INTERVAL = 5000;</script>
+{% endblock %}
View
25 apps/privacy/templates/privacy/privacy_contact.html
@@ -0,0 +1,25 @@
+{% if not form_submitted %}
+ <form name="contact_privacy" id="contact_privacy" action="#contactus" method="post">
+ <fieldset>
+ <legend>Requests or other questions</legend>
+ <div class="field">
+ {{ form.name.errors }}
+ <label for="id_name" class="open-sans-light">Your name:</label>
+ {{ form.name }}
+ </div>
+ <div class="field">
+ {{ form.sender.errors }}
+ <label for="id_sender">Your email:</label>
+ {{ form.sender }}
+ </div>
+ <div class="field">
+ {{ form.comments.errors }}
+ <label for="id_comments">Your comments:</label><br />
+ {{ form.comments }}
+ </div>
+ <input type="submit" class="button" value="Send comments&nbsp;»" id="contact_privacy_submit" />
+ </fieldset>
+ </form>
+{% else %}
+ <p>Thank you for sending us your questions or comments. A member of the privacy team will be in contact shortly.</p>
+{% endif %}
View
0 apps/privacy/tests/__init__.py
No changes.
View
39 apps/privacy/tests/test_views.py
@@ -0,0 +1,39 @@
+from django.core import mail
+from django.test.client import Client
+
+from mozorg.tests import TestCase
+from funfactory.urlresolvers import reverse
+
+from nose.tools import eq_
+
+
+class PrivacyFormTest(TestCase):
+ def setUp(self):
+ self.client = Client()
+ self.contact = 'foo@bar.com'
+ with self.activate('en-US'):
+ self.url = reverse('privacy.index')
+ self.data = {
+ 'name': 'Tester',
+ 'sender': self.contact,
+ 'comments': 'It works!',
+ }
+
+ def tearDown(self):
+ mail.outbox = []
+
+ def test_send_privacy_contact(self):
+ self.client.post(self.url, self.data)
+
+ # Test that message has been sent.
+ eq_(len(mail.outbox), 1)
+
+ outbox = mail.outbox[0]
+ # Verify that it has the correct subject
+ eq_(outbox.subject, 'Message sent from Privacy Hub')
+
+ # Verify sender
+ eq_(outbox.from_email, self.contact)
+
+ # Verify recipient
+ eq_(outbox.to, ['privacy@mozilla.com'])
View
30 apps/privacy/urls.py
@@ -4,19 +4,19 @@
from privacy import views
urlpatterns = patterns('',
- page('privacy', 'privacy/index.html'),
- page('privacy/policies/firefox', 'privacy/firefox.html'),
- page('privacy/policies/websites', 'privacy/websites.html'),
- page('privacy/policies/thunderbird', 'privacy/thunderbird.html'),
- page('privacy/policies/marketplace', 'privacy/marketplace.html'),
- page('privacy/policies/persona', 'privacy/persona.html'),
- page('privacy/policies/sync', 'privacy/sync.html'),
- page('privacy/policies/test-pilot', 'privacy/test-pilot.html'),
- page('privacy/policies/archive/firefox-octobe-2006', 'privacy/archive/firefox-october-2006.html'),
- page('privacy/policies/archive/firefox-june-2008', 'privacy/archive/firefox-june-2008.html'),
- page('privacy/policies/archive/firefox-january-2009', 'privacy/archive/firefox-january-2009.html'),
- page('privacy/policies/archive/firefox-mobile-september-2009', 'privacy/archive/firefox-mobile-september-2009.html'),
- page('privacy/policies/archive/firefox-january-2010', 'privacy/archive/firefox-january-2010.html'),
- page('privacy/policies/archive/firefox-december-2010', 'privacy/archive/firefox-december-2010.html'),
- url(r'^privacy/policies/facebook/$', views.facebook, name='privacy/facebook'),
+ page('/policies/firefox', 'privacy/firefox.html'),
+ page('/policies/websites', 'privacy/websites.html'),
+ page('/policies/thunderbird', 'privacy/thunderbird.html'),
+ page('/policies/marketplace', 'privacy/marketplace.html'),
+ page('/policies/persona', 'privacy/persona.html'),
+ page('/policies/sync', 'privacy/sync.html'),
+ page('/policies/test-pilot', 'privacy/test-pilot.html'),
+ page('/policies/archive/firefox-octobe-2006', 'privacy/archive/firefox-october-2006.html'),
+ page('/policies/archive/firefox-june-2008', 'privacy/archive/firefox-june-2008.html'),
+ page('/policies/archive/firefox-january-2009', 'privacy/archive/firefox-january-2009.html'),
+ page('/policies/archive/firefox-mobile-september-2009', 'privacy/archive/firefox-mobile-september-2009.html'),
+ page('/policies/archive/firefox-january-2010', 'privacy/archive/firefox-january-2010.html'),
+ page('/policies/archive/firefox-december-2010', 'privacy/archive/firefox-december-2010.html'),
+ url(r'^/$', views.privacy, name='privacy.index'),
+ url(r'^/policies/facebook/$', views.facebook, name='privacy/facebook'),
)
View
29 apps/privacy/views.py
@@ -1,7 +1,36 @@
import l10n_utils
+import jingo
+
from commonware.response.decorators import xframe_allow
+from django.core.mail import EmailMessage
+
+from forms import PrivacyContactForm
+
@xframe_allow
def facebook(request):
return l10n_utils.render(request, 'privacy/facebook.html')
+
+
+def privacy(request):
+ form = PrivacyContactForm()
+ form_submitted = False
+ if request.method == 'POST':
+ form = PrivacyContactForm(request.POST)
+
+ if form.is_valid():
+ subject = 'Message sent from Privacy Hub'
+ sender = form.cleaned_data['sender']
+ to = ['privacy@mozilla.com']
+ msg = jingo.render_to_string(request, 'privacy/emails/info.txt', form.cleaned_data)
+ headers = {'Reply-To': sender}
+
+ email = EmailMessage(subject, msg, sender, to, headers=headers)
+ email.send()
+ form_submitted = True
+
+ return l10n_utils.render(request, 'privacy/index.html', {
+ 'form': form,
+ 'form_submitted': form_submitted
+ })
View
2 media/css/privacy.less
@@ -97,7 +97,7 @@ table.data-table tbody tr td:first-child {
margin: 24px 0 24px 0;
}
.policy-nav {
- margin: 0;
+ margin: 0 0 1em 0;
padding: 0;
li {
margin-left: 0;
View
34 media/js/privacy.js
@@ -0,0 +1,34 @@
+/*global $:true, isDoNotTrackEnabled:true */
+$(function() {
+ "use strict";
+
+ // Detects whether do not track is enabled and takes one of two possible actions:
+ // 1. If an element with the id #dnt-enabled exists it will
+ // 1.1 if positive, set the element text to the positive message text below
+ // 1.2 if negative, set the element text to the negative message text and, change
+ // the class of the element to button insensitive instead of the default of button
+ // 2. If an element with the id #dnt-enabled does not exist, the function will simply
+ // either return true or false.
+ function setDoNotTrackStatus() {
+ var enabled = window.navigator.doNotTrack === "yes",
+ dntEnabledButton = document.getElementById("dnt-enabled"),
+ msgText = enabled ? document.createTextNode("Do Not Track Is On »") : document.createTextNode("Do Not Track Is Off »");
+
+ if(enabled) {
+ if(dntEnabledButton) {
+ dntEnabledButton.appendChild(msgText);
+ } else {
+ return true;
+ }
+ } else {
+ if(dntEnabledButton) {
+ dntEnabledButton.appendChild(msgText);
+ dntEnabledButton.setAttribute("class", "button insensitive");
+ } else {
+ return false;
+ }
+ }
+ }
+
+ setDoNotTrackStatus();
+});
View
4 settings/base.py
@@ -357,6 +357,10 @@ def JINJA_CONFIG():
'js/partnerships.js',
'js/mozilla-input-placeholder.js',
),
+ 'privacy': (
+ 'js/mozilla-pager.js',
+ 'js/privacy.js',
+ ),
'styleguide': (
'js/styleguide.js',
),
View
2 templates/base-resp.html
@@ -86,7 +86,7 @@
</div>
<ul class="footer-nav">
<li><a href="{{ php_url('/about/contact.html#map-mountain_view') }}">{{_('Contact Us')}}</a></li>
- <li><a href="{{ php_url('/privacy-policy.html') }}">{{_('Privacy Policy')}}</a></li>
+ <li><a href="{{ url('privacy.index') }}">{{_('Privacy Policy')}}</a></li>
<li><a href="{{ php_url('/about/legal.html') }}">{{_('Legal Notices')}}</a></li>
<li><a href="{{ php_url('/legal/fraud-report/index.html') }}">{{_('Report Trademark Abuse')}}</a></li>
</ul>
View
2 templates/base.html
@@ -82,7 +82,7 @@
</div>
<ul class="footer-nav">
<li><a href="{{ php_url('/about/contact.html#map-mountain_view') }}">{{_('Contact Us')}}</a></li>
- <li><a href="{{ php_url('/privacy-policy.html') }}">{{_('Privacy Policy')}}</a></li>
+ <li><a href="{{ url('privacy.index') }}">{{_('Privacy Policy')}}</a></li>
<li><a href="{{ php_url('/about/legal.html') }}">{{_('Legal Notices')}}</a></li>
<li><a href="{{ php_url('/legal/fraud-report/index.html') }}">{{_('Report Trademark Abuse')}}</a></li>
</ul>
View
2 urls.py
@@ -25,7 +25,7 @@
(r'', include('redirects.urls')),
(r'', include('firefox.urls')),
(r'', include('mozorg.urls')),
- (r'', include('privacy.urls')),
+ (r'^privacy', include('privacy.urls')),
(r'', include('research.urls')),
# L10n example.

0 comments on commit 15f3da1

Please sign in to comment.
Something went wrong with that request. Please try again.