Allow editing

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2020-03-23 13:25:12 +01:00
commit fa20cda748
No known key found for this signature in database
GPG key ID: 60C25B8C072916CF
7 changed files with 95 additions and 42 deletions

View file

@ -163,16 +163,6 @@ export default {
}
},
formType() {
if (this.form.event.type === 'textForm') {
// TRANSLATORS This means that this is the type of the form. Another type is a 'date form'.
return t('forms', 'Text form')
} else {
// TRANSLATORS This means that this is the type of the form. Another type is a 'text form'.
return t('forms', 'Text form')
}
},
timeSpanCreated() {
return moment(this.form.event.created, 'YYYY-MM-DD HH:mm')
},

View file

@ -23,6 +23,8 @@
import { generateFilePath } from '@nextcloud/router'
import { getRequestToken } from '@nextcloud/auth'
import { translate, translatePlural } from '@nextcloud/l10n'
import '@nextcloud/dialogs/styles/toast.scss'
import Vue from 'vue'
import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip'

View file

@ -27,16 +27,6 @@
<template>
<AppContent>
<Controls :intitle="title">
<template slot="after">
<button :disabled="writingForm" class="button btn primary" @click="debounceWriteForm">
<span>{{ saveButtonTitle }}</span>
<span v-if="writingForm" class="icon-loading-small" />
</button>
<button class="button symbol icon-settings" @click="switchSidebar" />
</template>
</Controls>
<div class="workbench">
<div>
<h2>{{ t('forms', 'Form description') }}</h2>
@ -53,7 +43,7 @@
<div>
<h2>{{ t('forms', 'Make a Form') }}</h2>
<div v-show="form.event.type === 'quizForm'" id="quiz-form-selector-text">
<div id="quiz-form-selector-text">
<!--shows inputs for question types: drop down box to select the type, text box for question, and button to add-->
<label for="ans-type">Answer Type: </label>
<select v-model="selected">
@ -64,7 +54,7 @@
{{ option.text }}
</option>
</select>
<input v-model="newQuizQuestion" :placeholder=" t('forms', 'Add Question') " @keyup.enter="addQuestion()">
<input v-model="newQuizQuestion" :placeholder="t('forms', 'Add Question')" @keyup.enter="addQuestion()">
<button id="questButton"
@click="addQuestion()">
{{ t('forms', 'Add Question') }}
@ -72,7 +62,6 @@
</div>
<!--Transition group to list the already added questions (in the form of quizFormItems)-->
<transitionGroup
v-show="form.mode == 'create'"
id="form-list"
name="list"
tag="ul"
@ -100,7 +89,6 @@ import debounce from 'debounce'
import AppContent from '@nextcloud/vue/dist/Components/AppContent'
import { showError, showSuccess } from '@nextcloud/dialogs'
import Controls from '../components/_base-Controls'
import QuizFormItem from '../components/quizFormItem'
import ViewsMixin from '../mixins/ViewsMixin'
@ -109,7 +97,6 @@ export default {
name: 'Create',
components: {
AppContent,
Controls,
QuizFormItem,
},