2019-04-08 16:31:40 +00:00
|
|
|
// releaseDataset.js
|
|
|
|
import Vue from 'vue';
|
|
|
|
import VeeValidate from 'vee-validate';
|
|
|
|
Vue.use(VeeValidate);
|
|
|
|
|
|
|
|
|
|
|
|
const app = new Vue({
|
|
|
|
el: '#app1',
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
dataset: {
|
|
|
|
firstName: '',
|
2019-04-11 16:52:10 +00:00
|
|
|
preferred_editor: ''
|
2019-04-08 16:31:40 +00:00
|
|
|
},
|
|
|
|
submitted: false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
checkForm(e) {
|
|
|
|
// Log entire model to console
|
|
|
|
// console.log(this.dataset);
|
|
|
|
this.submitted = true;
|
|
|
|
this.$validator.validate().then(result => {
|
|
|
|
if (result) {
|
|
|
|
console.log('From Submitted!');
|
|
|
|
document.getElementById("releaseForm").submit();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|