Skip to content
This repository has been archived by the owner on Aug 27, 2019. It is now read-only.

Commit

Permalink
Adds verification to fourth grade checkbox.
Browse files Browse the repository at this point in the history
Adds verification to fourth grade checkbox (please double-check my code!!!).  Closes 18F/ekip#136
  • Loading branch information
OpenGlobe committed Aug 28, 2015
1 parent 5ecc6c9 commit 74ac154
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ekip/everykid/templates/get-your-pass/student_pass.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@ <h1>Start your adventure right now</h1>
<button>Play</button>
</form>

<form method="POST">
{% csrf_token %}

<label for="in_the_fourth_grade">
<input id="in_the_fourth_grade" required name="in_the_fourth_grade" type="checkbox" value="Y" onchange="this.setCustomValidity(validity.valueMissing ? 'Please indicate that you accept the Terms and Conditions' : '');" />
<span>Yes, I'm in the fourth grade or home-school equivalent</span></label>

<button>Play</button>
</form>

<script type="text/javascript">document.getElementById("in_the_fourth_grade").setCustomValidity("First check the box if you are in the fourth grade.");</script>


</div>

{% endblock content %}

0 comments on commit 74ac154

Please sign in to comment.