Add session form
This commit is contained in:
parent
964b7f519f
commit
ed1c57a5b6
|
@ -2,6 +2,7 @@
|
|||
<div id="app" class="antialiased min-h-screen font-sans bg-gray-100 text-black p-12">
|
||||
<div class="w-full max-w-2xl mx-auto">
|
||||
<accepted-sessions-list :sessions="sortedSessions" />
|
||||
<session-form></session-form>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -11,12 +12,14 @@
|
|||
<script>
|
||||
import _ from 'lodash'
|
||||
import AcceptedSessionsList from '@/components/AcceptedSessionsList'
|
||||
import SessionForm from '@/components/SessionForm'
|
||||
|
||||
const axios = require('axios')
|
||||
|
||||
export default {
|
||||
components: {
|
||||
AcceptedSessionsList
|
||||
AcceptedSessionsList,
|
||||
SessionForm
|
||||
},
|
||||
|
||||
data () {
|
||||
|
|
40
src/components/SessionForm.vue
Normal file
40
src/components/SessionForm.vue
Normal file
|
@ -0,0 +1,40 @@
|
|||
<template>
|
||||
<section class="mt-8">
|
||||
<h3 class="text-2xl font-semibold mb-4">Submit a Session</h3>
|
||||
|
||||
<form action="" @submit.prevent="submit">
|
||||
<label class="block mb-4">
|
||||
Title
|
||||
<input name="title" type="text" class="w-full border border-gray-400 p-2 mt-1" v-model="form.title" required/>
|
||||
</label>
|
||||
|
||||
<label class="block mb-4">
|
||||
Abstract
|
||||
<textarea name="title" rows="5" class="w-full border border-gray-400 p-2 mt-1" v-model="form.body" required/>
|
||||
</label>
|
||||
|
||||
<input class="cursor-pointer bg-blue-500 hover:bg-blue-700 focus:bg-blue-700 text-gray-100 px-4 py-2 rounded" type="submit" value="Submit session">
|
||||
</form>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
form: {
|
||||
body: '',
|
||||
title: '',
|
||||
field_session_status: 'accepted'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
submit () {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Reference in a new issue