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:
Brett Smith 2017-01-09 16:56:42 -05:00
parent cb5b5ec23f
commit 7202787092
4 changed files with 8 additions and 9 deletions

View file

@ -108,6 +108,6 @@ img.blog-right {
padding-right: .3em;
}
.supporter-form-input .inline {
display: inline-block;
.form-error, .supporter-form-input p {
margin-left: 51%;
}

View file

@ -31,8 +31,7 @@
text-align: center;
}
.form-error, .supporter-form-input .input-group p {
margin-left: 1em;
.form-error, .supporter-form-input p {
font-size: 80%;
white-space: normal;
}

View file

@ -51,7 +51,7 @@ $(document).ready(function() {
$('form.supporter-form').each(function(index, form) {
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) {
var isValid = amountData.newAmount >= amountData.minAmount;

View file

@ -80,10 +80,10 @@ This partial accepts these optional parameters:
$ <input type="number" name="amount" size="5" tabindex="10"
min="{{ min_amt }}" value="{{ default_amt }}">
{% endif %}
<p class="form-error">${{ min_amt|add:partial_amt }} is a minimum for
Conservancy Supporters.
<a href="/donate">Donate smaller amounts here</a>.</p>
</div>
<p class="form-error">${{ min_amt|add:partial_amt }} is a minimum for
Conservancy Supporters.
<a href="/donate">Donate smaller amounts here</a>.</p>
</div>
<div class="supporter-form-input">
@ -124,8 +124,8 @@ This partial accepts these optional parameters:
<option value="FittedLadiesXL">Fitted Women's XL</option>
</optgroup>
</select>
<p class="inline"><a href="https://gildanonline.com/sizechart" target="_blank" title="T-shirt size chart">Size information</a></p>
</div>
<p><a href="https://gildanonline.com/sizechart" target="_blank" title="T-shirt size chart">Size information</a></p>
</div>
<div class="supporter-form-input">