Skip to content
Permalink
Browse files

some small bugfixes updates #239

  • Loading branch information...
Slini11 committed May 16, 2016
1 parent a5adce1 commit 4e566c956438214c23c448f4dbfa4ffce42320d2
Showing with 19 additions and 29 deletions.
  1. +13 −23 htdocs/search.php
  2. +6 −6 htdocs/templates2/ocstyle/search.tpl
@@ -1675,7 +1675,7 @@ function outputSearchForm($options)
if ($options['searchtype'] == 'bydistance') {
$dByDistanceChecked = ($options['searchtype'] == 'bydistance');
} else { // Ocprop
$dByDistanceChecked = (!$login->logged_in());
$dByDistanceChecked = false;
}
$tpl->assign('dbydistance_checked', $dByDistanceChecked);
@@ -1704,7 +1704,7 @@ function outputSearchForm($options)
} elseif ($options['searchtype'] == 'byort') {
$dByOrtPlzChecked = ($options['searchtype'] == 'byort'); // Ocprop
} else {
$dByOrtPlzChecked = (!$login->logged_in());
$dByOrtPlzChecked = false;
}
$tpl->assign('dbyortplz_checked', $dByOrtPlzChecked);
@@ -1716,7 +1716,7 @@ function outputSearchForm($options)
if ($options['searchtype'] == 'bywaypoint') {
$dByWaypointChecked = ($options['searchtype'] == 'bywaypoint');
} else { // Ocprop
$dByWaypointChecked = (!$login->logged_in());
$dByWaypointChecked = false;
}
$tpl->assign('dbywaypoint_checked', $dByWaypointChecked);
@@ -2058,26 +2058,16 @@ function outputSearchForm($options)
$tpl->assign('ortserror', '');
if (isset($options['error_plz'])) {
$tpl->assign('ortserror', $error_plz);
} else {
if (isset($options['error_ort'])) {
$tpl->assign('ortserror', $error_ort);
} else {
if (isset($options['error_locidnocoords'])) {
$tpl->assign('ortserror', $error_locidnocoords);
} else {
if (isset($options['error_noort'])) {
$tpl->assign('ortserror', $error_noort);
} else {
if (isset($options['error_nowaypointfound'])) {
$tpl->assign('ortserror', $error_nowaypointfound);
} else {
if (isset($options['error_nocoords'])) {
$tpl->assign('ortserror', $error_nocoords);
}
}
}
}
}
} else if (isset($options['error_ort'])) {
$tpl->assign('ortserror', $error_ort);
} else if (isset($options['error_locidnocoords'])) {
$tpl->assign('ortserror', $error_locidnocoords);
} else if (isset($options['error_noort'])) {
$tpl->assign('ortserror', $error_noort);
} else if (isset($options['error_nowaypointfound'])) {
$tpl->assign('ortserror', $error_nowaypointfound);
} else if (isset($options['error_nocoords'])) {
$tpl->assign('ortserror', $error_nocoords);
}
$tpl->assign('fulltexterror', '');
@@ -35,7 +35,7 @@ function _radio_click(){
return false;
}
if (document.searchbydistance.searchto.value == "searchbyortplz") {
if (document.getElementById('sbortplz').checked) {
if (_sbortplz_click() == true){
return true;
}
@@ -44,7 +44,7 @@ function _radio_click(){
return false;
}
}
else if (document.searchbydistance.searchto.value == "searchbywaypoint") {
else if (document.getElementById('sbwaypoint').checked) {
if (_sbwaypoint_click() == true){
return true;
}
@@ -53,7 +53,7 @@ function _radio_click(){
return false;
}
}
else if (document.searchbydistance.searchto.value == "searchbydistance") {
else if (document.getElementById('sbdis').checked) {
if (_sbd_click() == true){
return true;
}
@@ -64,9 +64,9 @@ function _radio_click(){
}
else {
alert("{t}Select a search button, please!{/t}");
resetbutton('submit_dist');
return false;
}
return true;
}
function _sbn_click()
@@ -568,7 +568,6 @@ function switchAttributeCat2()
<option value="nm" {if $sel_nm}selected="selected"{/if}>{t}Seamiles{/t}</option>
</select>
</td>
<td><input type="submit" name="submit_dist" value="{t}Search{/t}" class="formbutton" onclick="submitbutton('submit_dist')" /></td>
</tr>
<tr>
<td class=""><input type="radio" id="sbortplz" name="searchto" value="searchbyortplz" {if $dbyortplz_checked}checked="checked"{/if}><label for="sbortplz">... {t}from City / Postal Code:{/t}</label></td>
@@ -577,7 +576,7 @@ function switchAttributeCat2()
</tr>
<tr>
<td class=""><input type="radio" id="sbwaypoint" name="searchto" value="searchbywaypoint" {if $dbywaypoint_checked}checked="checked"{/if}><label for="sbwaypoint">... {t}from Waypoint:{/t}</label></td>
<td><input type="text" name="waypoint" value="{$waypoint}" maxlength="7" class="input50" onfocus="textonfocus(1)"/></td>
<td><input type="text" name="waypoint" value="{$waypoint}" maxlength="7" class="input70" onfocus="textonfocus(1)"/></td>
</tr>
<tr>
<td valign="top"><input type="radio" id="sbdis" name="searchto" value="searchbydistance" {if $dbydistance_checked}checked="checked"{/if}><label for="sbdis">... {t}from coordinates:{/t}</label></td>
@@ -596,6 +595,7 @@ function switchAttributeCat2()
<input type="text" name="lon_h" maxlength="3" value="{$lon_h}" class="input30" onfocus="textonfocus(2)"/>&nbsp;°&nbsp;
<input type="text" name="lon_min" maxlength="6" value="{$lon_min}" class="input50" onfocus="textonfocus(2)"/>&nbsp;'&nbsp;
</td>
<td><input type="submit" name="submit_dist" value="{t}Search{/t}" class="formbutton" onclick="submitbutton('submit_dist')" /></td>
</tr>
</form>

0 comments on commit 4e566c9

Please sign in to comment.
You can’t perform that action at this time.