Fix showing caption and alt text fields in media and gallery dialogs

We were using addItems() incorrectly, and it stopped working after
change Ib1241f93d214e8a7d2f757a120f84de3879575af in OOUI.

Bug: T299818
Change-Id: I2d00cb929673a419789ca6f8bc308721373e1da8
This commit is contained in:
Bartosz Dziewoński 2022-01-22 03:27:22 +01:00
parent 43b2b3de95
commit 8bcb50b6a2
2 changed files with 4 additions and 4 deletions

View file

@ -248,7 +248,7 @@ ve.ui.MWGalleryDialog.prototype.initialize = function () {
highlightedCaptionFieldset = new OO.ui.FieldsetLayout( {
label: ve.msg( 'visualeditor-dialog-media-content-section' )
} );
highlightedCaptionFieldset.addItems( highlightedCaptionField );
highlightedCaptionFieldset.addItems( [ highlightedCaptionField ] );
highlightedAltTextField = new OO.ui.FieldLayout( this.highlightedAltTextInput, {
align: 'top'
@ -256,7 +256,7 @@ ve.ui.MWGalleryDialog.prototype.initialize = function () {
highlightedAltTextFieldset = new OO.ui.FieldsetLayout( {
label: ve.msg( 'visualeditor-dialog-media-alttext-section' )
} );
highlightedAltTextFieldset.addItems( highlightedAltTextField );
highlightedAltTextFieldset.addItems( [ highlightedAltTextField ] );
// Search panel
this.searchWidget = new mw.widgets.MediaSearchWidget( {

View file

@ -232,7 +232,7 @@ ve.ui.MWMediaDialog.prototype.initialize = function () {
help: ve.msg( 'visualeditor-dialog-media-content-section-help' ),
classes: [ 've-ui-mwMediaDialog-caption-fieldset' ]
} );
this.captionFieldset.addItems( captionField );
this.captionFieldset.addItems( [ captionField ] );
// Alt text
this.altTextInput = new OO.ui.TextInputWidget( {
@ -247,7 +247,7 @@ ve.ui.MWMediaDialog.prototype.initialize = function () {
label: ve.msg( 'visualeditor-dialog-media-alttext-section' ),
help: ve.msg( 'visualeditor-dialog-media-alttext-section-help' )
} );
altTextFieldset.addItems( altTextField );
altTextFieldset.addItems( [ altTextField ] );
// Advanced settings