[MediaWiki-commits] [Gerrit] mediawiki...CodeReview[master]: Add user name autocompletion support to the "link SVN commit...

2017-11-20 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392487 )

Change subject: Add user name autocompletion support to the "link SVN committer 
to wiki user" page (Special:Code//author//link)
..


Add user name autocompletion support to the "link SVN committer to wiki user" 
page (Special:Code//author//link)

Change-Id: I543abc9bcf0ba9198c7caee4c4a9b1967e45c798
---
M ui/CodeRevisionAuthorLink.php
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Brian Wolff: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/ui/CodeRevisionAuthorLink.php b/ui/CodeRevisionAuthorLink.php
index 521fa92..ebe8e69 100644
--- a/ui/CodeRevisionAuthorLink.php
+++ b/ui/CodeRevisionAuthorLink.php
@@ -17,6 +17,7 @@
 
function execute() {
global $wgRequest, $wgUser;
+
if ( !$wgUser->isAllowed( 'codereview-link-user' ) ) {
throw new PermissionsError( 'codereview-link-user' );
}
@@ -30,6 +31,7 @@
 
function doForm() {
global $wgOut, $wgUser;
+
$form = Xml::openElement( 'form', [ 'method' => 'post',
'action' => $this->getTitle()->getLocalURL(),
'name' => 'uluser', 'id' => 'mw-codeauthor-form1' ] );
@@ -50,12 +52,13 @@
}
 
$form .= Xml::inputLabel( wfMessage( 'code-author-name' 
)->text(),
-   'linktouser', 'username', 30, '' ) . ' ' .
+   'linktouser', 'username', 30, '', [ 'class' => 
'mw-autocomplete-user' ] ) . ' ' .
Xml::submitButton( wfMessage( 'ok' )->text(), [ 
'name' => 'newname' ] ) .
Xml::closeElement( 'fieldset' ) .
$additional .
Xml::closeElement( 'form' ) . "\n";
 
+   $wgOut->addModules( 'mediawiki.userSuggest' );
$wgOut->addHTML( $this->linkStatus() . $form );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I543abc9bcf0ba9198c7caee4c4a9b1967e45c798
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeReview
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...CodeReview[master]: Add user name autocompletion support to the "link SVN commit...

2017-11-20 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392487 )

Change subject: Add user name autocompletion support to the "link SVN committer 
to wiki user" page (Special:Code//author//link)
..

Add user name autocompletion support to the "link SVN committer to wiki user" 
page (Special:Code//author//link)

Change-Id: I543abc9bcf0ba9198c7caee4c4a9b1967e45c798
---
M ui/CodeRevisionAuthorLink.php
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeReview 
refs/changes/87/392487/1

diff --git a/ui/CodeRevisionAuthorLink.php b/ui/CodeRevisionAuthorLink.php
index 521fa92..ebe8e69 100644
--- a/ui/CodeRevisionAuthorLink.php
+++ b/ui/CodeRevisionAuthorLink.php
@@ -17,6 +17,7 @@
 
function execute() {
global $wgRequest, $wgUser;
+
if ( !$wgUser->isAllowed( 'codereview-link-user' ) ) {
throw new PermissionsError( 'codereview-link-user' );
}
@@ -30,6 +31,7 @@
 
function doForm() {
global $wgOut, $wgUser;
+
$form = Xml::openElement( 'form', [ 'method' => 'post',
'action' => $this->getTitle()->getLocalURL(),
'name' => 'uluser', 'id' => 'mw-codeauthor-form1' ] );
@@ -50,12 +52,13 @@
}
 
$form .= Xml::inputLabel( wfMessage( 'code-author-name' 
)->text(),
-   'linktouser', 'username', 30, '' ) . ' ' .
+   'linktouser', 'username', 30, '', [ 'class' => 
'mw-autocomplete-user' ] ) . ' ' .
Xml::submitButton( wfMessage( 'ok' )->text(), [ 
'name' => 'newname' ] ) .
Xml::closeElement( 'fieldset' ) .
$additional .
Xml::closeElement( 'form' ) . "\n";
 
+   $wgOut->addModules( 'mediawiki.userSuggest' );
$wgOut->addHTML( $this->linkStatus() . $form );
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I543abc9bcf0ba9198c7caee4c4a9b1967e45c798
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeReview
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits