|
|
@ -538,8 +538,8 @@ useEventListener( |
|
|
|
|
|
|
|
|
|
|
|
<div v-if="formViewData.submit_another_form || !isPublic" class="text-center mt-4"> |
|
|
|
<div v-if="formViewData.submit_another_form || !isPublic" class="text-center mt-4"> |
|
|
|
<NcButton type="primary" size="medium" @click="submitted = false"> |
|
|
|
<NcButton type="primary" size="medium" @click="submitted = false"> |
|
|
|
{{ $t('activity.submitAnotherForm') }}</NcButton |
|
|
|
{{ $t('activity.submitAnotherForm') }} |
|
|
|
> |
|
|
|
</NcButton> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -723,10 +723,10 @@ useEventListener( |
|
|
|
<span data-testid="nc-form-input-label"> |
|
|
|
<span data-testid="nc-form-input-label"> |
|
|
|
{{ element.label || element.title }} |
|
|
|
{{ element.label || element.title }} |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<span v-if="element.required" class="text-red-500"> *</span> |
|
|
|
<span v-if="isRequired(element, element.required)" class="text-red-500"> *</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="nc-form-help-text text-gray-500 text-[13px] leading-5 mt-2" data-testid="nc-form-help-text"> |
|
|
|
<div class="nc-form-help-text text-gray-500 text-sm mt-2" data-testid="nc-form-help-text"> |
|
|
|
{{ element.description }} |
|
|
|
{{ element.description }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -747,7 +747,7 @@ useEventListener( |
|
|
|
{{ element.label || element.title }} |
|
|
|
{{ element.label || element.title }} |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</NcTooltip> |
|
|
|
</NcTooltip> |
|
|
|
<span v-if="element.required" class="text-red-500"> *</span> |
|
|
|
<span v-if="isRequired(element, element.required)" class="text-red-500"> *</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<a-form-item class="my-0 !mb-2"> |
|
|
|
<a-form-item class="my-0 !mb-2"> |
|
|
|
<div class="flex gap-2 items-center"> |
|
|
|
<div class="flex gap-2 items-center"> |
|
|
@ -798,7 +798,7 @@ useEventListener( |
|
|
|
:rows="1" |
|
|
|
:rows="1" |
|
|
|
auto-size |
|
|
|
auto-size |
|
|
|
hide-details |
|
|
|
hide-details |
|
|
|
class="form-meta-input text-sm nc-form-input-help-text" |
|
|
|
class="form-meta-input nc-form-input-help-text" |
|
|
|
data-testid="nc-form-input-help-text" |
|
|
|
data-testid="nc-form-input-help-text" |
|
|
|
:placeholder="$t('msg.info.formHelpText')" |
|
|
|
:placeholder="$t('msg.info.formHelpText')" |
|
|
|
@keydown.enter.prevent |
|
|
|
@keydown.enter.prevent |
|
|
@ -838,7 +838,7 @@ useEventListener( |
|
|
|
:rules="[ |
|
|
|
:rules="[ |
|
|
|
{ |
|
|
|
{ |
|
|
|
required: isRequired(element, element.required), |
|
|
|
required: isRequired(element, element.required), |
|
|
|
message: `${element.label || element.title} is required`, |
|
|
|
message: `${$t('msg.error.fieldRequired', { value: 'This Field' })}`, |
|
|
|
}, |
|
|
|
}, |
|
|
|
]" |
|
|
|
]" |
|
|
|
> |
|
|
|
> |
|
|
@ -886,8 +886,8 @@ useEventListener( |
|
|
|
<div class="flex items-start gap-3 px-3 py-2 border-1 border-gray-200 rounded-lg"> |
|
|
|
<div class="flex items-start gap-3 px-3 py-2 border-1 border-gray-200 rounded-lg"> |
|
|
|
<a-switch v-e="['a:form-view:field:show-on-condition']" size="small" /> |
|
|
|
<a-switch v-e="['a:form-view:field:show-on-condition']" size="small" /> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<div class="font-medium text-gray-800">Show on condtions</div> |
|
|
|
<div class="font-medium text-gray-800">{{ $t('labels.showOnConditions') }}</div> |
|
|
|
<div class="text-gray-500">Shows field only when conditions are met</div> |
|
|
|
<div class="text-gray-500">{{ $t('labels.showFieldOnConditionsMet') }}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -896,10 +896,10 @@ useEventListener( |
|
|
|
|
|
|
|
|
|
|
|
<template #footer> |
|
|
|
<template #footer> |
|
|
|
<div |
|
|
|
<div |
|
|
|
v-if="!visibleColumns.length" |
|
|
|
v-if="!visibleColumns.length && isEditable" |
|
|
|
class="mt-4 border-dashed border-2 border-gray-400 py-3 text-gray-400 text-center" |
|
|
|
class="mt-4 border-dashed border-2 border-gray-400 py-3 text-gray-400 text-center" |
|
|
|
> |
|
|
|
> |
|
|
|
Select fields from right panel to add here |
|
|
|
{{ $t('title.selectFieldsFromRightPannelToAddHere') }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</Draggable> |
|
|
|
</Draggable> |
|
|
@ -914,7 +914,7 @@ useEventListener( |
|
|
|
data-title="nc-form-clear" |
|
|
|
data-title="nc-form-clear" |
|
|
|
@click="clearForm" |
|
|
|
@click="clearForm" |
|
|
|
> |
|
|
|
> |
|
|
|
Crear Form |
|
|
|
{{ $t('activity.clearForm') }} |
|
|
|
</NcButton> |
|
|
|
</NcButton> |
|
|
|
<NcButton |
|
|
|
<NcButton |
|
|
|
html-type="submit" |
|
|
|
html-type="submit" |
|
|
@ -947,11 +947,10 @@ useEventListener( |
|
|
|
<div class="flex flex-wrap justify-between items-center gap-2"> |
|
|
|
<div class="flex flex-wrap justify-between items-center gap-2"> |
|
|
|
<div class="flex gap-3"> |
|
|
|
<div class="flex gap-3"> |
|
|
|
<div class="text-base font-bold text-gray-900"> |
|
|
|
<div class="text-base font-bold text-gray-900"> |
|
|
|
<!-- {{ $t('objects.fields') }} --> |
|
|
|
{{ $t('objects.viewType.form') }} {{ $t('objects.fields') }} |
|
|
|
Form Fields |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<NcBadge color="border-gray-200" class=""> |
|
|
|
<NcBadge color="border-gray-200"> |
|
|
|
{{ visibleColumns.length }}/{{ localColumns.length }} Field |
|
|
|
{{ visibleColumns.length }}/{{ localColumns.length }} {{ $t('objects.field') }} |
|
|
|
</NcBadge> |
|
|
|
</NcBadge> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
@ -960,7 +959,6 @@ useEventListener( |
|
|
|
:trigger="['click']" |
|
|
|
:trigger="['click']" |
|
|
|
overlay-class-name="nc-dropdown-form-add-column" |
|
|
|
overlay-class-name="nc-dropdown-form-add-column" |
|
|
|
> |
|
|
|
> |
|
|
|
<!-- v-if="localColumns.length" --> |
|
|
|
|
|
|
|
<NcButton |
|
|
|
<NcButton |
|
|
|
type="secondary" |
|
|
|
type="secondary" |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
@ -970,7 +968,7 @@ useEventListener( |
|
|
|
> |
|
|
|
> |
|
|
|
<div class="flex gap-2 items-center"> |
|
|
|
<div class="flex gap-2 items-center"> |
|
|
|
<component :is="iconMap.plus" class="w-4 h-4" /> |
|
|
|
<component :is="iconMap.plus" class="w-4 h-4" /> |
|
|
|
<span> Add Field </span> |
|
|
|
<span> {{ $t('activity.addFieldFromFormView') }} </span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</NcButton> |
|
|
|
</NcButton> |
|
|
|
|
|
|
|
|
|
|
@ -1020,7 +1018,7 @@ useEventListener( |
|
|
|
> |
|
|
|
> |
|
|
|
<div class="w-4 h-4 flex-none mr-2"></div> |
|
|
|
<div class="w-4 h-4 flex-none mr-2"></div> |
|
|
|
<div class="flex-1 flex flex-row items-center truncate cursor-pointer"> |
|
|
|
<div class="flex-1 flex flex-row items-center truncate cursor-pointer"> |
|
|
|
<div class="flex-1 font-base">Select all fields</div> |
|
|
|
<div class="flex-1 font-base">{{ $t('activity.selectAllFields') }}</div> |
|
|
|
<NcSwitch :checked="visibleColumns.length === localColumns.length" @change="handleAddOrRemoveAllColumns" /> |
|
|
|
<NcSwitch :checked="visibleColumns.length === localColumns.length" @change="handleAddOrRemoveAllColumns" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -1057,7 +1055,7 @@ useEventListener( |
|
|
|
{{ field.label || field.title }} |
|
|
|
{{ field.label || field.title }} |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</NcTooltip> |
|
|
|
</NcTooltip> |
|
|
|
<span v-if="field.required" class="text-red-500"> *</span> |
|
|
|
<span v-if="isRequired(field, field.required)" class="text-red-500"> *</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<NcSwitch :checked="!!field.show" :disabled="field.required" /> |
|
|
|
<NcSwitch :checked="!!field.show" :disabled="field.required" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -1083,10 +1081,10 @@ useEventListener( |
|
|
|
> |
|
|
|
> |
|
|
|
<div class="p-4 flex flex-col space-y-4 border-b border-gray-200"> |
|
|
|
<div class="p-4 flex flex-col space-y-4 border-b border-gray-200"> |
|
|
|
<!-- Appearance Settings --> |
|
|
|
<!-- Appearance Settings --> |
|
|
|
<div class="text-base font-bold text-gray-900">Appearance Settings</div> |
|
|
|
<div class="text-base font-bold text-gray-900">{{ $t('labels.appearanceSettings') }}</div> |
|
|
|
|
|
|
|
|
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<div class="text-gray-800">Background Color</div> |
|
|
|
<div class="text-gray-800">{{ $t('labels.backgroundColor') }}</div> |
|
|
|
<div class="flex justify-start"> |
|
|
|
<div class="flex justify-start"> |
|
|
|
<LazyGeneralColorPicker |
|
|
|
<LazyGeneralColorPicker |
|
|
|
:model-value="(formViewData.meta as Record<string,any>).background_color" |
|
|
|
:model-value="(formViewData.meta as Record<string,any>).background_color" |
|
|
@ -1136,22 +1134,21 @@ useEventListener( |
|
|
|
" |
|
|
|
" |
|
|
|
/> |
|
|
|
/> |
|
|
|
<a-switch v-else :checked="false" size="small" :disabled="true" /> |
|
|
|
<a-switch v-else :checked="false" size="small" :disabled="true" /> |
|
|
|
<span class="ml-4">Hide NocoDB Branding</span> |
|
|
|
<span class="ml-4">{{ $t('labels.hideNocodbBranding') }}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="p-4 flex flex-col space-y-4"> |
|
|
|
<div class="p-4 flex flex-col space-y-4"> |
|
|
|
<!-- Post Form Submission Settings --> |
|
|
|
<!-- Post Form Submission Settings --> |
|
|
|
<div class="text-base font-bold text-gray-900"> |
|
|
|
<div class="text-base font-bold text-gray-900"> |
|
|
|
Post Form Submission Settings |
|
|
|
{{ $t('msg.info.postFormSubmissionSettings') }} |
|
|
|
<!-- {{ $t('msg.info.afterFormSubmitted') }} --> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- Show this message --> |
|
|
|
<!-- Show this message --> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<div class="text-gray-800 mb-2"> |
|
|
|
<div class="text-gray-800 mb-2"> |
|
|
|
Display Message |
|
|
|
Display Message |
|
|
|
<!-- {{ $t('msg.info.showMessage') }} --> |
|
|
|
<!-- {{ $t('msg.info.formDisplayMessage') }} --> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<a-textarea |
|
|
|
<a-textarea |
|
|
|
v-model:value="formViewData.success_msg" |
|
|
|
v-model:value="formViewData.success_msg" |
|
|
@ -1240,10 +1237,18 @@ useEventListener( |
|
|
|
} |
|
|
|
} |
|
|
|
&:not(.nc-cell-longtext) { |
|
|
|
&:not(.nc-cell-longtext) { |
|
|
|
@apply px-2 py-2; |
|
|
|
@apply px-2 py-2; |
|
|
|
} |
|
|
|
|
|
|
|
:deep(textarea) { |
|
|
|
:deep(textarea) { |
|
|
|
@apply !p-2; |
|
|
|
@apply !p-2; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
&.nc-cell-json { |
|
|
|
|
|
|
|
@apply h-auto; |
|
|
|
|
|
|
|
& > div { |
|
|
|
|
|
|
|
@apply w-full; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.form-meta-input { |
|
|
|
.form-meta-input { |
|
|
@ -1264,6 +1269,9 @@ useEventListener( |
|
|
|
.nc-input-required-error { |
|
|
|
.nc-input-required-error { |
|
|
|
max-width: 100%; |
|
|
|
max-width: 100%; |
|
|
|
white-space: pre-line; |
|
|
|
white-space: pre-line; |
|
|
|
|
|
|
|
:deep(.ant-form-item-explain-error) { |
|
|
|
|
|
|
|
@apply mt-2; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.nc-cell-attachment) { |
|
|
|
:deep(.nc-cell-attachment) { |
|
|
|