mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-30 19:06:59 -05:00
Small fix for #3276 NewLevelComponentModal
This commit is contained in:
parent
6b02a7a31f
commit
b42ed395c0
2 changed files with 5 additions and 2 deletions
|
@ -8,9 +8,8 @@ block modal-body-content
|
|||
.form-group
|
||||
label(for="level-component-system", data-i18n="editor.new_component_field_system").control-label System
|
||||
select.form-control#level-component-system(name='system')
|
||||
for system in view.LevelComponent.schema.properties.system.enum
|
||||
for system in view.systems
|
||||
option(value=system)= system
|
||||
//input.form-control#level-component-system(name="system", type="text")
|
||||
.form-group
|
||||
label(for="level-component-name", data-i18n="general.name").control-label Name
|
||||
input.form-control#level-component-name(name="name", type="text")
|
||||
|
|
|
@ -14,6 +14,10 @@ module.exports = class NewLevelComponentModal extends ModalView
|
|||
'click #new-level-component-submit': 'makeNewLevelComponent'
|
||||
'submit form': 'makeNewLevelComponent'
|
||||
|
||||
constructor: (options) ->
|
||||
super options
|
||||
@systems = LevelComponent.schema.properties.system.enum
|
||||
|
||||
makeNewLevelComponent: (e) ->
|
||||
e.preventDefault()
|
||||
system = @$el.find('#level-component-system').val()
|
||||
|
|
Loading…
Reference in a new issue