addHeadItem( $scriptsHTML, $scriptsHTML ); $wgOut->addHeadItem( $stylesHTML, $stylesHTML ); $wgOut->addModules( 'ext.pageforms.maps' ); $coordsInputAttrs = array( 'type' => 'text', 'tabindex' => $wgPageFormsTabIndex, 'class' => 'pfCoordsInput', 'name' => $input_name, 'value' => PFOpenLayersInput::parseCoordinatesString( $cur_value ), 'size' => 40 ); $coordsInput = Html::element( 'input', $coordsInputAttrs ); // $wgPageFormsTabIndex++; $height = self::getHeight( $other_args ); $width = self::getWidth( $other_args ); $mapCanvas = Html::element( 'div', array( 'class' => 'pfMapCanvas', 'style' => "height: $height; width: $width;" ), 'Map goes here...' ); $fullInputHTML = << $coordsInput $mapCanvas END; $text = Html::rawElement( 'div', array( 'class' => 'pfLeafletInput' ), $fullInputHTML ); return $text; } /** * Returns the HTML code to be included in the output page for this input. * @return string */ public function getHtmlText() { return self::getHTML( $this->mCurrentValue, $this->mInputName, $this->mIsMandatory, $this->mIsDisabled, $this->mOtherArgs ); } }