X-Git-Url: https://git.heureux-cyclage.org/index.php?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki%2Fmediawiki.ForeignStructuredUpload.BookletLayout.js;h=7a1fa7f2997d8650aa4f2c558f10372586129390;hb=82bc8020b10d4ab2b9335c6cfb431f32e6fc616c;hp=543ece881d8508276f86c1c5b81206c609eee35d;hpb=93222688610be9735eb53aef30683e1c231b2833;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js index 543ece881d..7a1fa7f299 100644 --- a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js +++ b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js @@ -46,11 +46,11 @@ return mw.ForeignStructuredUpload.BookletLayout.parent.prototype.initialize.call( this ).then( function () { return $.when( - // Point the CategorySelector to the right wiki + // Point the CategoryMultiselectWidget to the right wiki booklet.upload.getApi().then( function ( api ) { // If this is a ForeignApi, it will have a apiUrl, otherwise we don't need to do anything if ( api.apiUrl ) { - // Can't reuse the same object, CategorySelector calls #abort on its mw.Api instance + // Can't reuse the same object, CategoryMultiselectWidget calls #abort on its mw.Api instance booklet.categoriesWidget.api = new mw.ForeignApi( api.apiUrl ); } return $.Deferred().resolve(); @@ -128,7 +128,14 @@ * @return {mw.Upload} */ mw.ForeignStructuredUpload.BookletLayout.prototype.createUpload = function () { - return new mw.ForeignStructuredUpload( this.target ); + return new mw.ForeignStructuredUpload( this.target, { + parameters: { + errorformat: 'html', + errorlang: mw.config.get( 'wgUserLanguage' ), + errorsuselocal: 1, + formatversion: 2 + } + } ); }; /* Form renderers */ @@ -229,13 +236,12 @@ required: true, validate: /.+/ } ); - this.descriptionWidget = new OO.ui.TextInputWidget( { + this.descriptionWidget = new OO.ui.MultilineTextInputWidget( { required: true, validate: /\S+/, - multiline: true, autosize: true } ); - this.categoriesWidget = new mw.widgets.CategorySelector( { + this.categoriesWidget = new mw.widgets.CategoryMultiselectWidget( { // Can't be done here because we don't know the target wiki yet... done in #initialize. // api: new mw.ForeignApi( ... ), $overlay: this.$overlay