New list response
This commit is contained in:
parent
2e4f0eaf30
commit
24f0e82571
4 changed files with 56 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
|||
<script>
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
|
||||
import ListInput from './ListInput.svelte';
|
||||
import QuestionHeader from './QuestionHeader.svelte';
|
||||
import QuestionProposals from './QuestionProposals.svelte';
|
||||
import ResponseCorrected from './ResponseCorrected.svelte';
|
||||
|
|
@ -69,7 +70,7 @@
|
|||
</div>
|
||||
{/if}
|
||||
{#if edit}
|
||||
{#if question.kind == 'text' || question.kind == 'int'}
|
||||
{#if question.kind && (question.kind == 'text' || question.kind == 'int' || question.kind.startsWith('list'))}
|
||||
<div class="form-group row">
|
||||
<label class="col-2 col-form-label" for="q{qid}placeholder">Placeholder</label>
|
||||
<div class="col">
|
||||
|
|
@ -127,6 +128,14 @@
|
|||
placeholder={question.placeholder}
|
||||
on:change={() => { dispatch("change"); }}
|
||||
>
|
||||
{:else if question.kind && question.kind.startsWith('list')}
|
||||
<ListInput
|
||||
class="ml-5 col-sm-2 form-control my-1"
|
||||
kind={question.kind}
|
||||
bind:value={value}
|
||||
placeholder={question.placeholder}
|
||||
on:change={() => { dispatch("change"); }}
|
||||
/>
|
||||
{:else}
|
||||
<textarea
|
||||
class="form-control"
|
||||
|
|
|
|||
Reference in a new issue