Skip to content

Commit 6817fac

Browse files
authored
Merge pull request #13340 from nucleogenesis/fix--rtl-quiz-creation
RTL fixes in Quiz Creation
2 parents 345e677 + f2005e2 commit 6817fac

File tree

2 files changed

+46
-36
lines changed

2 files changed

+46
-36
lines changed

kolibri/plugins/coach/assets/src/views/common/assignments/AssignmentDetailsModal.vue

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
:invalidText="titleIsInvalidText"
4444
:showInvalidText="titleIsInvalid"
4545
:disabled="disabled || formIsSubmitted"
46-
:style="{ marginLeft: windowIsLarge ? '-1em' : 0 }"
46+
:class="{ 'textbox-lg': windowIsLarge }"
4747
@input="showTitleError = false"
4848
@keydown.enter="submitData"
4949
/>
@@ -70,8 +70,7 @@
7070
? afterLearnerSubmitsQuizDescription$()
7171
: afterCoachEndsQuizDescription$()
7272
"
73-
:style="windowIsSmall ? 'margin-left: -1em' : 'margin-left: -3em'"
74-
class="visibility-score-select"
73+
:class="['visibility-score-select', windowIsSmall ? 'select-sm' : 'select-lg']"
7574
@change="option => (instantReportVisibility = option.value)"
7675
/>
7776
</KGridItem>
@@ -96,7 +95,7 @@
9695
:maxlength="200"
9796
:disabled="disabled || formIsSubmitted"
9897
:textArea="true"
99-
:style="{ marginLeft: windowIsLarge ? '-1em' : 0 }"
98+
:class="{ 'textbox-lg': windowIsLarge }"
10099
/>
101100
</KGridItem>
102101
</KGrid>
@@ -510,4 +509,16 @@
510509
font-weight: bold;
511510
}
512511
512+
.textbox-lg {
513+
margin-left: -1em;
514+
}
515+
516+
.select-sm {
517+
margin-left: -1em;
518+
}
519+
520+
.select-lg {
521+
margin-left: -3em;
522+
}
523+
513524
</style>

kolibri/plugins/coach/assets/src/views/common/assignments/SidePanelRecipientsSelector/index.vue

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -20,38 +20,29 @@
2020
:buttonValue="ClassRecipients.GROUP_OR_INDIVIDUAL"
2121
:disabled="disabled"
2222
>
23-
<div>
24-
<div
25-
:style="{
26-
display: 'flex',
27-
columnGap: '8px',
28-
flexDirection: hasGroupOrIndividualRecipients ? 'column' : 'row',
29-
alignItems: hasGroupOrIndividualRecipients ? 'flex-start' : 'center',
30-
}"
31-
>
32-
<KLabeledIcon
33-
:label="coachString('groupsAndLearnersLabel')"
34-
icon="people"
35-
style="width: auto"
36-
/>
37-
<span v-if="hasGroupOrIndividualRecipients">
38-
{{ selectedMessage }}
39-
</span>
40-
<KButton
41-
v-if="selectedRecipients === ClassRecipients.GROUP_OR_INDIVIDUAL"
42-
appearance="basic-link"
43-
:text="hasGroupOrIndividualRecipients ? $tr('changeAction') : $tr('selectAction')"
44-
@click="isLearnersSelectorOpen = true"
45-
/>
46-
</div>
47-
<div
48-
v-if="assignmentInvalidText"
49-
:style="{
50-
color: $themeTokens.error,
51-
}"
52-
>
53-
{{ assignmentInvalidText }}
54-
</div>
23+
<div :dir="isRtl ? 'rtl' : 'ltr'">
24+
<KLabeledIcon
25+
:label="coachString('groupsAndLearnersLabel')"
26+
icon="people"
27+
/>
28+
<span v-if="hasGroupOrIndividualRecipients">
29+
{{ selectedMessage }}
30+
</span>
31+
<KButton
32+
v-if="selectedRecipients === ClassRecipients.GROUP_OR_INDIVIDUAL"
33+
appearance="basic-link"
34+
:text="hasGroupOrIndividualRecipients ? $tr('changeAction') : $tr('selectAction')"
35+
style="margin: 0 0.5em"
36+
@click="isLearnersSelectorOpen = true"
37+
/>
38+
</div>
39+
<div
40+
v-if="assignmentInvalidText"
41+
:style="{
42+
color: $themeTokens.error,
43+
}"
44+
>
45+
{{ assignmentInvalidText }}
5546
</div>
5647
</KRadioButton>
5748
</KRadioButtonGroup>
@@ -259,4 +250,12 @@
259250
align-items: center;
260251
}
261252
253+
/deep/ .k-radio-button-label {
254+
text-align: left;
255+
}
256+
257+
/deep/ .labeled-icon-wrapper {
258+
width: auto;
259+
}
260+
262261
</style>

0 commit comments

Comments
 (0)