Add a link below the licenses selector to edit those license options (if allowed to),
similar to links on the block, delete and protect forms.
Change-Id: Iff11d114cb1bfbc2c17de44369c482cee846ed9d
wfRunHooks( 'UploadFormInitDescriptor', array( &$descriptor ) );
parent::__construct( $descriptor, $context, 'upload' );
+ # Add a link to edit MediaWik:Licenses
+ if ( $this->getUser()->isAllowed( 'editinterface' ) ) {
+ $licensesLink = Linker::link(
+ Title::makeTitle( NS_MEDIAWIKI, 'Licenses' ),
+ $this->msg( 'licenses-edit' )->escaped(),
+ array(),
+ array( 'action' => 'edit' )
+ );
+ $editLicenses = '<p class="mw-upload-editlicenses">' . $licensesLink . '</p>';
+ $this->addFooterText( $editLicenses, 'description' );
+ }
+
# Set some form properties
$this->setSubmitText( $this->msg( 'uploadbtn' )->text() );
$this->setSubmitName( 'wpUpload' );
"license-header": "Licensing",
"nolicense": "None selected",
"licenses": "-",
+ "licenses-edit": "Edit license options",
"license-nopreview": "(Preview not available)",
"upload_source_url": "(a valid, publicly accessible URL)",
"upload_source_file": "(a file on your computer)",
"license-header": "Used as section header in [[Special:Upload]].\n\nSee also:\n* {{msg-mw|Filedesc}}\n* {{msg-mw|Filestatus}}\n* {{msg-mw|Filesource}}\n{{Identical|Licensing}}",
"nolicense": "{{Identical|None selected}}",
"licenses": "{{notranslate}}",
+ "licenses-edit": "Label text for a link on Special:Upload to edit MediaWiki:Licenses",
"license-nopreview": "Error message when a certain license does not exist",
"upload_source_url": "Used in [[Special:Upload]].\n\nSee also:\n* {{msg-mw|Sourcefilename|label}}\n* {{msg-mw|Sourceurl|label}}\n* {{msg-mw|Upload source file}}\n* {{msg-mw|Upload-maxfilesize}}",
"upload_source_file": "Used in [[Special:Upload]].\n\nSee also:\n* {{msg-mw|Sourcefilename|label}}\n* {{msg-mw|Sourceurl|label}}\n* {{msg-mw|Upload source url}}\n* {{msg-mw|Upload-maxfilesize}}",
display: none;
}
-/* Convenience links to edit block, delete and protect reasons */
+/**
+ * Convenience links to edit block, delete and protect reasons
+ * and upload licenses
+ */
p.mw-ipb-conveniencelinks,
p.mw-protect-editreasons,
p.mw-filedelete-editreasons,
p.mw-delete-editreasons,
-p.mw-revdel-editreasons {
+p.mw-revdel-editreasons,
+p.mw-upload-editlicenses {
font-size: 90%;
text-align: right;
}