Skip to content

Commit db33dee

Browse files
Chartman123susnux
authored andcommitted
always allow to reorder options in edit mode
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
1 parent 486d5a2 commit db33dee

File tree

3 files changed

+20
-28
lines changed

3 files changed

+20
-28
lines changed

src/components/Questions/AnswerInput.vue

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,26 @@
2828
<!-- Actions for reordering and deleting the option -->
2929
<div class="option__actions">
3030
<template v-if="!answer.local">
31-
<template v-if="allowReorder">
32-
<NcButton
33-
ref="buttonUp"
34-
:aria-label="t('forms', 'Move option up')"
35-
:disabled="index === 0"
36-
type="tertiary"
37-
@click="onMoveUp">
38-
<template #icon>
39-
<IconArrowUp :size="20" />
40-
</template>
41-
</NcButton>
42-
<NcButton
43-
ref="buttonDown"
44-
:aria-label="t('forms', 'Move option down')"
45-
:disabled="index === maxIndex"
46-
type="tertiary"
47-
@click="onMoveDown">
48-
<template #icon>
49-
<IconArrowDown :size="20" />
50-
</template>
51-
</NcButton>
52-
</template>
31+
<NcButton
32+
ref="buttonUp"
33+
:aria-label="t('forms', 'Move option up')"
34+
:disabled="index === 0"
35+
type="tertiary"
36+
@click="onMoveUp">
37+
<template #icon>
38+
<IconArrowUp :size="20" />
39+
</template>
40+
</NcButton>
41+
<NcButton
42+
ref="buttonDown"
43+
:aria-label="t('forms', 'Move option down')"
44+
:disabled="index === maxIndex"
45+
type="tertiary"
46+
@click="onMoveDown">
47+
<template #icon>
48+
<IconArrowDown :size="20" />
49+
</template>
50+
</NcButton>
5351
<NcButton
5452
type="tertiary"
5553
:aria-label="t('forms', 'Delete answer')"
@@ -93,10 +91,6 @@ export default {
9391
},
9492
9593
props: {
96-
allowReorder: {
97-
type: Boolean,
98-
default: true,
99-
},
10094
answer: {
10195
type: Object,
10296
required: true,

src/components/Questions/QuestionDropdown.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
ref="input"
4949
:answer="answer"
5050
is-dropdown
51-
:allow-reorder="!extraSettings?.shuffleOptions"
5251
:form-id="formId"
5352
:index="index"
5453
:is-unique="!isMultiple"

src/components/Questions/QuestionMultiple.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@
124124
:key="answer.local ? 'option-local' : answer.id"
125125
ref="input"
126126
:answer="answer"
127-
:allow-reorder="!extraSettings?.shuffleOptions"
128127
:form-id="formId"
129128
:index="index"
130129
:is-unique="isUnique"

0 commit comments

Comments
 (0)