if ( $form->show() ) {
switch ( $this->type ) {
- case Block::TYPE_USER:
case Block::TYPE_IP:
+ $out->addWikiMsg( 'unblocked-ip', wfEscapeWikiText( $this->target ) );
+ break;
+ case Block::TYPE_USER:
$out->addWikiMsg( 'unblocked', wfEscapeWikiText( $this->target ) );
break;
case Block::TYPE_RANGE:
'Target' => array(
'type' => 'text',
'label-message' => 'ipaddressorusername',
- 'tabindex' => '1',
+ 'autofocus' => true,
'size' => '45',
'required' => true,
),
$fields['Target']['default'] = $target;
$fields['Target']['type'] = 'hidden';
switch ( $type ) {
- case Block::TYPE_USER:
case Block::TYPE_IP:
+ $fields['Name']['default'] = Linker::linkKnown(
+ SpecialPage::getTitleFor( 'Contributions', $target->getName() ),
+ $target->getName()
+ );
+ $fields['Name']['raw'] = true;
+ break;
+ case Block::TYPE_USER:
$fields['Name']['default'] = Linker::link(
$target->getUserPage(),
$target->getName()
$fields['Target']['default'] = "#{$this->target}";
break;
}
+ // target is hidden, so the reason is the first element
+ $fields['Target']['autofocus'] = false;
+ $fields['Reason']['autofocus'] = true;
}
} else {
$fields['Target']['default'] = $this->target;