diff --git a/app/pods/components/display-errors/template.hbs b/app/pods/components/display-errors/template.hbs deleted file mode 100644 index 6a74209..0000000 --- a/app/pods/components/display-errors/template.hbs +++ /dev/null @@ -1,3 +0,0 @@ -{{#each a as |error|}} -
-{{/each}} diff --git a/app/pods/components/forms/species-form/component.js b/app/pods/components/forms/species-form/component.js index 0e5912c..a53a469 100644 --- a/app/pods/components/forms/species-form/component.js +++ b/app/pods/components/forms/species-form/component.js @@ -5,6 +5,7 @@ export default Ember.Component.extend({ save: function() { this.sendAction('save'); }, + cancel: function() { this.sendAction('cancel'); }, diff --git a/app/pods/components/forms/strain-form/component.js b/app/pods/components/forms/strain-form/component.js new file mode 100644 index 0000000..3888156 --- /dev/null +++ b/app/pods/components/forms/strain-form/component.js @@ -0,0 +1,17 @@ +import Ember from 'ember'; + +export default Ember.Component.extend({ + actions: { + save: function() { + // Need to override the string id for some reason + let strain = this.get('strain'); + let id = strain.get('species.id'); + strain.set('species.id', +id); + this.sendAction('save'); + }, + + cancel: function() { + this.sendAction('cancel'); + }, + } +}); diff --git a/app/pods/components/forms/strain-form/template.hbs b/app/pods/components/forms/strain-form/template.hbs new file mode 100644 index 0000000..84bc241 --- /dev/null +++ b/app/pods/components/forms/strain-form/template.hbs @@ -0,0 +1,61 @@ + +