update Kirby

This commit is contained in:
isUnknown 2025-04-22 16:01:57 +02:00
parent ecd997c895
commit 1b05e91943
47 changed files with 963 additions and 307 deletions

View file

@ -242,12 +242,26 @@ return [
$fields['key']['disabled'] = true;
$fields['value']['autofocus'] = true;
// shows info text when variable is an array
// TODO: 5.0: use entries field instead showing info text
$isVariableArray = is_array($variable->value()) === true;
if ($isVariableArray === true) {
$fields['value'] = [
'label' => I18n::translate('info'),
'type' => 'info',
'text' => 'You are using an array variable for this key. Please modify it in the language file in /site/languages',
];
}
return [
'component' => 'k-form-dialog',
'props' => [
'fields' => $fields,
'size' => 'large',
'value' => [
'props' => [
'cancelButton' => $isVariableArray === false,
'fields' => $fields,
'size' => 'large',
'submitButton' => $isVariableArray === false,
'value' => [
'key' => $variable->key(),
'value' => $variable->value()
]