Issue #3127838 by Lendude: In MediaLibrary the 'save and insert' is nested in code when it doesn't have to be

merge-requests/2419/head
catch 2020-04-20 15:10:43 +01:00
parent f08be334ae
commit f89fcba55b
1 changed files with 5 additions and 7 deletions

View File

@ -472,13 +472,11 @@ abstract class AddFormBase extends FormBase implements BaseFormIdInterface, Trus
if ($this->isAdvancedUi()) {
$actions['save_select']['#value'] = $this->t('Save and select');
$actions['save_insert'] = [
'save_insert' => [
'#type' => 'submit',
'#value' => $this->t('Save and insert'),
'#ajax' => [
'callback' => '::updateWidget',
'wrapper' => 'media-library-add-form-wrapper',
],
'#type' => 'submit',
'#value' => $this->t('Save and insert'),
'#ajax' => [
'callback' => '::updateWidget',
'wrapper' => 'media-library-add-form-wrapper',
],
];
}