]> git.ipfire.org Git - ipfire.org.git/blame - src/templates/donate/donate.html
donate: Make help texts narrow as the rest of the page
[ipfire.org.git] / src / templates / donate / donate.html
CommitLineData
c7bcb9ca 1{% extends "../base.html" %}
95b30f84 2
9b5ac075 3{% block title %}{{ _("Donate") }}{% end block %}
95b30f84 4
60b0917c 5{% block container %}
95b30f84
MT
6 {% set amounts = (10, 25, 50, 75, 100, 250) %}
7
0ccdfa9d
MT
8 <section>
9 <div class="container">
10 <div class="row">
11 <div class="col col-lg-6">
12 <h1 class="display-2">{{ _("Donate") }}</h1>
13
14 <p>
15 {{ _("Please support our project with your donation today") }}
16 </p>
17 </div>
18 </div>
19 </div>
20 </section>
95b30f84 21
6f151c32
MT
22 <section class="inverse">
23 <div class="container">
24 <div class="row justify-content-center">
25 <div class="col-12 col-md-8">
26 <form action="" method="POST">
27 {% raw xsrf_form_html() %}
28
54fd20d9 29 <div class="row">
6f151c32
MT
30 <div class="col-12">
31 <h6>Frequency</h6>
32
d1f119e3
MT
33 <input type="hidden" name="frequency" value="{{ frequency }}">
34
6f151c32 35 <div class="custom-control custom-radio custom-control-inline">
d1f119e3 36 <input class="custom-control-input" type="radio" name="frequency-selector" id="frequency-one-time"
6f151c32
MT
37 value="one-time" {% if frequency == "one-time" %}checked{% end %}>
38 <label class="custom-control-label" for="frequency-one-time">{{ _("One Time") }}</label>
39 </div>
95b30f84 40
6f151c32 41 <div class="custom-control custom-radio custom-control-inline">
d1f119e3 42 <input class="custom-control-input" type="radio" name="frequency-selector" id="frequency-monthly"
6f151c32
MT
43 value="monthly" {% if frequency == "monthly" %}checked{% end %}>
44 <label class="custom-control-label" for="frequency-monthly">{{ _("Monthly") }}</label>
f89c578d
MT
45 </div>
46 </div>
6f151c32 47 </div>
95b30f84 48
6f151c32
MT
49 <div class="mt-5 mb-3 p-4 bg-light rounded">
50 <h6>{{ _("Choose an amount") }}</h6>
a41e6d77 51
6f151c32 52 <input type="hidden" name="currency" value="{{ currency }}">
a41e6d77 53
6f151c32
MT
54 <div class="btn-group-toggle flex-wrap text-center mb-3" data-toggle="buttons">
55 {% for a in amounts %}
56 <label class="btn btn-outline-primary btn-lg mb-2">
57 <input type="radio" name="amount-selector" value="{{ a }}" {% if amount == a %}checked{% end %}
58 autocomplete="off"> <span class="EUR">€</span><span class="USD">$</span>{{ a }}
59 </label>
60 {% end %}
61 </div>
a41e6d77 62
6f151c32
MT
63 <p class="text-center small">
64 <a data-toggle="collapse" href="#more" role="button">
65 {{ _("More Options") }}
66 </a>
67 </p>
a6100896 68
6f151c32
MT
69 <div class="collapse" id="more">
70 <div class="form-group row">
71 <label class="col-sm-5 col-form-label col-form-label-lg">
72 Enter your own
73 </label>
74
75 <div class="col-sm-7">
76 <div class="input-group input-group-lg">
77 <div class="input-group-prepend">
78 <span class="input-group-text EUR">€</span>
79 <span class="input-group-text USD">$</span>
a6100896 80 </div>
6f151c32
MT
81
82 <input type="number" class="form-control form-control-lg" name="amount" min="5" step="0.01"
83 {% if amount %}value="{{ amount }}"{% end %}>
a6100896 84 </div>
bddae05d 85 </div>
f89c578d 86 </div>
a41e6d77 87
6f151c32
MT
88 <p class="small text-right">
89 <a class="toggleCurrency EUR" href="#">{{ _("Prefer donating in US Dollar?") }}</a>
90 <a class="toggleCurrency USD" href="#">{{ _("Prefer donating in Euro?") }}</a>
91 </p>
92 </div>
93
94 <div class="row my-5">
95 <div class="col d-flex flex-column">
96 <div class="form-row">
97 <div class="col">
98 <div class="custom-control custom-radio custom-control-inline mb-3">
99 <input class="custom-control-input" type="radio" name="title" id="mr" value="Mr." checked>
100 <label class="custom-control-label" for="mr">{{ _("Mr.") }}</label>
101 </div>
102 <div class="custom-control custom-radio custom-control-inline mb-3">
103 <input class="custom-control-input" type="radio" name="title" id="mrs" value="Mrs.">
104 <label class="custom-control-label" for="mrs">{{ _("Mrs.") }}</label>
d7bbf25f 105 </div>
f89c578d 106 </div>
6f151c32 107 </div>
a41e6d77 108
6f151c32
MT
109 <div class="form-row">
110 <div class="col-sm-6">
111 <div class="form-group">
112 <input type="text" class="form-control" name="first_name"
113 placeholder="{{ _("First Name" )}}" required>
d7bbf25f 114 </div>
6f151c32 115 </div>
a41e6d77 116
6f151c32
MT
117 <div class="col-sm-6">
118 <div class="form-group">
119 <input type="text" class="form-control" name="last_name"
120 placeholder="{{ _("Last Name" )}}" required>
d7bbf25f 121 </div>
f89c578d 122 </div>
6f151c32 123 </div>
f89c578d 124
6f151c32
MT
125 <div class="form-group">
126 <input type="email" class="form-control" name="email"
127 placeholder="{{ _("Email Address") }}" required>
128 </div>
a41e6d77 129
6f151c32
MT
130 <div class="form-group">
131 <input type="text" class="form-control" name="company_name"
132 placeholder="{{ _("Company Name (optional)") }}">
133 </div>
f89c578d 134
6f151c32
MT
135 <div class="form-group">
136 <input type="text" class="form-control" name="street1"
137 placeholder="{{ _("Address Line 1") }}" required>
138 </div>
f89c578d 139
6f151c32
MT
140 <div class="form-group">
141 <input type="text" class="form-control" name="street2"
142 placeholder="{{ _("Address Line 2") }}">
143 </div>
f89c578d 144
6f151c32
MT
145 <div class="form-row">
146 <div class="col-sm-6">
147 <div class="form-group">
148 <input type="text" class="form-control" name="city"
149 placeholder="{{ _("City") }}" required>
d7bbf25f 150 </div>
6f151c32 151 </div>
95b30f84 152
6f151c32
MT
153 <div class="col-sm-6">
154 <div class="form-group">
155 <input type="text" class="form-control" name="post_code"
156 placeholder="{{ _("Post Code") }}" required>
d7bbf25f 157 </div>
f89c578d 158 </div>
6f151c32 159 </div>
a41e6d77 160
6f151c32
MT
161 <div class="form-row">
162 <div class="col-sm-6">
163 <div class="form-group">
164 <select class="form-control" name="country_code" required>
165 <option value="">- {{ _("Country") }} -</option>
d7bbf25f 166
6f151c32
MT
167 {% for c in countries %}
168 <option value="{{ c.alpha2 }}" {% if country == c.alpha2 %}selected{% end %}>{{ c.name }}</option>
169 {% end %}
170 </select>
d9d6d3c3
MT
171 </div>
172 </div>
a41e6d77 173
6f151c32
MT
174 <div class="col-sm-6">
175 <div class="form-group">
176 <input type="text" class="form-control" name="state"
177 placeholder="{{ _("State (optional)") }}">
178 </div>
179 </div>
bddae05d 180 </div>
6f151c32
MT
181
182 <input type="submit" class="btn btn-primary btn-lg"
183 id="donate" value="{{ _("Donate Now") }}">
f89c578d 184 </div>
6f151c32 185 </div>
f89c578d 186
6f151c32
MT
187 <div class="row">
188 <div class="col d-flex justify-content-around text-muted">
189 <span class="pf pf-2x pf-american-express"></span>
190 <span class="pf pf-2x pf-mastercard-alt"></span>
191 <span class="pf pf-2x pf-visa"></span>
192 <span class="pf pf-2x pf-sepa"></span>
f89c578d 193 </div>
6f151c32 194 </div>
f89c578d 195
9ae712ff 196 <div class="modal fade" tabindex="-1" role="dialog" id="modal-monthly-suggestions" aria-hidden="true">
6f151c32
MT
197 <div class="modal-dialog modal-dialog-centered" role="document">
198 <div class="modal-content">
199 <div class="modal-header">
9ae712ff
MT
200 <h5 class="modal-title">{{ _("Would you like to support us monthly?") }}</h5>
201
202 <button type="button" class="close" data-dismiss="modal" aria-label="{{ _("Close") }}">
6f151c32
MT
203 <span aria-hidden="true">&times;</span>
204 </button>
205 </div>
a41e6d77 206
6f151c32 207 <div class="modal-body">
9ae712ff
MT
208 <p class="mb-4">
209 {{ _("Long-term donations are an even better investment into our project, create lasting change for everyone who is working on the project and make IPFire even better!") }}
210 </p>
211
212 <div class="row mb-4">
213 {% for factor, default in ((3, False), (2, True), (1, False)) %}
214 <div class="col d-flex align-items-center">
215 <button type="submit"
216 class="btn btn-primary btn-block {% if default %}btn-lg{% else %}btn-sm{% end %} monthly-amount-suggestion"
217 data-factor="{{ factor }}" data-amount="">
218 <span class="EUR">€</span><span class="USD">$</span><span class="suggested-amount"></span>
219 <br>
220 <small>/ {{ _("month") }}</small>
221 </button>
222 </div>
223 {% end %}
224 </div>
a41e6d77 225
9ae712ff
MT
226 <button type="submit" class="btn btn-secondary btn-block">
227 Donate <span class="EUR">€</span><span class="USD">$</span><span class="amount"></span> once
228 </button>
be02b78f 229 </div>
a41e6d77 230 </div>
ef0d3151
SH
231 </div>
232 </div>
6f151c32 233 </div>
f89c578d 234
6f151c32
MT
235 <p class="small text-muted mb-0">
236 The organization you will be donating to is Lightning Wire Labs GmbH who is
237 kindly handling donations for the IPFire project.
238 After clicking "Donate Now", you will be redirected to Lightning Wire Labs
239 where you will be able to complete the transaction.
240 </p>
241 </form>
d7bbf25f 242 </div>
6f151c32
MT
243 </div>
244 </div>
245 </section>
d7bbf25f 246
6f151c32
MT
247 <section>
248 <div class="container">
0ba47b0f
MT
249 <div class="row justify-content-center">
250 <div class="col-12 col-md-8">
251 <h5>Why should I donate?</h5>
95b30f84 252
0ba47b0f
MT
253 <p>
254 At IPFire, we are working hard to provide you with a free firewall distribution
255 that is like no other. We release updates regularly and enhance functionality
256 to make IPFire more secure, faster and easier to use.
257 </p>
8bc72662 258
0ba47b0f
MT
259 <p>
260 To achieve our high standards that we have set for ourselves, we need your help.
8bc72662 261
0ba47b0f
MT
262 Only with your donation, we can get the right tools, people and utilities that
263 we need to make our work most efficient and reach our maximum potential.
8bc72662 264
0ba47b0f
MT
265 Only with your donation, we can achieve our vision to make the Internet a safer
266 place that is fair for everyone and giving equal opportunities.
267 </p>
8bc72662 268
0ba47b0f 269 <h5>How much should I give?</h5>
8bc72662 270
0ba47b0f
MT
271 <p>
272 We are grateful for every single donation, but of course, we appreciate
273 if you help us as much as you can.
274 </p>
8bc72662 275
0ba47b0f
MT
276 <p>
277 We rely on steady contributions from companies to keep the project healthy
278 and encourage them to set up a monthly donation.
279 </p>
8bc72662 280
0ba47b0f
MT
281 <div class="faq">
282 <h5>Frequently Asked Questions</h5>
a41e6d77 283
0ba47b0f
MT
284 <p>
285 <a data-toggle="collapse" href="#faq-bank-transfer">
286 Do you accept bank transfer via SEPA?
287 </a>
288 </p>
a41e6d77 289
0ba47b0f
MT
290 <div class="collapse" id="faq-bank-transfer">
291 <p>
292 We do accept direct transfers through SEPA. These are our bank details:
293 </p>
95b30f84 294
0ba47b0f
MT
295 <dl>
296 <dt>IBAN</dt>
297 <dd>DE76 3605 0105 1010 8206 84</dd>
a41e6d77 298
0ba47b0f
MT
299 <dt>BIC</dt>
300 <dd>SPESDE3EXXX</dd>
301 </dl>
302 </div>
8bc72662 303
0ba47b0f
MT
304 <p>
305 <a data-toggle="collapse" href="#faq-address">
306 Why do you need my address in order to process a donation?
307 </a>
308 </p>
8bc72662 309
0ba47b0f
MT
310 <div class="collapse" id="faq-address">
311 <p>
312 We understand that your privacy is very important.
313 </p>
bddae05d 314
0ba47b0f
MT
315 <p>
316 We ask for a minimum amount of information required to process
317 credit card donations, including billing addresses.
318 This allows our payment processor to verify your identity,
319 process your payment, and prevent fraudulent charges to your credit card.
320 </p>
bddae05d 321
0ba47b0f
MT
322 <p>
323 We keep your information private - if you have questions, please refer to
324 Lightning Wire Labs' <a href="https://www.lightningwirelabs.com/legal">Privacy Policy</a>.
325 </p>
bddae05d 326
0ba47b0f
MT
327 <p>
328 If you would rather not fill in your information on our online donation form,
329 you can send your donation via SEPA bank transfer.
330 </p>
331 </div>
8bc72662 332
0ba47b0f
MT
333 <p>
334 <a data-toggle="collapse" href="#faq-tax-deduction">
335 Is my donation tax deductible?
336 </a>
337 </p>
8bc72662 338
0ba47b0f
MT
339 <div class="collapse" id="faq-tax-deduction">
340 <p>
341 IPFire is not registered as a charitable organization and therefore donations
342 are not tax deductible in Germany or the European Union.
343 </p>
a41e6d77 344
0ba47b0f
MT
345 <p>
346 For donors outside of the European Union, please consult your tax advisor
347 about whether your donation is tax deductible.
348 </p>
349 </div>
bddae05d 350
0ba47b0f
MT
351 <p>
352 <a data-toggle="collapse" href="#faq-cancel">
353 How do I cancel or change my recurring donation?
354 </a>
355 </p>
bddae05d 356
0ba47b0f
MT
357 <div class="collapse" id="faq-cancel">
358 <p>
359 Your credit card statements or bank statements will contain a link
360 that you can follow to cancel your donation at any time.
361 </p>
362 </div>
bddae05d 363
0ba47b0f
MT
364 <p>
365 <a data-toggle="collapse" href="#faq-email">
366 Who can I email directly with questions about donating?
367 </a>
368 </p>
bddae05d 369
0ba47b0f
MT
370 <div class="collapse" id="faq-email">
371 <p>
372 If you have a question about donating to the IPFire Project,
373 please contact us at <a href="mailto:donate@ipfire.org">donate@ipfire.org</a>.
374 </p>
375 </div>
376 </div>
6f151c32 377 </div>
a41e6d77 378 </div>
7771acea 379 </div>
6f151c32 380 </section>
95b30f84
MT
381{% end block %}
382
383{% block javascript %}
384 <script type="text/javascript">
385 $(document).ready(function() {
d1f119e3
MT
386 var amount = $("input[name='amount']");
387 var currency = $("input[name='currency']");
388 var frequency = $("input[name='frequency']");
389 var submit = $("#donate");
390 var modal = $("#modal-monthly-suggestions");
6d151de3 391
bd2723d4 392 // Adjust form to default currency
a6100896 393 if (currency.val() == "EUR") {
bd2723d4 394 $(".USD").hide();
a6100896 395 } else if (currency.val() == "USD") {
bd2723d4
MT
396 $(".EUR").hide();
397 }
95b30f84 398
a6100896
MT
399 $(".toggleCurrency").click(function(event) {
400 event.preventDefault();
401
402 if (currency.val() == "EUR") {
403 currency.val("USD");
95b30f84 404
95b30f84
MT
405 $(".EUR").hide();
406 $(".USD").show();
a6100896
MT
407 } else if (currency.val() == "USD") {
408 currency.val("EUR");
409
410 $(".EUR").show();
411 $(".USD").hide();
95b30f84
MT
412 }
413 });
414
d1f119e3 415 // Copy amount when clicking on a radio buttons
6d151de3
MT
416 $("input[name='amount-selector']").on("change", function() {
417 var value = $(this).val();
418 if (value) {
419 amount.val(value);
9ae712ff 420 amount.change();
6d151de3
MT
421 }
422 });
423
d1f119e3
MT
424 // Copy frequency when clicking on a radio buttons
425 $("input[name='frequency-selector']").on("change", function() {
426 var value = $(this).val();
427 if (value) {
428 frequency.val(value);
429 }
430 });
431
a6100896 432 amount.on("change keyup mouseup", function() {
6d151de3 433 var value = $(this).val();
9ae712ff
MT
434
435 // Enable/disable submit button
436 submit.prop("disabled", !value);
437
6d151de3 438 if (value) {
a6100896
MT
439 // Check matching elements
440 $("input[name='amount-selector']").each(function (i, selector) {
441 var s = $(selector);
442 var b = s.parent(".btn");
443
444 if (s.val() === value) {
445 b.addClass("active");
446 } else {
447 b.removeClass("active");
448 }
449 });
9ae712ff
MT
450
451 // Update all amounts
452 $(".amount").html(value);
453
454 // Update suggestions
455 $(".monthly-amount-suggestion").each(function (i, element) {
456 var factor = $(element).data("factor");
457 if (!factor)
458 return;
459
460 var suggested_amount = Math.floor(value / factor);
461
462 // Update value
463 $(element).data("amount", suggested_amount);
464
465 // Update text on button
466 $(element).find(".suggested-amount").html(suggested_amount);
467 });
6d151de3
MT
468 }
469 });
470
9ae712ff 471 submit.click(function (event) {
d1f119e3 472 if (frequency.val() == "one-time" && amount.val() > 10) {
95b30f84 473 event.preventDefault();
fedb34bf 474
9ae712ff 475 modal.modal("show");
95b30f84
MT
476 }
477 });
9ae712ff
MT
478
479 $(".monthly-amount-suggestion").click(function (event) {
480 // Set frequency to monthly
d1f119e3
MT
481 $("input[name='frequency-selector']").prop("checked", false);
482 $("input[name='frequency-selector'][value='monthly']").prop("checked", true);
483 frequency.val("monthly");
9ae712ff
MT
484
485 // Set amount
486 var value = $(this).data("amount");
487 amount.val(value);
488 amount.change();
489
490 // Hide the modal
491 modal.modal("hide");
492 });
493
494 // Update form with initial amount
495 amount.change();
95b30f84
MT
496 });
497 </script>
f5b55ea7 498{% end block %}