]> git.ipfire.org Git - ipfire.org.git/blame - src/templates/donate.html
donation: Fix modal window
[ipfire.org.git] / src / templates / donate.html
CommitLineData
e64ce07e 1{% extends "base-1.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
8 <h1 class="text-center mt-5 mb-5">{{ _("Donate") }}</h1>
9
a41e6d77
MT
10 <div class="container">
11 <div class="card mb-5">
12 <div class="card-body">
13 <div class="row flex-lg-row-reverse">
14 <div class="col-12 col-lg-8">
15 <form action="" method="POST">
16 {% raw xsrf_form_html() %}
17
18 <div class="row justify-content-center">
19 <div class="col-12 col-sm-11 col-xl-12 p-4 p-sm-6 p-md-4 pt-6">
20 <div class="row">
21 <div class="col-12 col-lg-6 mb-3 mb-md-0">
22 <h6>Choose a currency</h6>
23
24 <div class="form-check form-check-inline">
25 <input class="form-check-input" type="radio" name="currency" id="EUR" value="EUR" checked>
26 <label class="form-check-label" for="EUR">{{ _("Euro") }}</label>
27 </div>
95b30f84 28
a41e6d77
MT
29 <div class="form-check form-check-inline">
30 <input class="form-check-input" type="radio" name="currency" id="USD" value="USD">
31 <label class="form-check-label" for="USD">{{ _("US Dollar") }}</label>
32 </div>
33 </div>
95b30f84 34
a41e6d77
MT
35 <div class="col-12 col-lg-6">
36 <h6>Frequency</h6>
37
38 <div class="form-check form-check-inline">
39 <input class="form-check-input" type="radio" name="frequency" id="frequency-single" value="single" checked>
40 <label class="form-check-label" for="frequency-single">{{ _("One Time") }}</label>
41 </div>
42
43 <div class="form-check form-check-inline">
44 <input class="form-check-input" type="radio" name="frequency" id="frequency-monthly" value="monthly">
45 <label class="form-check-label" for="frequency-monthly">{{ _("Monthly") }}</label>
46 </div>
47 </div>
48 </div>
49
50 <div class="my-5 p-5 bg-light">
51 <h6>{{ _("Choose an amount") }}</h6>
52
53 <div class="btn-group-toggle flex-wrap mb-3" data-toggle="buttons">
54 {% for amount in amounts %}
55 <label class="btn btn-secondary btn-lg mb-2">
56 <input type="radio" name="amount" value="{{ amount }}"
57 autocomplete="off"> <span class="USD">$</span>{{ amount }} <span class="EUR">€</span>
58 </label>
59 {% end %}
60 </div>
61
62 <div class="form-group row mb-5">
63 <label class="col-sm-5 col-form-label col-form-label-lg">
64 or enter your own
65 </label>
66
67 <div class="col-sm-5">
68 <input type="number" class="form-control form-control-lg" id="enterYourOwn">
69 </div>
70 </div>
71
72 <div class="row mb-5">
73 <div class="col">
74 <h6>Choose payment</h6>
75
76 <div class="form-check form-check-inline">
77 <input class="form-check-input" type="radio"
78 name="payment" id="credit-card" value="credit-card" checked>
79 <label for="credit-card" class="form-check-label">
80 <picture>
81 <source srcset="{{ static_url("img/amex.png") }},
82 {{ static_url("img/amex@2x.png") }} 2x,
83 {{ static_url("img/amex@3x.png") }} 3x ">
84 <img src="{{ static_url("img/amex.png") }}"
85 srcset="{{ static_url("img/amex.png") }},
86 {{ static_url("img/amex@2x.png") }} 2x,
87 {{ static_url("img/amex@3x.png") }} 3x "
88 alt="Amex" class="m-xl-2">
89 </picture>
90
91 <picture>
92 <source srcset="{{ static_url("img/mastercard.png") }},
93 {{ static_url("img/mastercard@2x.png") }} 2x,
94 {{ static_url("img/mastercard@3x.png") }} 3x ">
95 <img src="{{ static_url("img/mastercard.png") }}"
96 srcset="{{ static_url("img/mastercard.png") }},
97 {{ static_url("img/mastercard@2x.png") }} 2x,
98 {{ static_url("img/mastercard@3x.png") }} 3x "
99 alt="Mastercard" class="m-xl-2">
100 </picture>
101
102 <picture>
103 <source srcset="{{ static_url("img/visa.png") }},
104 {{ static_url("img/visa@2x.png") }} 2x,
105 {{ static_url("img/visa@3x.png") }} 3x ">
106 <img src="{{ static_url("img/visa.png") }}"
107 srcset="{{ static_url("img/visa.png") }},
108 {{ static_url("img/visa@2x.png") }} 2x,
109 {{ static_url("img/visa@3x.png") }} 3x "
110 alt="Visa" class="m-xl-2">
111 </picture>
112 </label>
113 </div>
114
115 <div class="form-check form-check-inline">
116 <input class="form-check-input" type="radio" name="payment"
117 id="direct-debit" value="direct-debit">
118
119 <label for="direct-debit" class="form-check-label">
120 SEPA
121 </label>
122 </div>
123
124 <div class="form-check form-check-inline paypal">
125 <input class="form-check-input" type="radio" name="payment"
126 id="paypal" value="paypal">
127
128 <label for="paypal" class="form-check-label">
129 <picture>
130 <source srcset="{{ static_url("img/paypal.png") }},
131 {{ static_url("img/paypal@2x.png") }} 2x,
132 {{ static_url("img/paypal@3x.png") }} 3x ">
133 <img src="{{ static_url("img/paypal.png") }}"
134 srcset="{{ static_url("img/paypal.png") }},
135 {{ static_url("img/paypal@2x.png") }} 2x,
136 {{ static_url("img/paypal@3x.png") }} 3x "
137 alt="PayPal" class="m-xl-2">
138 </picture>
139 </label>
140 </div>
141 </div>
142 </div>
143
144 <div class="row collapse" id="address">
145 <div class="col d-flex flex-column">
146 <div class="form-row">
147 <div class="col">
148 <div class="form-check form-check-inline mb-3">
ebe19f8e
MT
149 <input class="form-check-input" type="radio" name="title" id="mr" value="Mr." checked>
150 <label class="form-check-label" for="mr">{{ _("Mr.") }}</label>
a41e6d77
MT
151 </div>
152 <div class="form-check form-check-inline mb-3">
ebe19f8e
MT
153 <input class="form-check-input" type="radio" name="title" id="mrs" value="Mrs.">
154 <label class="form-check-label" for="mrs">{{ _("Mrs.") }}</label>
a41e6d77
MT
155 </div>
156 </div>
157 </div>
158
159 <div class="form-row">
160 <div class="col-sm-6">
161 <div class="form-group">
450af3dc
MT
162 <input type="text" class="form-control" name="first_name"
163 placeholder="{{ _("First Name" )}}" required>
a41e6d77
MT
164 </div>
165 </div>
166
167 <div class="col-sm-6">
168 <div class="form-group">
450af3dc 169 <input type="text" class="form-control" name="last_name"
a41e6d77
MT
170 placeholder="{{ _("Last Name" )}}" required>
171 </div>
172 </div>
173 </div>
174
175 <div class="form-group">
450af3dc 176 <input type="email" class="form-control" name="email"
a41e6d77
MT
177 placeholder="{{ _("Email Address") }}" required>
178 </div>
179
180 <div class="form-group">
450af3dc 181 <input type="text" class="form-control" name="company_name"
a41e6d77
MT
182 placeholder="{{ _("Company Name (optional)") }}">
183 </div>
184
185 <div class="form-group">
450af3dc 186 <input type="text" class="form-control" name="street1"
a41e6d77
MT
187 placeholder="{{ _("Address Line 1") }}" required>
188 </div>
95b30f84 189
a41e6d77 190 <div class="form-group">
450af3dc 191 <input type="text" class="form-control" name="street2"
a41e6d77
MT
192 placeholder="{{ _("Address Line 2") }}">
193 </div>
194
195 <div class="form-row">
196 <div class="col-sm-6">
197 <div class="form-group">
450af3dc 198 <input type="text" class="form-control" name="city"
a41e6d77 199 placeholder="{{ _("City") }}" required>
2c361abc 200 </div>
be02b78f 201 </div>
a41e6d77
MT
202
203 <div class="col-sm-6">
204 <div class="form-group">
450af3dc 205 <input type="text" class="form-control" name="post_code"
a41e6d77
MT
206 placeholder="{{ _("Post Code") }}" required>
207 </div>
208 </div>
209 </div>
210
211 <div class="form-row">
212 <div class="col-sm-6">
213 <div class="form-group">
450af3dc 214 <select class="form-control" name="country_code" required>
a41e6d77 215 <option value="">- {{ _("Country") }} -</option>
47113f9e
MT
216
217 {% for c in countries %}
218 <option value="{{ c.alpha2 }}" {% if country == c.alpha2 %}selected{% end %}>{{ c.name }}</option>
219 {% end %}
a41e6d77
MT
220 </select>
221 </div>
222 </div>
223
224 <div class="col-sm-6">
225 <div class="form-group">
450af3dc 226 <input type="text" class="form-control" name="state"
a41e6d77
MT
227 placeholder="{{ _("State (optional)") }}">
228 </div>
229 </div>
230 </div>
231
232 <input type="submit" class="btn btn-primary btn-lg mx-auto"
233 id="donate" value="{{ _("Donate Now") }}">
234 </div>
235 </div>
236
237 <div class="row">
238 <div class="col text-center">
239 <button class="btn btn-primary btn-lg" id="next"
240 data-toggle="collapse" href="#address">{{ _("Next") }} &raquo;</button>
241 </div>
242 </div>
243
244 <div class="modal fade" tabindex="-1" role="dialog" id="modal-upsell" aria-hidden="true">
245 <div class="modal-dialog modal-dialog-centered" role="document">
246 <div class="modal-content">
247 <div class="modal-header">
248 <h5 class="modal-title">Modal title</h5>
249 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
250 <span aria-hidden="true">&times;</span>
251 </button>
252 </div>
253
254 <div class="modal-body">
255 <p>Modal body text goes here.</p>
256 </div>
257
258 <div class="modal-footer">
259 <button type="button" class="btn btn-primary">Save changes</button>
260 <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
261 </div>
fed291df
SH
262 </div>
263 </div>
be02b78f 264 </div>
a41e6d77
MT
265 </div>
266
267 <p class="small text-muted">
268 There should also be some area for the small-print since we need to tell people who they are donating to and that we don't do any refunds, etc.
269 </p>
ef0d3151
SH
270 </div>
271 </div>
a41e6d77 272 </form>
95b30f84 273 </div>
a41e6d77
MT
274
275 <div class="col col-lg-4">
276 <h5>IP<strong>Fire</strong> is an Open Source software project.</h5>
277
278 <p>
279 IPFire is an Open Source software project.
280 </p>
281
282 <p>
283 Development and keeping the project healthy is carried out by a
284 group of volunteers who have built a very successful product,
285 which hundreds of thousands of people use every day.
286 </p>
287
288 <p>
289 Your donation helps us to make IPFire even better...
290 </p>
291 </div>
292 </div>
be02b78f
SH
293 </div>
294 </div>
a41e6d77 295 </div>
95b30f84 296
be02b78f 297 <section>
95b30f84 298 <div class="container">
a41e6d77
MT
299 <div class="row text-left">
300 <div class="col-10 col-md-5 offset-sm-1 offset-xl-0">
301 <div class="mb-6" id="whydonate">
302 <h3>Why should I donate?</h3>
303
304 <p class="copy">We are proud of what we are doing here at IPFire. We create a free firewall
305 distribution that is free to use for everyone anywhere in the world. To do that,
306 we need to provide the infrastructure to distribute it to our users and provide
307 the right tools for our developers to help them to make IPFire better every day.
308 </p>
309
310 <p class="copy">Donations from individuals and corporations are the only way to keep all of our
311 services free for everyone. They pay for hosting, advertising, purchase
312 equipment and to fund the work of the people behind it.
313 </p>
314
315 <p class="copy">Our ambition is to compete with projects backed by large corporations and
316 proprietary solutions and we cannot do that without you. Become a supporter
317 today!
318 </p>
fed291df 319 </div>
95b30f84 320
a41e6d77
MT
321 <div class="mb-6" id="howmuch">
322 <h3>How much should I give?</h3>
323
324 <p class="copy">Donations range from single digits donations to hundreds. For us it is important
325 to give something back to help this project to succeed. If you want to help,
326 please do so and encourage others to do so, too.
327 </p>
fed291df
SH
328 </div>
329 </div>
a41e6d77
MT
330
331 <div class="col-10 col-md-4 offset-sm-1 offset-xl-2">
332 <h3>Frequently Asked Questions</h3>
333 <p class="copy">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.</p>
334 </div>
335 </div>
7771acea 336 </div>
be02b78f 337 </section>
95b30f84
MT
338{% end block %}
339
340{% block javascript %}
341 <script type="text/javascript">
342 $(document).ready(function() {
343 $(".USD").hide();
344
345 $("input[name='currency']").on("change", function() {
346 var currency = $(this).val();
347
348 if (currency == "EUR") {
349 $(".EUR").show();
350 $(".USD").hide();
351 } else if (currency == "USD") {
352 $(".EUR").hide();
353 $(".USD").show();
354 }
355 });
356
357 $("input[name='frequency']").on("change", function() {
358 var frequency = $(this).val();
359
360 if (frequency == "monthly") {
361 $(".paypal").hide();
362 } else {
363 $(".paypal").show();
364 }
365 })
366
367 $("#next").click(function (event) {
af4d7c10
MT
368 event.preventDefault();
369
95b30f84
MT
370 $(this).hide();
371 });
372
373 $("#donate").click(function (event) {
91e53e2b 374 var frequency = $("input[name='frequency']").val();
95b30f84 375
91e53e2b 376 if (frequency == "single") {
95b30f84 377 event.preventDefault();
fedb34bf 378
95b30f84
MT
379 $("#modal-upsell").modal("show");
380 }
381 });
382 });
383 </script>
f5b55ea7 384{% end block %}