diff --git a/app/components/add-env-var.coffee b/app/components/add-env-var.coffee index fbffbfb2..b4a674e3 100644 --- a/app/components/add-env-var.coffee +++ b/app/components/add-env-var.coffee @@ -7,13 +7,18 @@ AddEnvVarComponent = Ember.Component.extend store: Ember.inject.service() isValid: () -> - true + if Ember.isBlank(@get('name')) + this.set('nameIsBlank', true) + false + else + true reset: -> @setProperties(name: null, value: null, public: null) actions: save: -> + console.log('SUBMITTED') return if @get('isSaving') @set('isSaving', true) @@ -34,5 +39,8 @@ AddEnvVarComponent = Ember.Component.extend else @set('isSaving', false) + nameChanged: -> + this.set('nameIsBlank', false) + `export default AddEnvVarComponent` diff --git a/app/templates/components/add-env-var.hbs b/app/templates/components/add-env-var.hbs index a0dded7c..8d25dbb8 100644 --- a/app/templates/components/add-env-var.hbs +++ b/app/templates/components/add-env-var.hbs @@ -1,6 +1,9 @@