diff --git a/src/features/forms/components/inputs/GenericInput.vue b/src/features/forms/components/inputs/GenericInput.vue index bad6b0f017469034730bfb2274bd194cb42234c7..7f06bf152ebf7a6d7c0fd8880b7edfc83732cf5b 100644 --- a/src/features/forms/components/inputs/GenericInput.vue +++ b/src/features/forms/components/inputs/GenericInput.vue @@ -69,7 +69,8 @@ function showLabel(inputType: string) { v-if="input.hint" v-tippy="{ content: input.hint, - placement: 'right', + placement: 'top', + allowHTML: true, arrow: true, arrowType: 'round', animation: 'fade', @@ -132,6 +133,7 @@ function showLabel(inputType: string) { v-if="input.type === 'checkbox'" :id="inputId" :label="input.label" + :hint="input.hint" :input-value="inputValue as boolean" @change="emit('check', $event)" @save-given-state="emit('saveGivenState', $event)" diff --git a/src/features/forms/components/inputs/card/components/CheckBoxInput.vue b/src/features/forms/components/inputs/card/components/CheckBoxInput.vue index 2f7c541c59302eb2141239178e809af50be63773..edb5b654f8636a9f5571ac4c1036daca73e188e1 100644 --- a/src/features/forms/components/inputs/card/components/CheckBoxInput.vue +++ b/src/features/forms/components/inputs/card/components/CheckBoxInput.vue @@ -5,6 +5,7 @@ defineProps<{ id: string; inputValue: boolean; label: string; + hint?: string; }>(); const emit = defineEmits<{ @@ -25,7 +26,21 @@ function onChange(event: Event) { <template> <div class="checkbox"> <input :id="id" class="checkbox-input" type="checkbox" :checked="inputValue" @change="onChange" /> - <label :for="id">{{ label }}</label> + <div class="input-label"> + <label :for="id">{{ label }}</label> + <i + v-if="hint" + v-tippy="{ + content: hint, + placement: 'top', + allowHTML: true, + arrow: true, + arrowType: 'round', + animation: 'fade', + }" + class="icon-help-circle" + /> + </div> </div> </template> diff --git a/src/shared/data/forms/badgeForm.data.ts b/src/shared/data/forms/badgeForm.data.ts index afcaef8198352848c13eb4dfd1413f2a517c14e2..cd2ff1590b6f376897ebdcba51a125d0ef06f592 100644 --- a/src/shared/data/forms/badgeForm.data.ts +++ b/src/shared/data/forms/badgeForm.data.ts @@ -19,7 +19,7 @@ export const customBadgeForm: Form = { { id: 'icon', type: 'icon-picker', - label: 'Icône de couverture', + label: 'Icône du badge', value: '', placeholder: "Modifier l'icône", }, diff --git a/src/shared/data/forms/contentForm.data.ts b/src/shared/data/forms/contentForm.data.ts index e2d56e3813f66fa18b96a4e1d7f86fb06edb03a5..a653f991d52f56720e7ce8dcab940c7718c0a7b3 100644 --- a/src/shared/data/forms/contentForm.data.ts +++ b/src/shared/data/forms/contentForm.data.ts @@ -12,7 +12,7 @@ export const textForm: Form = { { id: 'html', type: 'html', - label: 'Résumé', + label: '', value: '', placeholder: 'Saisissez un résumé...', }, @@ -36,6 +36,7 @@ export const videoForm: Form = { placeholder: 'Ajouter une vidéo', value: '', accept: '.mp4', + hint: 'Format recommandé: 16:9 (720x480)' }, { id: 'summary', @@ -51,6 +52,7 @@ export const videoForm: Form = { value: '', placeholder: 'Ajouter une transcription', accept: '.txt,.vtt', + hint: 'Extensions acceptés: .vtt, .txt <br>Pour les utilisateurs qui ne souhaitent pas ou ne sont pas en capacité écouter la vidéo' }, { id: 'poster', @@ -59,6 +61,7 @@ export const videoForm: Form = { value: '', placeholder: 'Ajouter une vignette', accept: '.png,.jpg,.jpeg,.gif,.bmp,.svg,.webp', + hint: 'Format recommandé: idem à la vidéo' }, ], }, @@ -92,6 +95,7 @@ export const videoForm: Form = { value: '', placeholder: 'Ajouter des sous-titres', accept: '.vtt', + hint: 'Extensions acceptés: .vtt' }, ], }, @@ -123,6 +127,7 @@ export const audioForm: Form = { value: '', placeholder: 'Ajouter une transcription', accept: '.txt,.vtt', + hint: 'Extensions acceptés: .vtt, .txt <br>Pour les utilisateurs qui ne souhaitent pas ou ne sont pas en capacité écouter la piste audio' }, { id: 'poster', @@ -131,6 +136,7 @@ export const audioForm: Form = { value: '', placeholder: 'Ajouter une vignette', accept: '.png,.jpg,.jpeg,.gif,.bmp,.svg,.webp', + hint: 'Format recommandé: 16:9 (720x480)' }, { id: 'subtitles', @@ -139,6 +145,7 @@ export const audioForm: Form = { value: '', placeholder: 'Ajouter des sous-titres', accept: '.vtt', + hint: 'Extensions acceptés: .vtt' }, ], }, diff --git a/src/shared/data/forms/nodeForm.data.ts b/src/shared/data/forms/nodeForm.data.ts index f4c1bb5c4869b51648c9ddbe52bca5c812ed00bc..5a8920e7cde5f5c3b4f61f0d2eec4ccea758fbc3 100644 --- a/src/shared/data/forms/nodeForm.data.ts +++ b/src/shared/data/forms/nodeForm.data.ts @@ -115,7 +115,7 @@ export const chapterForm: Form = { ], }, { - name: 'Objectifs', + name: 'Objectifs pédagogiques', inputs: [ { id: 'objectives', @@ -159,6 +159,7 @@ export const epocForm: Form = { placeholder: 'Ajouter une image de couverture', value: '', accept: '.png,.jpg,.jpeg,.gif,.bmp,.svg,.webp', + hint: 'Format recommandé : carré (180x180)<br> Image visible dans la liste des ePocs', }, { id: 'teaser', @@ -167,6 +168,7 @@ export const epocForm: Form = { value: '', placeholder: 'Ajouter un teaser', accept: '.mp4', + hint: 'Format recommandé : 16:9 (720x480) <br> Vidéo visible dans la page de présentation de l\'ePoc' }, { id: 'thumbnail', @@ -175,6 +177,7 @@ export const epocForm: Form = { value: '', placeholder: 'Ajouter une vignette', accept: '.png,.jpg,.jpeg,.gif,.bmp,.svg,.webp', + hint: 'Format recommandé : idem que la vidéo <br> Image visible dans la page de présentation de l\'ePoc' }, { id: 'summary', @@ -214,6 +217,7 @@ export const epocForm: Form = { placeholder: 'Ajouter une image', value: '', accept: '.png,.jpg,.jpeg,.gif,.bmp,.svg,.webp', + hint: 'Format recommandé : carré (100x100)<br> Image visible dans la page de présentation de l\'ePoc', }, { id: 'title', @@ -221,6 +225,7 @@ export const epocForm: Form = { label: 'Titre', placeholder: "Chercheuse à l'Inria", value: '', + hint: 'Titre ou fonction affichée sous le nom de l\'auteur', }, { id: 'description', @@ -234,7 +239,7 @@ export const epocForm: Form = { ], }, { - name: 'Objectifs', + name: 'Objectifs pédagogiques', inputs: [ { id: 'objectives', @@ -267,18 +272,19 @@ export const epocForm: Form = { { name: 'Paramètres :', inputs: [ - { - id: 'certificateScore', - type: 'score', - label: "Score pour obtenir l'attestation", - value: 10, - }, { id: 'certificateBadgeCount', type: 'score', label: "Nombre de badge pour obtenir l'attestation", value: 1, }, + { + id: 'certificateScore', + type: 'score', + label: "Score pour obtenir l'attestation", + value: 10, + hint: 'N\'est pas pris en compte si le nombre de badge pour obtenir l\'attestation est supérieur à 0', + }, { id: 'chapterParameter', type: 'text', @@ -341,6 +347,7 @@ export const epocForm: Form = { label: 'Nom', placeholder: 'CC-BY 4.0', value: '', + hint: 'Nom de la licence de votre contenu ePoc' }, { id: 'licenceUrl', @@ -348,6 +355,7 @@ export const epocForm: Form = { label: 'URL', placeholder: 'https://creativecommons.org/licenses/by/4.0/deed', value: '', + hint: 'Texte complet de la licence choisie' }, ], }, @@ -387,6 +395,7 @@ export const pageForm: Form = { type: 'checkbox', label: "Ne s'affiche qu'a certaines conditions", value: false, + hint: 'Option utilisé pour l\'affichage conditionnel' }, ], }, @@ -446,6 +455,7 @@ export const activityForm: Form = { type: 'checkbox', label: "Ne s'affiche qu'a certaines conditions", value: false, + hint: 'Option utilisé pour l\'affichage conditionnel' }, ], },