diff --git a/htdocs/js/signup.js b/htdocs/js/signup.js index 5ed910b4a5eff6a5f8411d10ef298596b13ed3cd..0268037517ad7fce8aadfbef75ae2d1c4836feaf 100644 --- a/htdocs/js/signup.js +++ b/htdocs/js/signup.js @@ -8,7 +8,7 @@ function validate(){ break; } } - if((valid || ($('input#override:checked').size()==1)) && !submitted ){ + if((valid || ($('input#override:checked').size()==1)) && !submitted && ($('input#tnc:checked').size()==1)){ $('input#submit').removeAttr("disabled"); return true; } @@ -237,6 +237,7 @@ $(function(){ $("input#phone").change(processPhone); $("textarea#address").change(processAddress); $("input#override").change(validate); + $("input#tnc").change(validate); // Disable the submit button once clicked $("form#mainform").submit(function() { var valid = validate(); diff --git a/templates/signup.tpl b/templates/signup.tpl index e0b634b3cc388117fa57724e027b973a4a11b32e..323f61201af563b77438f17f23eb3669990de313 100644 --- a/templates/signup.tpl +++ b/templates/signup.tpl @@ -4,7 +4,7 @@ <div class="boxhead"><h2>Membership Signup</h2></div> <div class="boxcontent"> - <p>Please enter the details from your signup receipt</p> + <p>Please enter the details from your signup receipt</p> <div class="row"> <label for="signupid">Signup ID:</label> @@ -70,12 +70,16 @@ <span class="textinput"><input type="text" id="email" name="email" size="30" {if $mode=='re-form'}value='{$fields.email}'{/if}/></span> <div id="emailmessage"{if $mode=='re-form'}{if isset($errors.email)} style="color:red; float:right; clear:right;">{$errors.email}{else} style="color:green; float:right; clear:right;">OK{/if}{else}>{/if}</div> </div> - <div class="row" id="phonediv"> + <div class="row" id="phonediv"> <label for="phone">Phone Number</label> <span class="textinput"><input type="text" id="phone" name="phone" size="30" {if $mode=='re-form'}value='{$fields.phone}'{/if}/></span> <div id="phonemessage"{if $mode=='re-form'}{if isset($errors.phone)} style="color:red; float:right; clear:right;">{$errors.phone}{else} style="color:green; float:right; clear:right;">OK{/if}{else}>{/if}</div> </div> - {if $overridable} + <div class="row" id="tncdiv"> + <span class="textinput"><input type="checkbox" id="tnc" name="tnc" size="30" {if $mode=='re-form'}value='{$fields.tnc}'{/if}/>I have read and understood, and agree to be bound by the <a href="/About/Conditions">Terms and Conditions</a>.</span> + <div id="tncmessage"{if $mode=='re-form'}{if isset($errors.tnc)} style="color:red; float:right; clear:right;">{$errors.tnc}{else} style="color:green; float:right; clear:right;">OK{/if}{else}>{/if}</div> + </div> + {if $overridable} <div class="row" id="overridediv"> <label for="overridable">Override Validation</label> <span class="textinput"><input type="checkbox" id="override" name="override" /></span>