Addshore has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344203 )

Change subject: Add an edit summary box to the import page
......................................................................

Add an edit summary box to the import page

This box currently does nothing.
It will be used once changes can be made to the import.

Bug: T160184
Bug: T161010
Change-Id: Ia47504fdcd18a4c46d0d9bab085180ef8caa41eb
---
M i18n/en.json
M i18n/qqq.json
M modules/ext.FileImporter.Special.css
M src/Html/ImportPreviewPage.php
M src/MediaWiki/ApiDetailRetriever.php
5 files changed, 38 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FileImporter 
refs/changes/03/344203/1

diff --git a/i18n/en.json b/i18n/en.json
index a3ae9f2..bf3970d 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -16,6 +16,8 @@
        "fileimporter-submit": "Submit",
        "fileimporter-import": "Import",
        "fileimporter-cancel": "Cancel",
+       "fileimporter-editsummary": "Edit summary:",
+       "fileimporter-editsummary-placeholder": "Only used if you make changes 
to the import.",
        "fileimporter-previewnote": "This is a preview of the file to be 
imported. Please check the page in detail before importing.",
        "fileimporter-heading-fileinfo": "File info",
        "fileimporter-heading-filehistory": "File history"
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 7953783..db262ed 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -17,6 +17,8 @@
        "fileimporter-submit": "Text for the submit button on the special 
page.\n{{Identical|Submit}}",
        "fileimporter-import": "Text for the import button on the special 
page.\n{{Identical|Import}}",
        "fileimporter-cancel": "Text for the cancel button on the special 
page.",
+       "fileimporter-editsummary": "Label for the edit summary input box.",
+       "fileimporter-editsummary-placeholder": "Placeholder for the edit 
summary input box.",
        "fileimporter-previewnote": "Note shown at the top of the import page.",
        "fileimporter-heading-fileinfo": "Heading of the file info on the 
import page.",
        "fileimporter-heading-filehistory": "Heading of the file history on the 
import page."
diff --git a/modules/ext.FileImporter.Special.css 
b/modules/ext.FileImporter.Special.css
index 4afc1f5..514c210 100644
--- a/modules/ext.FileImporter.Special.css
+++ b/modules/ext.FileImporter.Special.css
@@ -1,3 +1,13 @@
-.mw-importurl-url-text {
-    margin-bottom: 1em;
+.mw-fileimporter-url-text {
+    margin-bottom: 14px;
+}
+
+.mw-importfile-import-summary {
+    margin-bottom: 14px;
+}
+
+.mw-importfile-importOptions {
+    background-color: #f8f9fa;
+    border: 1px solid #c8ccd1;
+    padding: 1em 1em 1.5em 1em;
 }
\ No newline at end of file
diff --git a/src/Html/ImportPreviewPage.php b/src/Html/ImportPreviewPage.php
index e679dcf..238547c 100644
--- a/src/Html/ImportPreviewPage.php
+++ b/src/Html/ImportPreviewPage.php
@@ -7,6 +7,7 @@
 use Linker;
 use Message;
 use OOUI\ButtonInputWidget;
+use OOUI\TextInputWidget;
 use SpecialPage;
 
 /**
@@ -78,10 +79,25 @@
                        ) )->parse()
                ) .
                Html::openElement(
+                       'div',
+                       [ 'class' => 'mw-importfile-importOptions' ]
+               ) .
+               Html::openElement(
                        'form',
                        [
                                'action' => 
$this->specialPage->getPageTitle()->getLocalURL(),
                                'method' => 'POST',
+                       ]
+               ) .
+               Html::element(
+                       'p',
+                       [],
+                       ( new Message( 'fileimporter-editsummary' ) )->plain()
+               ) .
+               new TextInputWidget(
+                       [
+                               'classes' => [ 'mw-importfile-import-summary' ],
+                               'placeholder' => ( new Message( 
'fileimporter-editsummary-placeholder' ) )->plain(),
                        ]
                ) .
                Html::element(
@@ -124,7 +140,10 @@
                                'flags' => [ 'progressive' ],
                        ]
                ) .
-               Html::closeElement( 'form' );
+               Html::closeElement( 'form' ) .
+               Html::closeElement(
+                       'div'
+               );
        }
 
 }
diff --git a/src/MediaWiki/ApiDetailRetriever.php 
b/src/MediaWiki/ApiDetailRetriever.php
index 13706bc..d32798b 100644
--- a/src/MediaWiki/ApiDetailRetriever.php
+++ b/src/MediaWiki/ApiDetailRetriever.php
@@ -215,7 +215,8 @@
                        'titles' => $this->getTitleFromTargetUrl( $targetUrl ),
                        'iilimit' => '500',
                        'rvlimit' => '500',
-                       'iiurlwidth' => '500',
+                       'iiurlwidth' => '800',
+                       'iiurlheight' => '400',
                        'iiprop' => implode(
                                '|',
                                [

-- 
To view, visit https://gerrit.wikimedia.org/r/344203
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia47504fdcd18a4c46d0d9bab085180ef8caa41eb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FileImporter
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to