fix grouping of RadioGroup with meaningful title (#13838)

* fix grouping of RadioGroup with meaninful title

* apply fix from Phil
This commit is contained in:
Alexandre Alves 2025-04-02 09:05:49 +01:00 committed by GitHub
parent 4421b7332f
commit be068fade4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 36 additions and 26 deletions

View File

@ -199,33 +199,35 @@ export default defineComponent({
</script> </script>
<template> <template>
<div> <fieldset>
<!-- Label --> <!-- Label -->
<div <div
v-if="label || labelKey || tooltip || tooltipKey || $slots.label" v-if="label || labelKey || tooltip || tooltipKey || $slots.label"
class="radio-group label" class="radio-group label"
> >
<slot name="label"> <legend>
<h3> <slot name="label">
<t <h3>
v-if="labelKey" <t
:k="labelKey" v-if="labelKey"
/> :k="labelKey"
<template v-else-if="label"> />
{{ label }} <template v-else-if="label">
</template> {{ label }}
<i </template>
v-if="tooltipKey" <i
v-clean-tooltip="t(tooltipKey)" v-if="tooltipKey"
class="icon icon-info icon-lg" v-clean-tooltip="t(tooltipKey)"
/> class="icon icon-info icon-lg"
<i />
v-else-if="tooltip" <i
v-clean-tooltip="tooltip" v-else-if="tooltip"
class="icon icon-info icon-lg" v-clean-tooltip="tooltip"
/> class="icon icon-info icon-lg"
</h3> />
</slot> </h3>
</slot>
</legend>
</div> </div>
<!-- Group --> <!-- Group -->
@ -266,7 +268,7 @@ export default defineComponent({
</slot> </slot>
</div> </div>
</div> </div>
</div> </fieldset>
</template> </template>
<style lang='scss'> <style lang='scss'>

View File

@ -144,3 +144,9 @@ HR.vertical {
.force-wrap { @include force-wrap } .force-wrap { @include force-wrap }
.bordered-section { @include bordered-section } .bordered-section { @include bordered-section }
.section-divider { @include section-divider } .section-divider { @include section-divider }
fieldset {
border: 0;
padding: 0;
margin-inline: 0;
}

View File

@ -103,9 +103,6 @@ export default {
<template> <template>
<div> <div>
<p class="set-landing-leadin">
{{ t('landing.landingPrefs.body') }}
</p>
<RadioGroup <RadioGroup
id="login-route" id="login-route"
:value="afterLoginRoute" :value="afterLoginRoute"
@ -113,6 +110,11 @@ export default {
:options="routeRadioOptions" :options="routeRadioOptions"
@update:value="updateLoginRoute" @update:value="updateLoginRoute"
> >
<template #label>
<p class="set-landing-leadin">
{{ t('landing.landingPrefs.body') }}
</p>
</template>
<template #2="{option}"> <template #2="{option}">
<div class="custom-page"> <div class="custom-page">
<RadioButton <RadioButton