In live session, radio are big buttons
This commit is contained in:
parent
89f61d1046
commit
ed42f2eaeb
@ -91,6 +91,7 @@
|
||||
kind={question.kind}
|
||||
{proposals}
|
||||
readonly
|
||||
live={survey.direct !== null}
|
||||
bind:value={value}
|
||||
on:change={() => { dispatch("change"); }}
|
||||
/>
|
||||
@ -108,6 +109,7 @@
|
||||
kind={question.kind}
|
||||
{proposals}
|
||||
{readonly}
|
||||
live={survey.direct !== null}
|
||||
bind:value={value}
|
||||
on:change={() => { dispatch("change"); }}
|
||||
/>
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
export let edit = false;
|
||||
export let proposals = [];
|
||||
export let live = false;
|
||||
export let kind = 'mcq';
|
||||
export let prefixid = '';
|
||||
export let readonly = false;
|
||||
@ -28,6 +29,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class:d-flex={live} class:justify-content-around={live}>
|
||||
{#each proposals as proposal, pid (proposal.id)}
|
||||
<div class="form-check">
|
||||
{#if kind == 'mcq'}
|
||||
@ -44,7 +46,8 @@
|
||||
{:else}
|
||||
<input
|
||||
type="radio"
|
||||
class="form-check-input"
|
||||
class:btn-check={live}
|
||||
class:form-check-input={!live}
|
||||
disabled={readonly}
|
||||
name={prefixid + 'proposal' + proposal.id_question}
|
||||
id={prefixid + 'p' + proposal.id}
|
||||
@ -84,7 +87,10 @@
|
||||
</form>
|
||||
{:else}
|
||||
<label
|
||||
class="form-check-label"
|
||||
class:form-check-label={!live}
|
||||
class:btn={live}
|
||||
class:btn-lg={live}
|
||||
class:btn-primary={live}
|
||||
for={prefixid + 'p' + proposal.id}
|
||||
>
|
||||
{proposal.label}
|
||||
@ -92,6 +98,7 @@
|
||||
{/if}
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
{#if edit}
|
||||
{#if kind == 'mcq'}
|
||||
<input
|
||||
|
Reference in New Issue
Block a user