Skip to content

Commit

Permalink
Wrap transcription form in <form> tag
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandermendes committed Jul 4, 2018
1 parent d6420e4 commit 1896ce0
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions src/components/sidebars/items/Transcribe.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<template>
<vue-form-generator
class="lv-form"
ref="form"
v-if="form"
:schema="form.schema"
:model="form.model"
:options="formOptions"
@validated="onValidated">
</vue-form-generator>
<form v-on:submit.prevent="onSubmit">
<vue-form-generator
class="lv-form"
ref="form"
v-if="form"
:schema="form.schema"
:model="form.model"
:options="formOptions"
@validated="onValidated">
</vue-form-generator>
</form>
</template>

<script>
Expand Down Expand Up @@ -76,12 +78,10 @@ export default {
},
/**
* Emit the submit event on enter.
* Emit the submit event.
*/
onKeyup (evt) {
if (evt.keyCode === 13) {
this.$emit('submit', this.task)
}
onSubmit () {
this.$emit('submit', this.task)
},
/**
Expand All @@ -93,7 +93,6 @@ export default {
for (let i = 0; i < fieldElems.length; i++) {
fieldElems[i].addEventListener('focus', this.onInputFocus)
fieldElems[i].addEventListener('blur', this.onInputBlur)
fieldElems[i].addEventListener('keyup', this.onKeyup)
}
}
},
Expand Down

0 comments on commit 1896ce0

Please sign in to comment.