Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: pages/uninstall-abp.tmpl

Issue 29329984: Issue 3257 - Create uninstallation page in adblockplus.org (Closed)
Patch Set: Addressed Thomas initiall comments Created Nov. 12, 2015, 3:43 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « filters/shuffle.py ('k') | pages/uninstall-abp-submit.tmpl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pages/uninstall-abp.tmpl
===================================================================
new file mode 100644
--- /dev/null
+++ b/pages/uninstall-abp.tmpl
@@ -0,0 +1,81 @@
+title=Adblock Plus has been uninstalled
+template=simple
+
+{% set reasons = [
+ ("1v0", "reason-not-installed", "I didn't install Adblock Plus."),
+ ("2v0", "reason-slowing-down", "Adblock Plus slowed down my browser."),
+ ("3v0", "reason-acceptable-ads", "I don't like the Acceptable Ads program."),
+ ("4v0", "reason-see-ads", "Adblock Plus didn't block all ads."),
+ ("5v0", "reason-better-adblocker", "I found better ad blocking software."),
+ ("6v0", "reason-break-websites", "Adblock Plus breaks websites that I visit.")
+ ] %}
+
+<head>
+ <meta name="robots" content="noindex" />
+
+ <script type="text/javascript">
+ (function()
+ {
+ function init()
+ {
+ var form = document.getElementById("reasons-form");
+ window.location.search.substr(1).split("&").forEach(function(param)
+ {
+ if (!/.=./.test(param))
+ return;
+
+ var paramSplit = param.split("=");
+ var input = document.createElement("input");
+ input.setAttribute("type", "hidden");
+ input.setAttribute("name", paramSplit[0]);
+ input.setAttribute("value", paramSplit[1]);
+ form.appendChild(input);
+ });
+
+ document.getElementById("reason-other").addEventListener("change",
+ function()
+ {
+ var textArea = document.getElementById("reason-other-input");
+ textArea.hasAttribute("class") ? textArea.removeAttribute("class") :
+ textArea.setAttribute("class", "hidden");
+ }, false);
+
+ document.getElementById("submit-form").addEventListener("click",
+ function(event)
+ {
+ if (!document.querySelector("ul input:checked"))
+ {
+ event.preventDefault();
+ form.setAttribute("class", "error");
+ }
+ }, false);
+ }
+ document.addEventListener("DOMContentLoaded", init, false);
+ })();
+ </script>
+</head>
+<section class="highlighted">
+ <h1>{{"Please select the reason(s) why you uninstalled Adblock Plus:"|translate("reasons-header", "Form heading")}}</h1>
+ <form id="reasons-form" action="uninstall-abp-submit" method="post">
+ <ul>
+ {%- for reasonId, stringId, value in reasons|shuffle %}
+ <li>
+ <label>
+ <input type="checkbox" name="reason" value="{{reasonId}}" />
+ <span>{{value|translate(stringId, "One of the listed uninstallation reason")}}</span>
+ </label>
+ </li>
+ {%- endfor %}
+ <li>
+ <label>
+ <input id="reason-other" type="checkbox" name="reason" value="0v0" />
+ <span>{{"Other, namely..."|translate("reason-other", "Last uninstallation reason")}}</span>
+ </label>
+ <textarea id="reason-other-input" class="hidden" name="reasonOther" placeholder="{{"Please explain why you are uninstalling Adblock Plus"|translate("reason-other-placeholder", "Textarea placeholder text, appears after selecting 'Other, namely...' option")}}"></textarea>
+ </li>
+ </ul>
+ <button id="submit-form" type="submit">{{"Submit"|translate("submit", "Submit button text")}}</button>
+ <span class="error-label">{{"Please select at least one of the options above"|translate("error-msg", "Error message, is being shown after submission if no item selected")}}</span>
+ </form>
+ <p class="disclaimer">{{"By clicking Submit, you are sending your response to Adblock Plus. Please see our <a href='https://adblockplus.org/privacy'>privacy policy</a>."|translate("disclaimer", "Disclaimer below form")}}</p>
+</section>
« no previous file with comments | « filters/shuffle.py ('k') | pages/uninstall-abp-submit.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld