Changeset - 7fec31ce8aef
[Not reviewed]
0 2 0
Bradley Kuhn (bkuhn) - 9 years ago 2014-12-03 18:33:26
bkuhn@ebb.org
Hide t-shirt size selector when t-shirt's unwanted

Use Javascript to hide the t-shirt size selector when the the user
selects "No" for "Do you want a t-shirt?". Reshow it (and make sure
it's shown by default) for "Yes".
2 files changed with 14 insertions and 2 deletions:
0 comments (0 inline, 0 general)
www/conservancy/static/supporter-page.js
Show inline comments
...
 
@@ -34,2 +34,12 @@ $(document).ready(function() {
 
    });
 
    $(".t-shirt-size-selector").show();
 
    $('input[name=os1]:radio').change(function() {
 
        var input=$(this);
 
        var value = input.val();
 
        if (value == "Yes") {
 
            $(".t-shirt-size-selector").show();
 
        } else {
 
            $(".t-shirt-size-selector").hide();
 
        }
 
    });
 
    $('#amount').addClass("valid");
www/conservancy/static/supporter/index.html
Show inline comments
...
 
@@ -151,2 +151,3 @@ internal policies</a> are published and available for scrutiny.</p>
 
                      <br />
 
                      <span class="t-shirt-size-selector">
 
                      <label for="wantGift"><strong>T-shirt size: </strong></label>
...
 
@@ -163,3 +164,3 @@ internal policies</a> are published and available for scrutiny.</p>
 
                         <option name="os3" id="os3" value="LadiesXL">Ladies' XL</option>
 
                      </select><br/>
 
                      </select><br/></span>
 
                      <label for="publicAck"><strong>
...
 
@@ -204,2 +205,3 @@ internal policies</a> are published and available for scrutiny.</p>
 
                      <br />
 
                      <span class="t-shirt-size-selector">
 
                      <label for="wantGift"><strong>T-shirt size: </strong></label>
...
 
@@ -216,3 +218,3 @@ internal policies</a> are published and available for scrutiny.</p>
 
                         <option name="os3" id="os3" value="LadiesXL">Ladies' XL</option>
 
                      </select><br/>
 
                      </select><br/></span>
 
                      <label for="publicAck"><strong>
0 comments (0 inline, 0 general)