/** * Get a standard web-user fieldset * @param string $noCreateMsg Message to display instead of the creation checkbox. * Set this to false to show a creation checkbox. * * @return String */ public function getWebUserBox($noCreateMsg = false) { $wrapperStyle = $this->getVar('_SameAccount') ? 'display: none' : ''; $s = Html::openElement('fieldset') . Html::element('legend', array(), wfMessage('config-db-web-account')->text()) . $this->getCheckBox('_SameAccount', 'config-db-web-account-same', array('class' => 'hideShowRadio', 'rel' => 'dbOtherAccount')) . Html::openElement('div', array('id' => 'dbOtherAccount', 'style' => $wrapperStyle)) . $this->getTextBox('wgDBuser', 'config-db-username') . $this->getPasswordBox('wgDBpassword', 'config-db-password') . $this->parent->getHelpBox('config-db-web-help'); if ($noCreateMsg) { $s .= $this->parent->getWarningBox(wfMessage($noCreateMsg)->plain()); } else { $s .= $this->getCheckBox('_CreateDBAccount', 'config-db-web-create'); } $s .= Html::closeElement('div') . Html::closeElement('fieldset'); return $s; }