mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-25 12:20:32 -04:00
Add schoolName field to StudentSignupModal
This commit is contained in:
parent
8e1143b519
commit
26e321d9e7
3 changed files with 21 additions and 10 deletions
|
@ -5,3 +5,6 @@
|
|||
|
||||
.form
|
||||
margin: 0 25%
|
||||
|
||||
.modal-dialog
|
||||
margin-top: 0
|
||||
|
|
|
@ -13,22 +13,30 @@ block modal-body-content
|
|||
label.control-label(for="email")
|
||||
span(data-i18n="general.email")
|
||||
input#email.input-large.form-control(name="email", type="email")
|
||||
.help-block use your school email if you have one
|
||||
.form-group
|
||||
label.control-label(for="name")
|
||||
span(data-i18n="general.name") Name
|
||||
if me.get('name')
|
||||
input#name.input-large.form-control(name="name", type="text", value="#{me.get('name')}")
|
||||
else
|
||||
input#name.input-large.form-control(name="name", type="text", value="", placeholder="Anoner")
|
||||
input#name.input-large.form-control(name="name", type="text", value="", placeholder="e.g. Alex W the Skater")
|
||||
.help-block a unique name no one has chosen
|
||||
.form-group
|
||||
label.control-label(for="password")
|
||||
span(data-i18n="general.password") Password
|
||||
input#password.input-large.form-control(name="password", type="password")
|
||||
.help-block pick something you can remember
|
||||
.form-group
|
||||
label.control-label(for="class-code")
|
||||
label.control-label(for="class-code-input")
|
||||
span Class Code
|
||||
input#class-code-input.input-large.form-control(name="class-code")
|
||||
input#class-code-input.input-large.form-control(name="classCode")
|
||||
.help-block optional - ask your teacher to give you one!
|
||||
.form-group
|
||||
label.control-label(for="school-input")
|
||||
span(data-i18n="signup.school_name") School Name and City
|
||||
input#school-input.input-large.form-control(name="schoolName", data-i18n="[placeholder]signup.school_name_placeholder")
|
||||
.help-block optional - what school do you go to?
|
||||
|
||||
#errors-alert.alert.alert-danger.hide
|
||||
|
||||
|
|
|
@ -58,8 +58,8 @@ module.exports = class StudentSignUpModal extends ModalView
|
|||
return unless @emailCheck()
|
||||
# TODO: consolidate with AuthModal logic, or make user creation process less magical, more RESTful
|
||||
data = forms.formToObject @$el
|
||||
delete data['class-code']
|
||||
for key, val of me.attributes when key in ['preferredLanguage', 'testGroupNumber', 'dateCreated', 'wizardColor1', 'name', 'music', 'volume', 'emails']
|
||||
delete data.classCode
|
||||
for key, val of me.attributes when key in ['preferredLanguage', 'testGroupNumber', 'dateCreated', 'wizardColor1', 'name', 'music', 'volume', 'emails', 'schoolName']
|
||||
data[key] ?= val
|
||||
Backbone.Mediator.publish "auth:signed-up", {}
|
||||
data.emails ?= {}
|
||||
|
|
Loading…
Add table
Reference in a new issue