diff --git a/README.md b/README.md index 609d7c8..2d673ee 100644 --- a/README.md +++ b/README.md @@ -1,50 +1,44 @@ Ember Easy Form Extensions [![Build Status](https://travis-ci.org/sir-dunxalot/ember-easy-form-extensions.svg?branch=master)](https://travis-ci.org/sir-dunxalot/ember-easy-form-extensions) ====== -This Ember addon enhances Ember EasyForm by providing easy action handling, validations, and Ember 1.13 support for your forms +This Ember addon manages form submission in the controller/component and route layers of Ember apps. -**To support Ember 1.13 Easy Form has been temporarily rewritten for Ember CLI. When EasyForm is updated by Dockyard this addon will support that instead of our own form components.** +It works alongside most form component addons including but not limited to [Ember EasyForm](https://github.com/DockYard/ember-easy-form) and [Ember Paper](https://github.com/miguelcobain/ember-paper). -Ember apps running 1.12 or below may behave unexpectedly. +**Ember EasyForm is not longer a required dependency for this addon.** ## Installation -Uninstall any references to `ember-easy-form` and `ember-validations`and then: - ```sh +npm uninstall --save-dev ember-validations ember install ember-easy-form-extensions ``` ## Overview and Example -`ember-easy-form-extensions` comes prepackaged with `ember-easy-form` and `ember-validations` so you can now build awesome forms and handle the subsequent submission events just as easily as Easy Form makes writing your templates. - -Here's an example: +Designed to handle formsubmission events, ember-easy-form-extensions reduces boilerplate code and standardizes form submission whilst providing a broad API for you to interact with. ```hbs -{{!--app-name/templates/posts/new.hbs--}} - -{{#form-wrapper}} - {{#form-controls legend='Write a new post'}} +{{!--app-name/templates/users/new.hbs--}} - {{!--model.title--}} - {{input-group property='title'}} +
``` ```js -// app-name/controllers/posts/new.js +// app-name/controllers/users/new.js import Ember from 'ember'; -import FormMixin from 'ember-easy-form-extensions/mixins/controllers/form'; +import FormMixin from 'ember-easy-form-extensions/mixins/components/form'; export default Ember.Controller.extend( FormMixin, { @@ -74,4 +68,9 @@ export default Ember.Controller.extend( ## Documentation -A walkthrough and documentation can be found in the [wiki](https://github.com/sir-dunxalot/ember-easy-form-extensions/wiki). +A walkthrough and documentation can be found in [the wiki](https://github.com/sir-dunxalot/ember-easy-form-extensions/wiki). + +1. [Form templates](https://github.com/sir-dunxalot/ember-easy-form-extensions/wiki/1.-Form-Template) +2. [Validating models(https://github.com/sir-dunxalot/ember-easy-form-extensions/wiki/2.-Validating-Models)] +3. [Saving Models](https://github.com/sir-dunxalot/ember-easy-form-extensions/wiki/3.-Saving-Models) +4. [Deleting Models](https://github.com/sir-dunxalot/ember-easy-form-extensions/wiki/4.-Deleting-Models) diff --git a/addon/components/form-submission-button.js b/addon/components/form-submission-button.js index 6c5d482..64cf500 100644 --- a/addon/components/form-submission-button.js +++ b/addon/components/form-submission-button.js @@ -1,8 +1,6 @@ import Ember from 'ember'; import layout from '../templates/components/form-submission-button'; -const { computed } = Ember; - export default Ember.Component.extend({ /* Options */ @@ -20,13 +18,6 @@ export default Ember.Component.extend({ layout: layout, tagName: 'button', - dataTest: computed('action', function() { - const action = this.get('action') || ''; - const dasherizedAction = Ember.String.dasherize(action); - - return `button-for-${dasherizedAction}`; - }), - /* Methods */ click: function(event) { diff --git a/package.json b/package.json index b4b7607..7ebc4a1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ember-easy-form-extensions", "version": "2.0.0", - "description": "Enhances Ember form addons and components, like Easy Form, with Boilerplate action handling, validations, and more", + "description": "Manages form submission in the component/controller and route layers of Ember apps", "directories": { "doc": "doc", "test": "tests"