Commit 0a62f8c2838c4f6376562ba3ecdeff5fa27440ab
Exists in
master
Merge branch 'bug/document_not_inserting_#196'
Closes #196
Showing
1 changed file
Show diff stats
imports/modules/document-editor.js
... | ... | @@ -21,7 +21,7 @@ const handleUpsert = () => { |
21 | 21 | if (error) { |
22 | 22 | Bert.alert(error.reason, 'danger'); |
23 | 23 | } else { |
24 | - component.form.reset(); | |
24 | + component.documentEditorForm.reset(); | |
25 | 25 | Bert.alert(confirmation, 'success'); |
26 | 26 | browserHistory.push(`/documents/${insertedId || doc._id}`); |
27 | 27 | } |
... | ... | @@ -29,7 +29,7 @@ const handleUpsert = () => { |
29 | 29 | }; |
30 | 30 | |
31 | 31 | const validate = () => { |
32 | - $(component.form).validate({ | |
32 | + $(component.documentEditorForm).validate({ | |
33 | 33 | rules: { |
34 | 34 | title: { |
35 | 35 | required: true, |
... | ... | @@ -50,7 +50,7 @@ const validate = () => { |
50 | 50 | }); |
51 | 51 | }; |
52 | 52 | |
53 | -export default function handleLogin(options) { | |
53 | +export default function documentEditor(options) { | |
54 | 54 | component = options.component; |
55 | 55 | validate(); |
56 | 56 | } | ... | ... |