}
protected function getFormFields() {
- $user = $this->getUser();
- $request = $this->getRequest();
-
$fields = [];
if ( $this->par !== null ) {
'type' => 'textwithbutton',
'label-message' => 'botpasswords-label-appid',
'buttondefault' => $this->msg( 'botpasswords-label-create' )->text(),
+ 'buttonflags' => [ 'progressive', 'primary' ],
'required' => true,
'size' => BotPassword::APPID_MAXLENGTH,
'maxlength' => BotPassword::APPID_MAXLENGTH,
public function onSuccess() {
$out = $this->getOutput();
+ $username = $this->getUser()->getName();
switch ( $this->operation ) {
case 'insert':
$out->setPageTitle( $this->msg( 'botpasswords-created-title' )->text() );
- $out->addWikiMsg( 'botpasswords-created-body', $this->par );
+ $out->addWikiMsg( 'botpasswords-created-body', $this->par, $username );
break;
case 'update':
$out->setPageTitle( $this->msg( 'botpasswords-updated-title' )->text() );
- $out->addWikiMsg( 'botpasswords-updated-body', $this->par );
+ $out->addWikiMsg( 'botpasswords-updated-body', $this->par, $username );
break;
case 'delete':
$out->setPageTitle( $this->msg( 'botpasswords-deleted-title' )->text() );
- $out->addWikiMsg( 'botpasswords-deleted-body', $this->par );
+ $out->addWikiMsg( 'botpasswords-deleted-body', $this->par, $username );
$this->password = null;
break;
}
$sep = BotPassword::getSeparator();
$out->addWikiMsg(
'botpasswords-newpassword',
- htmlspecialchars( $this->getUser()->getName() . $sep . $this->par ),
+ htmlspecialchars( $username . $sep . $this->par ),
htmlspecialchars( $this->password )
);
$this->password = null;