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

Side by Side Diff: pages/uninstall-abp.tmpl

Issue 29329984: Issue 3257 - Create uninstallation page in adblockplus.org (Closed)
Patch Set: Created Nov. 11, 2015, 5:43 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 title=Adblock Plus has been uninstalled
2 template=simple
3
4 {% set reasons = [
5 ("1v0", "reason-not-installed", "I didn't install Adblock Plus."),
6 ("2v0", "reason-slowing-down", "Adblock Plus slowed down my browser."),
7 ("3v0", "reason-acceptable-ads", "I don't like the Acceptable Ads program.") ,
8 ("4v0", "reason-see-ads", "Adblock Plus didn't block all ads."),
9 ("5v0", "reason-better-adblocker", "I found better ad blocking software."),
10 ("6v0", "reason-break-websites", "Adblock Plus breaks websites that I visit. ")
11 ] %}
12
13 <head>
14 <meta name="robots" content="noindex" />
15
16 <script type="text/javascript">
17 (function()
18 {
19 function init()
20 {
21 window.location.search.substr(1).split("&").forEach(function(param)
Thomas Greiner 2015/11/11 19:08:29 According to the ticket description the page is su
saroyanm 2015/11/12 15:50:24 Yes you right, I should have left a note regarding
22 {
23 var paramSplit = param.split("=");
24 var paramName = paramSplit[0];
25 var paramValue = paramSplit[1];
26
27 var input = document.createElement("input");
28 input.setAttribute("type", "hidden");
29 if (paramName)
Thomas Greiner 2015/11/11 19:08:28 What do you want to check for? If there's no name
saroyanm 2015/11/12 15:50:24 Fare enough. Done.
30 input.setAttribute("name", paramName);
31 if (paramValue)
32 input.setAttribute("value", paramValue);
33
34 document.getElementById("paramsWrapper").appendChild(input);
Thomas Greiner 2015/11/11 19:08:28 Since those input fields are hidden anyway, it doe
saroyanm 2015/11/12 15:50:24 Done.
35 });
36
37 var form = document.getElementsByTagName("form")[0];
38 document.getElementById("reasonOther").addEventListener("change",
39 function()
40 {
41 var textArea = form.getElementsByTagName("textarea")[0];
42 textArea.hasAttribute("class") ? textArea.removeAttribute("class") :
43 textArea.setAttribute("class", "hidden");
44 }, false);
45
46 form.getElementsByTagName("button")[0].addEventListener("click",
Thomas Greiner 2015/11/11 19:08:28 In this case I'd recommend using `getElementsById`
saroyanm 2015/11/12 15:50:24 Done.
47 function(event)
48 {
49 if (!document.querySelector("ul input:checked"))
50 {
51 event.preventDefault();
52 form.setAttribute("class", "error");
53 }
54 }, false);
55 }
56 document.addEventListener("DOMContentLoaded", init, false);
57 })();
58 </script>
59 </head>
60 <section class="highlighted">
61 <h1>{{"Please select the reason(s) why you uninstalled Adblock Plus:"|translat e("reasons-header", "Form heading")}}</h1>
62 <form action="uninstall-abp-submit" method="get">
Thomas Greiner 2015/11/11 19:08:28 According to the ticket description the form shoul
saroyanm 2015/11/12 15:50:24 Ohh wow, thanks.
63 <ul>
64 {%- for reasonId, stringId, value in reasons|shuffle %}
65 <li>
66 <label>
67 <input type="checkbox" name="reason" value="{{reasonId}}" />
68 <span>{{value|translate(stringId, "One of the listed uninstallation re ason")}}</span>
69 </label>
70 </li>
71 {%- endfor %}
72 <li>
73 <label>
74 <input id="reasonOther" type="checkbox" name="reason" value="0v0" />
Thomas Greiner 2015/11/11 19:08:28 Detail: This ID value is not corresponding to our
saroyanm 2015/11/12 15:50:25 Ahh right! Done.
75 <span>{{"Other, namely..."|translate("reason-other", "Last uninstallat ion reason")}}</span>
76 </label>
77 <textarea class="hidden" name="reasonOther" placeholder="{{"Please expla in why you are uninstalling Adblock Plus"|translate("reason-other-placeholder", "Textarea placeholder text, appears after selecting 'Other, namely...' option")} }"></textarea>
78 </li>
79 </ul>
80 <div id="paramsWrapper"></div>
81 <button type="submit">{{"Submit"|translate("submit", "Submition button text" )}}</button>
Thomas Greiner 2015/11/11 19:08:28 Typo: Replace "Submition button text" with "Submit
Thomas Greiner 2015/11/11 19:08:29 Note that this form will work even for visitors th
saroyanm 2015/11/12 15:50:24 I think if we can disable form submission for peop
saroyanm 2015/11/12 15:50:25 Done.
Thomas Greiner 2015/11/27 19:10:10 I suppose server-side generation of the form is of
82 <span class="error-label">{{"Please select at least one of the options above "|translate("error-msg", "Error msg, is being shown after submission if no item selected")}}</span>
Thomas Greiner 2015/11/11 19:08:29 Detail: Shortening "message" to "msg" here makes t
saroyanm 2015/11/12 15:50:24 Done.
83 </form>
84 <p class="disclaimer">{{"By clicking Submit, you are sending your response to Adblock Plus. Please see our <a href='https://adblockplus.org/privacy'>privacy p olicy</a>."|translate("disclaimer", "Disclaimer below form")}}</p>
85 </section>
OLDNEW
« no previous file with comments | « filters/shuffle.py ('k') | pages/uninstall-abp-submit.tmpl » ('j') | static/css/simple.css » ('J')

Powered by Google App Engine
This is Rietveld