Commit 7285bc2d authored by sajolida's avatar sajolida
Browse files

Add basis for toggleable dollar/euro donations

What I want to do here is not possible using ikiwiki/toggle.js only, so
I'm doing a quick JS prototype with Bootstrap and jQuery. We might later
on prefer rewriting only what's need in vanilla JS or dropping the idea
all the way.

I'm also not including the third-party scripts in Git on purpose not to
unwanted data; but the URLs are in the code.
parent d7bf9547
[[!meta title="Donate to Tails"]]
[[!meta stylesheet="bootstrap" rel="stylesheet" title=""]]
[[!meta script="lib/js/jquery"]] <!-- https://code.jquery.com/jquery-1.9.1.min.js -->
[[!meta script="lib/js/bootstrap/button"]] <!-- https://github.com/twbs/bootstrap/raw/v3.3.6/js/button.js -->
[[!meta script="donate"]]
<div id="currency" class="btn-group" data-toggle="buttons" role="group">
<label class="btn btn-primary active" id="currency-dollar">
<input type="radio" name="options" id="dollars" autocomplete="off" checked data-complete-text="finished!"> Dollars</input>
</label>
<label class="btn btn-primary" id="currency-euro">
<input type="radio" name="options" id="euros" autocomplete="off" checked data-complete-text="finished!"> Euros</input>
</label>
</div>
<div id="frequency" class="btn-group" data-toggle="buttons" role="group">
<label class="btn btn-primary">
<input type="radio" name="options" id="one-time" autocomplete="off"> One-time</input>
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="monthly" autocomplete="off"> Monthly</input>
</label>
<label class="btn btn-primary active">
<input type="radio" name="options" id="yearly" autocomplete="off" checked> Yearly</input>
</label>
</div>
<div id="dollar-amounts" class="btn-group" data-toggle="buttons" role="group">
<label class="btn btn-primary active">
<input type="radio" name="options" id="5" autocomplete="off">$5</input>
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="10" autocomplete="off">$10</input>
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="20" autocomplete="off">$20</input>
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="50" autocomplete="off">$50</input>
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="100" autocomplete="off">$100</input>
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="250" autocomplete="off">$250</input>
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="500" autocomplete="off">$500</input>
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="other" autocomplete="off">Other</input>
</label>
</div>
<div id="euro-amounts" class="btn-group" data-toggle="buttons" role="group">
<label class="btn btn-primary active">
<input type="radio" name="options" id="5" autocomplete="off">5€</input>
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="10" autocomplete="off">10€</input>
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="20" autocomplete="off">20€</input>
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="50" autocomplete="off">50€</input>
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="100" autocomplete="off">100€</input>
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="250" autocomplete="off">250€</input>
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="500" autocomplete="off">500€</input>
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="other" autocomplete="off">Other</input>
</label>
</div>
$(document).ready(function(){
$('#dollar-amounts').show();
$('#euro-amounts').hide();
$('#currency-dollar').click(function () {
$('#dollar-amounts').show();
$('#euro-amounts').hide();
})
$('#currency-euro').click(function () {
$('#dollar-amounts').hide();
$('#euro-amounts').show();
})
});
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment