Merge pull request #50602 from nextcloud/fix/template-field-title

fix: template field title
This commit is contained in:
Elizabeth Danzberger 2025-02-13 04:03:19 -05:00 committed by GitHub
commit 6e1d9a2620
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/4341-4341.js vendored Normal file

File diff suppressed because one or more lines are too long

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

File diff suppressed because one or more lines are too long

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

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

2
dist/465-465.js vendored

File diff suppressed because one or more lines are too long

1
dist/465-465.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
465-465.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