30 abstract class WebInstallerPage {
42 abstract public function execute();
48 $this->parent = $parent;
58 public function isSlow() {
65 public function addHTML( $html ) {
66 $this->parent->output->addHTML( $html );
69 public function startForm() {
71 "<div class=\"config-section\">\n" .
76 'action' => $this->parent->getUrl( [
'page' => $this->getName() ] )
86 public function endForm( $continue =
'continue', $back =
'back' ) {
87 $s =
"<div class=\"config-submit\">\n";
90 if ( $id ===
false ) {
91 $s .= Html::hidden(
'lastPage', $this->parent->request->getVal(
'lastPage' ) );
100 'name' =>
"enter-$continue",
101 'style' =>
'width:0;border:0;height:0;padding:0'
111 'name' =>
"submit-$back",
112 'tabindex' => $this->parent->nextTabIndex()
122 'name' =>
"submit-$continue",
123 'tabindex' => $this->parent->nextTabIndex(),
128 $s .=
"</div></form></div>\n";
129 $this->addHTML(
$s );
135 public function getName() {
136 return str_replace(
'WebInstaller',
'', static::class );
142 protected function getId() {
143 return array_search( $this->getName(), $this->parent->pageSequence );
152 public function getVar( $var, $default =
null ) {
153 return $this->parent->getVar( $var, $default );
160 public function setVar( $name, $value ) {
161 $this->parent->setVar( $name, $value );
171 protected function getFieldsetStart( $legend ) {
172 return "\n<fieldset><legend>" .
wfMessage( $legend )->escaped() .
"</legend>\n";
180 protected function getFieldsetEnd() {
181 return "</fieldset>\n";
187 protected function startLiveBox() {
189 '<div id="config-spinner" style="display:none;">' .
190 '<img src="images/ajax-loader.gif" /></div>' .
191 '<script>jQuery( "#config-spinner" ).show();</script>' .
192 '<div id="config-live-log">' .
193 '<textarea name="LiveLog" rows="10" cols="30" readonly="readonly">'
195 $this->parent->output->flush();
201 protected function endLiveBox() {
202 $this->addHTML(
'</textarea></div>
203 <script>jQuery( "#config-spinner" ).hide()</script>' );
204 $this->parent->output->flush();