Skip to content

Commit

Permalink
nkwgmaps:
Browse files Browse the repository at this point in the history
* corrected some indentations

git-svn-id: https://develop.sub.uni-goettingen.de/repos/w3d/branches/dev/typo3conf/ext/nkwgmaps@1594 f004c202-0a6e-0410-85e4-8d7485fa9ffe
  • Loading branch information
simm committed Jan 20, 2012
1 parent 9f6b347 commit d9f97c0
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions pi3/class.tx_nkwgmaps_pi3.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,15 @@ public function main($content, $conf) {
} elseif ($conf['ff']['display'] == 'directionsform') {
// get latlon
if ($_REQUEST['startpoint'] && $_REQUEST['endpoint'] && $_REQUEST['travelmode']) {
$formURL = $this->pi_linkTP_keepPIvars_url($config, $cache=0, $clearAnyway=1, $altPageId=0);

$form = '
<div id="'. $this->prefixId .'_directions_form">
<form id="nkwgmaps_directions_form" action="' . $formURL . '" method="POST">
<dt></dt><dd id="back"><input type="submit" name="submit" value="' . $this->pi_getLL("back") . '"></dd>
</form>
</div>';

$conf['ff']['start'] = $_REQUEST['startpoint'];
$conf['ff']['end'] = $_REQUEST['endpoint'];
$conf['ff']['travelmode'] = $_REQUEST['travelmode'];
Expand Down Expand Up @@ -312,7 +321,7 @@ public function main($content, $conf) {
}

if (!$fail) {
// the div-container in which the map is displayed
// the div-container in which the map is displayed
$tmp = '<div id="' . $conf['ff']['mapName'] . '" class="tx-nkwgmaps-border"></div>';
switch ($conf['ff']['display']) {
case 'singleaddress':;
Expand All @@ -330,19 +339,19 @@ public function main($content, $conf) {
$js = tx_nkwgmaps::directions($conf);
}
break;
case 'directionsform':
if (!isset($_REQUEST['startpoint']) && !isset($_REQUEST['endpoint'])) {
$tmp .= $form;
$js = tx_nkwgmaps::showGMap($conf);
} else {
if ($conf['ff']['directionsformvisibility'] == 'true') {
$js = tx_nkwgmaps::directionsWithSteps($conf);
$tmp .= '<div id="directionsPanel" class="tx-nkwgmaps-directionspanel"></div>';
} else {
$js = tx_nkwgmaps::directions($conf);
}
}
break;
case 'directionsform':
if (!isset($_REQUEST['startpoint']) && !isset($_REQUEST['endpoint'])) {
$tmp .= $form;
$js = tx_nkwgmaps::showGMap($conf);
} else {
if ($conf['ff']['directionsformvisibility'] == 'true') {
$js = tx_nkwgmaps::directionsWithSteps($conf);
$tmp .= '<div id="directionsPanel" class="tx-nkwgmaps-directionspanel"></div>';
} else {
$js = tx_nkwgmaps::directions($conf);
}
}
break;
}
} else {
$tmp = '<p>' . $msg . '</p>';
Expand Down

0 comments on commit d9f97c0

Please sign in to comment.