Merge pull request #50789 from nextcloud/backport/50602/stable30

[stable30] fix: template field title
This commit is contained in:
John Molakvoæ 2025-02-13 11:07:04 +01:00 committed by GitHub
commit b99af3a570
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 20 additions and 12 deletions

View file

@ -4,13 +4,18 @@
-->
<template>
<NcModal>
<NcModal label-id="template-field-modal__label">
<div class="template-field-modal__content">
<form>
<h3>{{ t('files', 'Fill template fields') }}</h3>
<h3 id="template-field-modal__label">
{{ t('files', 'Fill template fields') }}
</h3>
<div v-for="field in fields" :key="field.index">
<component :is="getFieldComponent(field.type)" :field="field" @input="trackInput" />
<component :is="getFieldComponent(field.type)"
v-if="fieldHasLabel(field)"
:field="field"
@input="trackInput" />
</div>
</form>
</div>
@ -80,6 +85,9 @@ export default defineComponent({
return `Template${fieldComponentType}Field`
},
fieldHasLabel(field) {
return field.name || field.alias
},
async submit() {
this.loading = true

View file

@ -40,7 +40,7 @@ export default defineComponent({
computed: {
fieldLabel() {
const label = this.field.name ?? this.field.alias ?? 'Unknown field'
const label = this.field.name || this.field.alias
return label.charAt(0).toUpperCase() + label.slice(1)
},

View file

@ -45,7 +45,7 @@ export default defineComponent({
computed: {
fieldLabel() {
const label = this.field.name ?? this.field.alias ?? 'Unknown field'
const label = this.field.name || this.field.alias
return (label.charAt(0).toUpperCase() + label.slice(1))
},

2
dist/6326-6326.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/6326-6326.js.map vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/6326-6326.js.map.license vendored Symbolic link
View file

@ -0,0 +1 @@
6326-6326.js.license

2
dist/9918-9918.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
9918-9918.js.license

4
dist/files-init.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long