supporter: Reorganize form post-input notes.
This makes it easier to keep baseline alignment between labels and their respective inputs. Declaring `margin-left: 51%;` for the post-input notes is not exactly what we want, but it's much closer and less troublesome than dealing with the vertical alignment of labels otherwise.
This commit is contained in:
parent
cb5b5ec23f
commit
7202787092
4 changed files with 8 additions and 9 deletions
|
@ -108,6 +108,6 @@ img.blog-right {
|
||||||
padding-right: .3em;
|
padding-right: .3em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.supporter-form-input .inline {
|
.form-error, .supporter-form-input p {
|
||||||
display: inline-block;
|
margin-left: 51%;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,8 +31,7 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-error, .supporter-form-input .input-group p {
|
.form-error, .supporter-form-input p {
|
||||||
margin-left: 1em;
|
|
||||||
font-size: 80%;
|
font-size: 80%;
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ $(document).ready(function() {
|
||||||
|
|
||||||
$('form.supporter-form').each(function(index, form) {
|
$('form.supporter-form').each(function(index, form) {
|
||||||
var $amountInput = $('input[type=number]', form).first();
|
var $amountInput = $('input[type=number]', form).first();
|
||||||
var $amountError = $('.form-error', $amountInput[0].parentNode);
|
var $amountError = $('.form-error', $amountInput.parents('.supporter-form-input'));
|
||||||
|
|
||||||
$amountError.on(NEW_AMOUNT_EVENT, function(event, amountData) {
|
$amountError.on(NEW_AMOUNT_EVENT, function(event, amountData) {
|
||||||
var isValid = amountData.newAmount >= amountData.minAmount;
|
var isValid = amountData.newAmount >= amountData.minAmount;
|
||||||
|
|
|
@ -80,11 +80,11 @@ This partial accepts these optional parameters:
|
||||||
$ <input type="number" name="amount" size="5" tabindex="10"
|
$ <input type="number" name="amount" size="5" tabindex="10"
|
||||||
min="{{ min_amt }}" value="{{ default_amt }}">
|
min="{{ min_amt }}" value="{{ default_amt }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
<p class="form-error">${{ min_amt|add:partial_amt }} is a minimum for
|
<p class="form-error">${{ min_amt|add:partial_amt }} is a minimum for
|
||||||
Conservancy Supporters.
|
Conservancy Supporters.
|
||||||
<a href="/donate">Donate smaller amounts here</a>.</p>
|
<a href="/donate">Donate smaller amounts here</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="supporter-form-input">
|
<div class="supporter-form-input">
|
||||||
<label for="on0">Do you want to receive
|
<label for="on0">Do you want to receive
|
||||||
|
@ -124,8 +124,8 @@ This partial accepts these optional parameters:
|
||||||
<option value="FittedLadiesXL">Fitted Women's XL</option>
|
<option value="FittedLadiesXL">Fitted Women's XL</option>
|
||||||
</optgroup>
|
</optgroup>
|
||||||
</select>
|
</select>
|
||||||
<p class="inline"><a href="https://gildanonline.com/sizechart" target="_blank" title="T-shirt size chart">Size information</a></p>
|
|
||||||
</div>
|
</div>
|
||||||
|
<p><a href="https://gildanonline.com/sizechart" target="_blank" title="T-shirt size chart">Size information</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="supporter-form-input">
|
<div class="supporter-form-input">
|
||||||
|
|
Loading…
Reference in a new issue