Small fix for #3276 NewLevelComponentModal

This commit is contained in:
Nick Winter 2015-12-23 08:41:00 -08:00
parent 6b02a7a31f
commit b42ed395c0
2 changed files with 5 additions and 2 deletions

View file

@ -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")

View file

@ -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()