OLD | NEW |
(Empty) | |
| 1 title=Get whitelisted |
| 2 description=Fill out the form to get whitelisted |
| 3 |
| 4 <style type="text/css"> |
| 5 #acceptable_ads, .showError #error-msg |
| 6 { |
| 7 display: block; |
| 8 } |
| 9 #WebToLeadForm.non-publishers #acceptable_ads, |
| 10 #WebToLeadForm.non-publishers .semioptional em, #error-msg |
| 11 { |
| 12 display: none; |
| 13 } |
| 14 .semioptional em |
| 15 { |
| 16 display: inline; |
| 17 } |
| 18 </style> |
| 19 |
| 20 <script type="text/javascript"> |
| 21 function check_webtolead_fields() |
| 22 { |
| 23 if (document.getElementById("req_id") != null) |
| 24 { |
| 25 var required = document.getElementById("req_id").value; |
| 26 required = required.substring(0, required.lastIndexOf(';')); |
| 27 var requiredFields = required.split(';'); |
| 28 |
| 29 // Some of the fields are optional only for publishers |
| 30 if (form.className == "non-publisher") |
| 31 { |
| 32 var semioptionalLabels = document.getElementsByClassName("semioptional")
; |
| 33 for (var i = 0; i < semioptionalLabels.length; i++) |
| 34 { |
| 35 requiredFields.push(semioptionalLabels[i].getAttribute("for")); |
| 36 } |
| 37 } |
| 38 |
| 39 var requireFilled = true; |
| 40 for (var i = 0; i < requiredFields.length; i++) |
| 41 { |
| 42 var field = document.getElementById(requiredFields[i]); |
| 43 if (field.value.length <= 0 || field.value == 0) |
| 44 { |
| 45 requireFilled = false; |
| 46 break; |
| 47 } |
| 48 } |
| 49 if (requireFilled) |
| 50 { |
| 51 document.WebToLeadForm.submit(); |
| 52 return true; |
| 53 } |
| 54 else |
| 55 { |
| 56 showError("Please provide all the required fields"); |
| 57 return false; |
| 58 } |
| 59 return false |
| 60 } |
| 61 else |
| 62 document.WebToLeadForm.submit(); |
| 63 } |
| 64 |
| 65 function validateEmailAdd() |
| 66 { |
| 67 var emailField = document.getElementById("email1"); |
| 68 if (emailField && emailField.value.length > 0 && |
| 69 emailField.value.match(/^\w+(['\.\-\+]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$
/) == null) |
| 70 { |
| 71 return false; |
| 72 } |
| 73 |
| 74 return true; |
| 75 } |
| 76 |
| 77 // Custom form validation |
| 78 var isHuman = false; |
| 79 var partnerTypeElement = null; |
| 80 var form = null; |
| 81 var requiredElement = null; |
| 82 var aaInput = null; |
| 83 var partnerType = ""; |
| 84 var errorElement = null; |
| 85 |
| 86 function validateAndSubmit() |
| 87 { |
| 88 if (!isHuman) |
| 89 showError("To prevent spam the form has not been submitted"); |
| 90 else |
| 91 { |
| 92 if (!validateEmailAdd()) |
| 93 { |
| 94 showError("Not a valid email address"); |
| 95 return false; |
| 96 } |
| 97 |
| 98 form.action = "https://eyeo.sugarondemand.com/index.php?entryPoint=WebToLe
adCapture"; |
| 99 check_webtolead_fields(); |
| 100 } |
| 101 } |
| 102 |
| 103 function showError(msg) |
| 104 { |
| 105 if ("textContent" in errorElement) |
| 106 errorElement.textContent = msg; |
| 107 else // IE8 |
| 108 errorElement.innerText = msg; |
| 109 |
| 110 form.className = form.className + " showError" |
| 111 } |
| 112 |
| 113 // Mark semioptional fields as required for non publishers group |
| 114 function updateSemioptional(required) |
| 115 { |
| 116 var semioptionalLabels = document.getElementsByClassName("semioptional"); |
| 117 for (var i = 0; i < semioptionalLabels.length; i++) |
| 118 { |
| 119 var semioptionalId = semioptionalLabels[i].getAttribute("for"); |
| 120 document.getElementById(semioptionalId).required = required; |
| 121 } |
| 122 } |
| 123 |
| 124 function updateForm() |
| 125 { |
| 126 var partnerType = partnerTypeElement[partnerTypeElement.selectedIndex]; |
| 127 if (partnerType.id != "publishers") |
| 128 { |
| 129 form.className = "non-publishers"; |
| 130 // Field is marked as required in CRM application, but it shouldn't |
| 131 if (!aaInput.value) |
| 132 aaInput.value = "none"; |
| 133 |
| 134 updateSemioptional(true); |
| 135 } |
| 136 else |
| 137 { |
| 138 form.className = ""; |
| 139 aaInput.value = aaInput.value == "none" ? "" : aaInput.value; |
| 140 |
| 141 updateSemioptional(false); |
| 142 } |
| 143 } |
| 144 |
| 145 document.addEventListener("DOMContentLoaded", function() |
| 146 { |
| 147 partnerTypeElement = document.getElementById("partner_type_c"); |
| 148 form = document.getElementById("WebToLeadForm"); |
| 149 requiredElement = document.getElementById("req_id"); |
| 150 aaInput = document.getElementById("website_with_acceptable_ads_c"); |
| 151 errorElement = document.getElementById("error-msg"); |
| 152 |
| 153 // Get partner type from URL |
| 154 partnerType = location.search.split("type=")[1]; |
| 155 var option = document.getElementById(partnerType); |
| 156 if (option) |
| 157 { |
| 158 document.getElementById(partnerType).selected = true; |
| 159 updateForm(); |
| 160 } |
| 161 |
| 162 partnerTypeElement.addEventListener("change", function() |
| 163 { |
| 164 updateForm(); |
| 165 }); |
| 166 document.getElementById("email1").addEventListener("change", function() |
| 167 { |
| 168 // Spam protection |
| 169 isHuman = true; |
| 170 validateEmailAdd(); |
| 171 |
| 172 }, false); |
| 173 form.addEventListener("submit", function(ev) |
| 174 { |
| 175 ev.preventDefault(); |
| 176 validateAndSubmit(); |
| 177 // prevent submition |
| 178 return false; |
| 179 }, false); |
| 180 }, false); |
| 181 </script> |
| 182 |
| 183 <div class="col-6 expand-on-tablet" markdown="1"> |
| 184 |
| 185 <form id="WebToLeadForm" class="publishers section" method="POST" name="WebToL
eadForm" markdown="1"> |
| 186 |
| 187 # {{get-whitelisted Get whitelisted}} |
| 188 |
| 189 --- |
| 190 |
| 191 <div class="section" markdown="1"> |
| 192 {{make-web-better[subtitle] We love the web, but we think it can improve. Help u
s make it a better place!}} |
| 193 |
| 194 {{about-acceptable-ads[paragraph] The Acceptable Ads initiative is simple: if yo
ur ads are nonintrusive and abide by the [Acceptable Ads criteria](about/criteri
a), they will be seen by a much larger audience, thus increasing your traffic an
d revenue. It's easy to join; many advertisers and publishers already benefit fr
om the initiative. }} |
| 195 |
| 196 {{before-applying[notice] **Important**: Before filling out the form please ensu
re your ads meet the [Acceptable Ads criteria](about/criteria). }} |
| 197 |
| 198 <noscript> |
| 199 <p class="bg-error p-a-sm m-y-sm"> |
| 200 {{enable-javascript This form requires JavaScript to be enabled to limit the
amount of spam we get. Please consider enabling it for this page, or write an e
mail to <a href="mailto:acceptableads@adblockplus.org">acceptableads@adblockplus
.org</a>.}} |
| 201 </p> |
| 202 </noscript> |
| 203 </div> |
| 204 |
| 205 <label for="partner_type_c"> |
| 206 {{partner-type Partner Type}} |
| 207 </label> |
| 208 <select id="partner_type_c" name="partner_type_c" tabindex="1"> |
| 209 <option id="publishers" selected="selected" value="Publisher">{{publishers Pub
lishers}}</option> |
| 210 <option id="ad-networks" value="Ad Network">{{ad-networks Ad Networks}}</optio
n> |
| 211 <option id="advertisers" value="Advertiser">{{advertisers Advertisers}}</optio
n> |
| 212 <option id="ad-tech-suppliers" value="Ad Tech supplier">{{tech-suppliers Ad Te
ch suppliers}}</option> |
| 213 </select> |
| 214 |
| 215 <label class="semioptional" for="account_name" id="account_name_label"> |
| 216 {{company-name Company Name}} <em>{{optional[Optional field label] (optional)}
}</em> |
| 217 </label> |
| 218 <input id="account_name" type="text" name="account_name" /> |
| 219 |
| 220 <label for="first_name"> |
| 221 {{first-name First Name}} |
| 222 </label> |
| 223 <input id="first_name" type="text" name="first_name" required /> |
| 224 |
| 225 <label for="last_name"> |
| 226 {{last-name Last Name}} |
| 227 </label> |
| 228 <input id="last_name" type="text" name="last_name" required /> |
| 229 |
| 230 <label class="semioptional" for="title"> |
| 231 {{job-title Job Title}} <em>{{optional}}</em> |
| 232 </label> |
| 233 <input id="title" type="text" name="title" /> |
| 234 |
| 235 <label for="website"> |
| 236 {{website Company Website}} <em>{{optional}}</em> |
| 237 </label> |
| 238 <input id="website" type="text" name="website" /> |
| 239 |
| 240 <label for="email1"> |
| 241 {{email Email Address}} |
| 242 </label> |
| 243 <input id="email1" type="email" name="email1" required /> |
| 244 |
| 245 <div id="acceptable_ads" markdown="1"> |
| 246 <label for="website_with_acceptable_ads_c"> |
| 247 {{aa-url1 Exact URL with acceptable ads}} |
| 248 </label> |
| 249 <input id="website_with_acceptable_ads_c" type="text" name="website_with_accep
table_ads_c" /> |
| 250 <label for="second_website_with_acc_ads_c"> |
| 251 {{aa-url2 Exact second URL with acceptable ads}} <em>{{optional}}</em> |
| 252 </label> |
| 253 <input id="second_website_with_acc_ads_c" type="text" name="second_website_wit
h_acc_ads_c" /> |
| 254 <label for="third_website_with_acc_ads_c"> |
| 255 {{aa-url3 Exact third URL with acceptable ads}} <em>{{optional}}</em> |
| 256 </label> |
| 257 <input id="third_website_with_acc_ads_c" type="text" name="third_website_with_
acc_ads_c" /> |
| 258 </div> |
| 259 |
| 260 <label for="description"> |
| 261 {{comments Comments}} <em>{{optional}}</em> |
| 262 </label> |
| 263 <textarea id="description" name="description" rows="14"></textarea> |
| 264 |
| 265 <p class="m-y-md" markdown="1"> |
| 266 {{privacy-policy[Privacy policy note] **Privacy policy:** Your information will
be stored and used only to handle this application and to respond to your inquir
y. It will never be shared with any third party. If you would like to have your
information removed from our database, please email us at [acceptableads@adblock
plus.org](mailto:acceptableads@adblockplus.org).}} |
| 267 </p> |
| 268 |
| 269 error |
| 270 {: #error-msg .bg-error .p-a-sm .m-y-sm } |
| 271 |
| 272 <p class="inline-buttons"> |
| 273 <input class="btn-outline-primary" type="reset" name="reset" value="{{clear Clea
r}}" /> |
| 274 <input class="btn-primary" id="submit_button" type="submit" name="Submit" value=
"{{submit Submit}}" /> |
| 275 </p> |
| 276 |
| 277 <input id="redirect_url" type="hidden" name="redirect_url" value="https://accept
ableads.com/get-whitelisted/thank-you"> |
| 278 <input id="campaign_id" type="hidden" name="campaign_id" value="40e41f0e-ee21-92
43-b374-57319a53b6f1"> |
| 279 <input id="assigned_user_id" type="hidden" name="assigned_user_id" value="652b2e
55-db9d-c45d-e982-51e3ee13f0d8"> |
| 280 <input id="team_id" type="hidden" name="team_id" value="1"> |
| 281 <input id="team_set_id" type="hidden" name="team_set_id" value="Global"> |
| 282 <input id="req_id" type="hidden" name="req_id" value="partner_type_c;first_name;
last_name;email1;website_with_acceptable_ads_c;"> |
| 283 |
| 284 </form> |
| 285 </div> |
OLD | NEW |