Inital Commit
[oweals/finalsclub.git] / views / register.jade
1 script.
2         $(function() {
3                 $( '[name=school]' ).change(function() {
4                         if ( $(this).val() === 'Other' ) {
5                                 $(this).parent().append('<div class="field" id="otherSchool"><input type="text" name="otherSchool"></div>');
6                         } else {
7                                 if ( $( '#otherSchool' ) ) $( '#otherSchool' ).remove();
8                         }
9                 })
10         });
11 div.content
12         div.container1
13                 h1 Create an Account
14                 form#credentials( action = '/register', method = 'POST' )
15                         div.zarea 
16                                 div( class = 'row')
17                                         div( class = 'label')
18                                                 label( for = 'email' ) Email
19                                         div( class = 'field')
20                                                 input( type = 'text', name = 'email' )
21
22                                 div( class = 'row')
23                                         div( class = 'label')
24                                                 label( for = 'password' ) Password
25                                         div( class = 'field')
26                                                 input( type = 'password', name = 'password' )
27
28                                 - if ( schools.length > 0 )
29                                         div( class = 'row')
30                                                 div( class = 'label')
31                                                         label( for = 'school' ) School
32                                                 div( class = 'field')
33                                                         select( name = 'school' )
34                                                                 - each school in schools
35                                                                         option( value = '#{school.name}' ) #{ school.name }
36                                                                 option( value = 'Other' ) Other
37
38                                 div( class = 'row')
39                                         div( class = 'label')
40                                                 label( for = 'name' ) Name
41                                         div( class = 'field')
42                                                 input( type = 'text', name = 'name' )
43
44                                 div( class = 'row')
45                                         div( class = 'label')
46                                                 label( for = 'affil' ) Affiliation
47                                         div( class = 'field')
48                                                 select( name = 'affil' )
49                                                         option( value = 'Student' ) Student
50                                                         option( value = 'Teachers Assistant' ) Teachers Assistant
51
52                                 div( class = 'row')
53                                         div( class = 'label')
54                                                 &nbsp;
55                                         div( class = 'field')
56                                                 button Register