Changeset - 72027870920f
[Not reviewed]
0 4 0
Brett Smith (brett) - 7 years ago 2017-01-09 21:56:42
brett@sfconservancy.org
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.
4 files changed with 8 insertions and 9 deletions:
0 comments (0 inline, 0 general)
www/conservancy/static/css/conservancy-bigscreen.css
Show inline comments
...
 
@@ -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%;
 
}
www/conservancy/static/css/forms.css
Show inline comments
...
 
@@ -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;
 
}
www/conservancy/static/js/supporter-page.js
Show inline comments
...
 
@@ -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;
www/conservancy/templates/supporter/form_partial.html
Show inline comments
...
 
@@ -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">
0 comments (0 inline, 0 general)