fix: changed SCORM input from checkbox to switch with better description

This commit is contained in:
Jannat Patel
2024-11-20 19:52:28 +05:30
parent af533a7a2c
commit 460edc7bc7

View File

@@ -17,10 +17,15 @@
<template #body-content> <template #body-content>
<div class="space-y-4 text-base"> <div class="space-y-4 text-base">
<FormControl label="Title" v-model="chapter.title" :required="true" /> <FormControl label="Title" v-model="chapter.title" :required="true" />
<FormControl <Switch
:label="__('Is SCORM Package')" size="sm"
:label="__('SCORM Package')"
:description="
__(
'Enable this only if you want to upload a SCORM package as a chapter.'
)
"
v-model="chapter.is_scorm_package" v-model="chapter.is_scorm_package"
type="checkbox"
/> />
<div v-if="chapter.is_scorm_package"> <div v-if="chapter.is_scorm_package">
<FileUploader <FileUploader
@@ -70,8 +75,9 @@ import {
Dialog, Dialog,
FileUploader, FileUploader,
FormControl, FormControl,
Switch,
} from 'frappe-ui' } from 'frappe-ui'
import { defineModel, reactive, watch, ref } from 'vue' import { defineModel, reactive, watch } from 'vue'
import { showToast, getFileSize } from '@/utils/' import { showToast, getFileSize } from '@/utils/'
import { capture } from '@/telemetry' import { capture } from '@/telemetry'
import { FileText, X } from 'lucide-vue-next' import { FileText, X } from 'lucide-vue-next'