- MLPluginField wraps PluginField in the MLField locale switcher; the
element gets the active content locale and that locale's string
- isMLField treats a translatable plugin field as a locale map in the form
state, FormView adopt and the relation child modal
- summer-upload posts the file with the admin session to the field upload
route and answers summer-upload-result {id, url} or {id, error}
- noticeLines shows meta.notices under each field as a warning status line
(text only) and in the saved toast; the stored value is reloaded
- docs/backend/field-types.md documents the full element contract;
modules/boardwalk/dist rebuilt
23 lines
743 B
Vue
23 lines
743 B
Vue
<script setup lang="ts">
|
|
// A translatable plugin field type (D-14): MLField around PluginField. The
|
|
// element edits the active content locale's string and receives that locale
|
|
// in its locale attribute; the form value is the locale -> string map.
|
|
import type { FieldControlProps } from '../control'
|
|
import MLField from './MLField.vue'
|
|
import PluginField from './PluginField.vue'
|
|
|
|
const props = defineProps<FieldControlProps>()
|
|
const emit = defineEmits<{ 'update:modelValue': [value: Record<string, string>] }>()
|
|
</script>
|
|
|
|
<template>
|
|
<MLField
|
|
v-bind="props"
|
|
:inner="PluginField"
|
|
:inner-type="field.type"
|
|
:ml-type="field.type"
|
|
content-locale
|
|
@update:model-value="emit('update:modelValue', $event)"
|
|
/>
|
|
</template>
|