Can now transition from home to observation page properly.

This commit is contained in:
neviyn 2018-09-20 16:49:39 +01:00
parent 0b2bbb1dbe
commit 2f3f65a3d7

View File

@ -1,24 +1,25 @@
<template>
<b-container class="home" align-h="center">
<h1>Training Observations</h1>
<b-form @submit="onSubmit" id="submission-form" novalidate>
<b-row align-h="center">
<b-col>
<b-form-group label="Site">
<b-form-select :value="site" @input="setSite" :options="siteOptions"></b-form-select>
<b-form-select :value="site" @input="setSite" :options="siteOptions" style="text-align:center;"></b-form-select>
</b-form-group>
</b-col>
</b-row>
<b-row align-h="center">
<b-col>
<b-form-group label="Description">
<b-form-input :value="description" @input="setDescription" type="text"></b-form-input>
<b-form-input :value="description" @input="setDescription" type="text" style="text-align:center;"></b-form-input>
</b-form-group>
</b-col>
</b-row>
<b-row align-h="center">
<b-col>
<b-form-group label="Type">
<b-form-select :value="type" @input="setType">
<b-form-select :value="type" @input="setType" style="text-align:center;">
<option :value=null>Select a training type</option>
<option value="INITIAL">INITIAL</option>
<option value="CONTINUING">CONTINUING</option>
@ -37,9 +38,10 @@
</b-row>
<b-row align-h="center">
<b-col>
<b-button>Start</b-button>
<b-button type="submit" size="lg" variant="primary">Start</b-button>
</b-col>
</b-row>
</b-form>
</b-container>
</template>
@ -81,6 +83,15 @@ export default {
this.loadingTutors = false;
});
}
},
onSubmit: function(e) {
console.log("submit");
e.preventDefault();
e.stopPropagation();
var form = document.getElementById("submission-form");
if (form.checkValidity()) {
this.$router.push("/observation");
}
}
}
};