Skip to content
Snippets Groups Projects
Commit d40e6154 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

fixes #3727

Closes #3727

Merge request studip/studip!2613
parent 94960f72
No related branches found
No related tags found
No related merge requests found
......@@ -591,10 +591,10 @@ class Admin_PluginController extends AuthenticatedController
'manifest_info_en' => [
'label' => sprintf(_('Standardbeschreibung des Plugins (%s)'), _('Englisch')),
'type' => 'info',
'value' => $this->metadata['descriptionlong_en'] ?? $this->metadata['description_en'],
'value' => $this->metadata['descriptionlong_en'] ?? $this->metadata['description_en'] ?? null,
'if' => "STUDIPFORM_SELECTEDLANGUAGES.description === 'en_GB'"
],
'decription_mode' => [
'description_mode' => [
'label' => _('Modus der neuen Beschreibung'),
'type' => 'select',
'options' => [
......
......@@ -16,7 +16,11 @@ class I18n_textInput extends Input
$value = $this->value;
} else {
$value = [\I18NString::getDefaultLanguage() => $this->value->original()];
$value = json_encode(array_merge($value, $this->value->toArray()));
$value = array_merge($value, $this->value->toArray());
$value = array_map(function ($item) {
return $item ?? '';
}, $value);
$value = json_encode($value);
}
$template = $GLOBALS['template_factory']->open('forms/i18n_text_input');
$template->title = $this->title;
......
......@@ -15,8 +15,12 @@ class I18n_textareaInput extends Input
if (!is_object($this->value)) {
$value = $this->value;
} else {
$value = [\I18NString::getDefaultLanguage() => $this->value->original()];
$value = json_encode(array_merge($value, $this->value->toArray()));
$value = [\I18NString::getDefaultLanguage() => $this->value->original() ?? ''];
$value = array_merge($value, $this->value->toArray());
$value = array_map(function ($item) {
return $item ?? '';
}, $value);
$value = json_encode($value);
}
$template = $GLOBALS['template_factory']->open('forms/i18n_textarea_input');
$template->title = $this->title;
......
......@@ -258,6 +258,7 @@ STUDIP.ready(function () {
params.STUDIPFORM_VALIDATED = false;
params.STUDIPFORM_REDIRECTURL = f.dataset.url;
params.STUDIPFORM_INPUTS_ORDER = [];
params.STUDIPFORM_SELECTEDLANGUAGES = {};
for (let i in JSON.parse(f.dataset.inputs)) {
params.STUDIPFORM_INPUTS_ORDER.push(i);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment