Skip to content
Snippets Groups Projects
Commit 3cae2b02 authored by jan.bednarik's avatar jan.bednarik
Browse files

donate: Templates bugfix

parent 5051ac8d
No related branches found
No related tags found
1 merge request!21donate: Templates bugfix
Pipeline #628 passed
......@@ -50,13 +50,26 @@
});
// Donate forn
/* DONATE FORM */
// On amount radio change
$("input[name='amount']").change(function() {
// If custom amount is selected
if($(this).attr('id') == 'amount4') {
// Show custom amount input and set it required
$("#js-custom-amount-input").show(50);
$('#customamount').attr('required', true);
} else {
// Hide custom amount and remove required field
$("#js-custom-amount-input").hide(50);
$('#customamount').attr('required', false);
}
});
$("input[name='amount']:checked").change(); // trigger correct state onload
// Trigger correct state onload
$("input[name='amount']:checked").change();
......@@ -171,13 +171,13 @@
<a href="{{ page.root_page.facebook }}" target="_blank" rel="noreferrer"><i class="icon-facebook-f" title="Facebooková stránka"></i></a>
{% endif %}
{% if page.root_page.twitter %}
<a href="{{ page.root_page.twitter }}" target="_blank" rel="noreferrer">><i class="icon-twitter" title="Profil na Twitteru"></i></a>
<a href="{{ page.root_page.twitter }}" target="_blank" rel="noreferrer"><i class="icon-twitter" title="Profil na Twitteru"></i></a>
{% endif %}
{% if page.root_page.instagram %}
<a href="{{ page.root_page.instagram }}" target="_blank" rel="noreferrer">><i class="icon-instagram" title="Profil na Instagramu"></i></a>
<a href="{{ page.root_page.instagram }}" target="_blank" rel="noreferrer"><i class="icon-instagram" title="Profil na Instagramu"></i></a>
{% endif %}
{% if page.root_page.flickr %}
<a href="{{ page.root_page.flickr }}" target="_blank" rel="noreferrer">><i class="icon-flickr" title="Profil na Flickr"></i></a>
<a href="{{ page.root_page.flickr }}" target="_blank" rel="noreferrer"><i class="icon-flickr" title="Profil na Flickr"></i></a>
{% endif %}
</div>
</div><!-- /column -->
......
......@@ -57,7 +57,7 @@
<legend class="col-form-label col-md-4 col-form-label-lg">Částka</legend>
<div class="col-md-8">
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="amount1" name="amount" value="100" class="custom-control-input" checked>
<input type="radio" id="amount1" name="amount" value="100" class="custom-control-input" checked required>
<label class="custom-control-label col-form-label-lg" for="amount1">100 Kč</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
......@@ -77,7 +77,7 @@
<div class="form-group row mb-4 align-items-center" id="js-custom-amount-input" style="display: none;">
<div class="offset-md-4 col-md-8">
<div class="input-group input-group-lg mb-3 custom-amount">
<input type="text" class="form-control" id="customamount" name="customamount" placeholder="1000" aria-describedby="customamount-currency">
<input type="number" class="form-control" id="customamount" name="customamount" placeholder="1000" aria-describedby="customamount-currency">
<div class="input-group-append">
<span class="input-group-text" id="customamount-currency"></span>
</div>
......@@ -88,7 +88,7 @@
<legend class="col-form-label col-md-4 col-form-label-lg">Typ příspěvku</legend>
<div class="col-md-8">
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="type1" name="type" value="monthly" class="custom-control-input" checked>
<input type="radio" id="type1" name="type" value="monthly" class="custom-control-input" checked required>
<label class="custom-control-label col-form-label-lg" for="type1">Měsíční</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
......
......@@ -100,7 +100,7 @@
<div class="form-group row mb-2 align-items-center" id="js-custom-amount-input" style="display: none;">
<div class="col-md-12">
<div class="input-group input-group-lg mb-3 custom-amount">
<input type="text" class="form-control" id="customamount" name="customamount" placeholder="1000" aria-describedby="customamount-currency">
<input type="number" class="form-control" id="customamount" name="customamount" placeholder="1000" aria-describedby="customamount-currency">
<div class="input-group-append">
<span class="input-group-text" id="customamount-currency"></span>
</div>
......
......@@ -60,7 +60,7 @@
<div class="form-group row mb-2 align-items-center" id="js-custom-amount-input" style="display: none;">
<div class="col-md-12">
<div class="input-group input-group-lg mb-3 custom-amount">
<input type="text" class="form-control" id="customamount" name="customamount" placeholder="1000" aria-describedby="customamount-currency">
<input type="number" class="form-control" id="customamount" name="customamount" placeholder="1000" aria-describedby="customamount-currency">
<div class="input-group-append">
<span class="input-group-text" id="customamount-currency"></span>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment