Page MenuHomePhabricator

Provide a mechanism for site admins to hide the "This is my own work" checkbox for third party wikis which don't care
Open, LowestPublic

Assigned To
None
Authored By
Elitre
Jul 12 2016, 8:34 AM
Tokens
"Like" token, awarded by freephile."Baby Tequila" token, awarded by Urfiner."Like" token, awarded by Framillien."Like" token, awarded by Bryandamon."Like" token, awarded by Rcdeboer."Heartbreak" token, awarded by Joris."Like" token, awarded by Cuibonobo."Like" token, awarded by rakekniven.

Description

Planetenxin on mw.org says:

We use VisualEditor in corporate environments and users often complain about the "This is my own work" checkbox they have to tick before uploading. Is there a way to tick the checkbox by default or hide it at all?

I'd go as far as to ask an additional preference about this, but I know how James feels about it...

Event Timeline

Preferably, reuse or share a setting with the upload wizard perhaps ?

Even if there was such a setting, this code has no dependency on UploadWizard.

My point was, such an option should probably not be limited to one extension, as I think that this is something people want to configure just once.

"I'm an internal wiki, don't bother me with details like licenses etc"

Jdforrester-WMF renamed this task from Media upload: tick / hide "This is my own work" checkbox? to Provide a mechanism for site admins to hide the "This is my own work" checkbox for third party wikis which don't care.Jul 12 2016, 7:12 PM
Jdforrester-WMF triaged this task as Lowest priority.
Jdforrester-WMF edited projects, added Multimedia; removed VisualEditor.
Jdforrester-WMF updated the task description. (Show Details)
matmarex added a subscriber: matmarex.

The dialog is not UploadWizard, but it's not specific to VisualEditor either, it's used by both editors. See https://www.mediawiki.org/wiki/Upload_dialog.

I think this is a special case of T121012: Cross-wiki-upload: Allow users to specify source and specific license , where the license would be "no license at all". This is indeed currently not configurable, the best you can do is edit the MediaWiki: namespace messages to say something else.

Restricted Application added a subscriber: Steinsplitter. · View Herald Transcript

... it's not about the message itself, it is really the extra click that is not wanted in "internal wikis". So having an option to "bypass" this question would be great.

Have the same issue here. Want to get rid of the checkbox and extra click.

As an admin of a private wiki who has spend MANY hours translating word docs to wiki articles, I would just like to say that this referenced check box is the actual devil himself in text form, stealing away tiny slices of my life by the hundreds each day. If I didn't have actual work to do I'd track the devil down myself in the code but it would be nice to fix it for others too. Why is this 'Lowest' priority? I see the devil's minions at work.

yes, would be great if this could become a higher priority

Hello @Jdforrester-WMF please see demand and rethink priority.

The word “demand” has a harsh meaning where I come from. Let’s instead make a strong argument for the feature request with more voices. If others reading this are also stymied, please speak up.

I also don’t think Mr. Forrester can make this happen on his own. I believe his current role is removed from product decisions for both VE and UploadWizard. But I would hope we could ask him to use his influence to help the cause. :)

How do you suggest we add voices? Subscribed, but phabriactor has no +1 function.
I'm using MW for functional documentation in an enterpise setting. I'd rate this bug "papercut". but a papercut for every single editor I have. (And very inaccurate for enterprise; documentation need not be 'own work'.)

Tgr added a subscriber: Tgr.

Subscribed, but phabriactor has no +1 function.

People typically use the "Award token" option (and then add a heart or thumbs-up or something like that). Of course actually describing how (and how much) it affects you is more useful.

There's also the MediaWiki Stakeholders' Group for coordinating / prioritizing third-party requests.

rakekniven rescinded a token.
rakekniven awarded a token.

Agree with description, we are also using MediaWiki in corporate environments. Our users in this context doesn't understand this checkbox. So, if we had an option to remove/hide this option, it would be great.

Thanks.

This seems easy... Why hasn't anyone done this in the past three years?

On my corporate wiki it is a huge pain. If page containst 10-20 images, you have to do it again and again.. It frustrates to the point where some sub-teams switch to other products. Yes, it is not only about checkbox but about all the extra steps in general.

Usually all we need is to insert image as is and we don't care about it's naming much.

Below I provide 2 stupid patches to improve your life if you don't want to wait for an official fix.

patch1 - ignore 'own work' checkbox

Looks like if you want only to remove the 'own work' checkbox, you'll need to change core code.

https://doc.wikimedia.org/mediawiki-core/master/js/source/BookletLayout.html#mw-ForeignStructuredUpload-BookletLayout

I believe, necessity to check it should be passed via some parameter

From a01efa9559733979bd1e44af4d1da6530a0c712e Mon Sep 17 00:00:00 2001
From: Urfiner <urfiner@gmail.com>
Date: Wed, 24 Mar 2021 22:47:01 +0100
Subject: [PATCH] Skip own work check

---
 .../BookletLayout.js                                            | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/resources/src/mediawiki.ForeignStructuredUpload.BookletLayout/BookletLayout.js b/resources/src/mediawiki.ForeignStructuredUpload.BookletLayout/BookletLayout.js
index 4515aaa7..b1f1529f 100644
--- a/resources/src/mediawiki.ForeignStructuredUpload.BookletLayout/BookletLayout.js
+++ b/resources/src/mediawiki.ForeignStructuredUpload.BookletLayout/BookletLayout.js
@@ -221,7 +221,7 @@
 	mw.ForeignStructuredUpload.BookletLayout.prototype.onUploadFormChange = function () {
 		var file = this.selectFileWidget.getValue(),
 			ownWork = this.ownWorkCheckbox.isSelected(),
-			valid = !!file && ownWork;
+			valid = !!file; // && ownWork;
 		this.emit( 'uploadValid', valid );
 	};
 
-- 
2.18.1

patch2 - drag'n'drop as is

There is also another way if you only care about VisualEditor. Instead of removing license requirement you can just skips as much steps as possible in a stupid way.
Code is not suitable for commiting . It is just a general idea how that can be handled on private wikis which don't care about correct image metadata.

If some operation fails, dialog will stuck on the problematic step

Here I have imlpementation for drag and drop only. Additionally I change defaults for inserted images

If you need the same for other ways of image upload, it should be simple. I just hope that will save time for some other private wiki owners

From 7557692c96b63f3f30d985fe97de2855281305f6 Mon Sep 17 00:00:00 2001
From: Urfiner <urfiner@gmail.com>
Date: Wed, 24 Mar 2021 21:59:57 +0100
Subject: [PATCH] Fix VE for autoupload

---
 .../ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js   | 23 ++++++++++++++-----
 1 file changed, 17 insertions(+), 6 deletions(-)

diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
index 2b50b387c..b2c403756 100644
--- amodules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
+++ bmodules/ve-mw/ui/dialogs/ve.ui.MWMediaDialog.js
@@ -297,7 +297,7 @@ ve.ui.MWMediaDialog.prototype.initialize = function () {
 			data: 'none',
 			icon: 'imageLayoutBasic',
 			label: ve.msg( 'visualeditor-dialog-media-type-none' )
-		} )
+		} ),
 	] );
 	typeSelectField = new OO.ui.FieldLayout( this.typeSelectDropdown, {
 		align: 'top'
@@ -873,11 +873,11 @@ ve.ui.MWMediaDialog.prototype.confirmSelectedImage = function () {
 					href: './' + title,
 					src: info.url,
 					resource: './' + title,
-					width: info.thumbwidth,
-					height: info.thumbheight,
+					width: info.width,
+					height: info.theight,
 					mediaType: info.mediatype,
-					type: 'thumb',
-					align: 'default',
+					type: 'none',
+					align: 'none',
 					defaultSize: true
 				},
 				this.getFragment().getDocument()
@@ -1154,11 +1154,22 @@ ve.ui.MWMediaDialog.prototype.getSetupProcess = function ( data ) {
 				this.mediaUploadBooklet.initialize() :
 				ve.createDeferred().resolve().promise()
 			).then( function () {
-				dialog.actions.setAbilities( { upload: false, save: false, insert: false, done: false } );
+				dialog.actions.setAbilities( { upload: false, save: false, insert: false, done: false } );
 
 				if ( data.file ) {
 					dialog.searchTabs.setTabPanel( 'upload' );
 					dialog.mediaUploadBooklet.setFile( data.file );
+
+					$.when( dialog.getActionProcess( 'upload' ).execute() ).done(function (result) {
+						$.when( dialog.getActionProcess( 'save' ).execute() ).done(function (result) {
+							dialog.confirmSelectedImage();
+					        	$.when( dialog.getActionProcess( 'choose' ).execute() ).done(function (result) {
+								$.when( dialog.getActionProcess( 'insert' ).execute() ).done(function (result) {
+									// Everything is done
+								});
+							});
+						});
+					});
 				}
 			} );
 		}, this );
-- 
2.18.1

The last one looks like: