-
-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Finished Paper Form Component #408
Merged
miguelcobain
merged 22 commits into
adopted-ember-addons:master
from
shoxter:paper-form-component
Jul 10, 2016
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
cc5b673
Fixed double sending of onInvalid action
shoxter 5745ed6
Better solution -- other didn't work properly when going from NULL to…
shoxter 90cf27f
Fixed semi-colon
shoxter 643f458
Paper form complete
shoxter 1f56862
Changed template to represent new container name
shoxter d804a78
Added ability for users who don't want to disable the submit button t…
shoxter d3e5163
Style fixes
shoxter 68f497c
Fixed test errors
shoxter bc3c3db
Separate onInvalid changes and form changes. They are now different PRs
shoxter f306ca1
Merge branch 'master' into paper-form-component
shoxter 9513e2e
Removed style attribute from tagless component
shoxter 6cd51af
Testing readonly again
shoxter 76f6e4d
Merge branch 'master' into paper-form-component
shoxter f9f99d6
Initiate isTouched in parent
shoxter 5eccc4b
Removed container -- implemented the container's purpose inside of th…
shoxter 5eb24fe
Removed style from tagless component
shoxter 21d8648
Added destructuring
shoxter 88c9033
Fixed semicolon issue
shoxter 011b9f0
Revised paper-form now uses mixins as opposed to a hacky solution (_i…
shoxter a7bb8bd
Fixes
shoxter f09a160
Added .not
shoxter a9e236c
Simplified form
shoxter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ export default Ember.Component.extend({ | |
tagName: '', | ||
classNames: [], | ||
attributeBindings: ['style'], | ||
style: "width:100%", | ||
style: 'width:100%', | ||
numberOfInvalids: 0, | ||
isValid: Ember.computed('numberOfInvalids', function() { | ||
return this.get('numberOfInvalids') === 0 ? true : false; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
@@ -26,6 +26,11 @@ export default Ember.Component.extend({ | |
} | ||
}, | ||
submit: function() { | ||
if (this.get('isInvalid')) { | ||
this.set('isTouched', false); | ||
this.set('isTouched', true); | ||
return; | ||
} | ||
if (this.get('parentSubmit')) { | ||
this.get('parentSubmit')(); | ||
} | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
destructure all the things