Index: pages/uninstall-abp.tmpl |
=================================================================== |
new file mode 100644 |
--- /dev/null |
+++ b/pages/uninstall-abp.tmpl |
@@ -0,0 +1,85 @@ |
+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() |
+ { |
+ 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
|
+ { |
+ var paramSplit = param.split("="); |
+ var paramName = paramSplit[0]; |
+ var paramValue = paramSplit[1]; |
+ |
+ var input = document.createElement("input"); |
+ input.setAttribute("type", "hidden"); |
+ 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.
|
+ input.setAttribute("name", paramName); |
+ if (paramValue) |
+ input.setAttribute("value", paramValue); |
+ |
+ 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.
|
+ }); |
+ |
+ var form = document.getElementsByTagName("form")[0]; |
+ document.getElementById("reasonOther").addEventListener("change", |
+ function() |
+ { |
+ var textArea = form.getElementsByTagName("textarea")[0]; |
+ textArea.hasAttribute("class") ? textArea.removeAttribute("class") : |
+ textArea.setAttribute("class", "hidden"); |
+ }, false); |
+ |
+ 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.
|
+ 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 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.
|
+ <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="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.
|
+ <span>{{"Other, namely..."|translate("reason-other", "Last uninstallation reason")}}</span> |
+ </label> |
+ <textarea 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> |
+ <div id="paramsWrapper"></div> |
+ <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
|
+ <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.
|
+ </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> |