/
basic-info-view.jade
111 lines (103 loc) · 5.06 KB
/
basic-info-view.jade
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
form#basic-info-form.modal-body.basic-info
- var path = view.signupState.get('path')
.modal-body-content
div.form-container
if ['student', 'teacher'].indexOf(view.signupState.get('path')) !== -1
.row.full-name
.col-xs-offset-3(class=(path === 'teacher' ? 'col-xs-3' : 'col-xs-5'))
.form-group
label.control-label(for="first-name-input")
span(data-i18n="general.first_name")
input#first-name-input.form-control.input-lg(name="firstName" value=view.signupState.get('signupForm').firstName)
div(class=(path === 'teacher' ? 'col-xs-3' : 'col-xs-4'))
if view.signupState.get('path') === 'teacher'
.last-name.form-group
label.control-label(for="last-name-input")
span(data-i18n="general.last_name")
input#last-name-input.form-control.input-lg(name="lastName" value=view.signupState.get('signupForm').lastName)
else
.last-initial.form-group
label.control-label(for="last-name-input")
span(data-i18n="general.last_initial")
input#last-name-input.form-control.input-lg(name="lastName" maxlength="1" value=view.signupState.get('signupForm').lastName)
.form-group
.row
.col-xs-5.col-xs-offset-3
label.control-label(for="email-input")
span(data-i18n="share_progress_modal.form_label")
if view.signupState.get('path') === 'student'
.help-block.optional-help-block.pull-right
span.optional-text(data-i18n="signup.optional")
input.form-control.input-lg#email-input(name="email" type="email" value=view.signupState.get('signupForm').email)
.col-xs-4.email-check.fancy-error
- var checkEmailState = view.state.get('checkEmailState');
if checkEmailState === 'checking'
span.small(data-i18n="signup.checking")
if checkEmailState === 'exists'
span.small
span.text-burgundy.glyphicon.glyphicon-remove-circle
=" "
span(data-i18n="signup.account_exists")
=" "
a.login-link(data-i18n="signup.sign_in")
if checkEmailState === 'available'
span.small
span.text-forest.glyphicon.glyphicon-ok-circle
=" "
span(data-i18n="signup.email_good")
if view.signupState.get('path') !== 'teacher'
.form-group
.row
.col-xs-5.col-xs-offset-3
label.control-label(for="username-input")
span(data-i18n="general.username")
input.form-control.input-lg#username-input(name="name" value=view.signupState.get('signupForm').name)
.col-xs-4.name-check.fancy-error
- var checkNameState = view.state.get('checkNameState');
if checkNameState === 'checking'
span.small(data-i18n="signup.checking")
if checkNameState === 'exists'
span.small
span.text-burgundy.glyphicon.glyphicon-remove-circle
=" "
span= view.state.get('suggestedNameText')
if checkNameState === 'available'
span.small
span.text-forest.glyphicon.glyphicon-ok-circle
=" "
span(data-i18n="signup.name_available")
.form-group
.row
.col-xs-5.col-xs-offset-3
label.control-label(for="password-input")
span(data-i18n="general.password")
input.form-control.input-lg#password-input(name="password" type="password" value=view.signupState.get('signupForm').password)
.error-area
- var error = view.state.get('error');
if error
.row
.col-xs-7.col-xs-offset-3
.alert.alert-danger= error
.hr-text
hr
span(data-i18n="general.or")
.auth-network-logins.text-center
.gplus-login
a#gplus-signup-btn.network-login(disabled=!view.signupState.get('gplusEnabled'), data-sso-used="gplus")
img.gplus-logo(src="/images/pages/modal/auth/gplus_sso_button2.png", draggable="false")
.facebook-login
a#facebook-signup-btn.network-login(disabled=!view.signupState.get('facebookEnabled'), data-sso-used="facebook")
img.facebook-logo(src="/images/pages/modal/auth/facebook_sso_button2.png", draggable="false")
// In reverse order for tabbing purposes
.history-nav-buttons
if view.signupState.get('path') === 'teacher'
button.next-button.btn.btn-lg.btn-navy(type='submit')
span(data-i18n="common.next")
else if view.signupState.get('subModalContinue')
button#create-account-btn.next-button.btn.btn-lg.btn-navy(type='submit')
span(data-i18n="common.continue")
else
button#create-account-btn.next-button.btn.btn-lg.btn-navy(type='submit')
span(data-i18n="login.sign_up")
button.back-button.btn.btn-lg.btn-navy-alt(type='button')
span(data-i18n="common.back")