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

View File

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

View File

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