added validation to exercise creation page

This commit is contained in:
2013-01-20 16:35:41 -05:00
parent 536db0e212
commit ce17e701ce
16 changed files with 2006 additions and 90 deletions

View File

@@ -1,25 +1,25 @@
extends ../layout
block additionalscripts
script(src='/javascripts/newexercisevalidation.js')
script(src='/javascripts/newexercisevalidation.js')
block content
h1 New Exercise<p></p>
form(method="POST", action="/admin/exercises")
form(id="newexercise", method="POST", action="/admin/exercises/new")
ul
li
label(for="name") Exercise Name<br />Need to add check to ensure we donbt get duplicate names<br />
label(for="name") Exercise Name<br />
input#name(name="name")
li
label(for="type") Exercise Type<br />
select#type(name="type")
option(value='notselected') Select One
option(value='freeweights') Free Weights
option(value='0130') Exercise Machines
option(value='0200') Bodyweight
option(value='0200') Kettlebells
option(value='0200') Cardio
option(value='machine') Exercise Machines
option(value='bodyweight') Bodyweight
option(value='kettlebells') Kettlebells
option(value='cardio') Cardio
li
label(for="type") Exercise Description<br />
@@ -32,7 +32,7 @@ block content
marray = "musclearray[" + i + "]"
li
label(for="type") Muscle data #{i}
input(name= marray, class= marray, id= marray)
input(name= marray, class="musclearray", id= marray)
- }
li
label(for="type") Keywords<br />