| 1 |
<?php |
| 2 |
|
| 3 |
namespace MediaWiki\Installer; |
| 4 |
|
| 5 |
use MediaWiki\Html\Html; |
| 6 |
use MediaWiki\Status\Status; |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
abstract class DatabaseConnectForm extends DatabaseForm { |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
abstract public function getHtml(); |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
abstract public function submit(); |
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
protected function getInstallUserBox() { |
| 39 |
return "<span class=\"cdx-card\"><span class=\"cdx-card__text\">" . |
| 40 |
Html::element( |
| 41 |
'span', |
| 42 |
[ 'class' => 'cdx-card__text__title' ], |
| 43 |
wfMessage( 'config-db-install-account' )->text() |
| 44 |
) . |
| 45 |
"<span class=\"cdx-card__text__description\">" . |
| 46 |
$this->getTextBox( |
| 47 |
'_InstallUser', |
| 48 |
'config-db-username', |
| 49 |
[ 'dir' => 'ltr' ], |
| 50 |
$this->webInstaller->getHelpBox( 'config-db-install-username' ) |
| 51 |
) . |
| 52 |
$this->getPasswordBox( |
| 53 |
'_InstallPassword', |
| 54 |
'config-db-password', |
| 55 |
[ 'dir' => 'ltr' ], |
| 56 |
$this->webInstaller->getHelpBox( 'config-db-install-password' ) |
| 57 |
) . |
| 58 |
"</span></span></span>"; |
| 59 |
} |
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
protected function submitInstallUserBox() { |
| 66 |
$this->setVarsFromRequest( [ '_InstallUser', '_InstallPassword' ] ); |
| 67 |
|
| 68 |
return Status::newGood(); |
| 69 |
} |
| 70 |
|
| 71 |
} |