Skip to content

Commit 941cdb1

Browse files
Fix error message for new tracks (no calc values)
1 parent c0bcc67 commit 941cdb1

File tree

1 file changed

+6
-3
lines changed
  • components/com_jtg/views/track/tmpl

1 file changed

+6
-3
lines changed

components/com_jtg/views/track/tmpl/form.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,15 +309,18 @@
309309
<tbody>
310310
<tr>
311311
<td><?php echo JText::_('COM_JTG_DISTANCE'); ?></td>
312-
<td><input id="distance" type="text" name="distance" class="form-control" value="<?php echo $this->track->distance; ?>" /> <?php echo JText::_('COM_JTG_DISTANCE_UNIT_'.strtoupper($this->cfg->unit)).' <font color="grey">( '.JtgHelper::getFormattedDistance($this->gpsTrack->distance, '',$this->cfg->unit).' )</font>'; ?> </td>
312+
<td><input id="distance" type="text" name="distance" class="form-control" value="<?php echo $this->track->distance; ?>" /> <?php echo JText::_('COM_JTG_DISTANCE_UNIT_'.strtoupper($this->cfg->unit));
313+
if (isset($this->gpsTrack)) echo ' <font color="grey">( '.JtgHelper::getFormattedDistance($this->gpsTrack->distance, '',$this->cfg->unit).' )</font>'; ?> </td>
313314
</tr>
314315
<tr>
315316
<td><?php echo JText::_('COM_JTG_ELEVATION_UP') ?></td>
316-
<td><input id="ascent" type="text" name="ascent" class="form-control" value="<?php echo $this->track->ele_asc; ?>" /> <?php echo JText::_('COM_JTG_ELEVATION_UNIT').' <font color="grey">( '.$this->gpsTrack->totalAscent.' ) </font>'; ?> </td>
317+
<td><input id="ascent" type="text" name="ascent" class="form-control" value="<?php echo $this->track->ele_asc; ?>" /> <?php echo JText::_('COM_JTG_ELEVATION_UNIT');
318+
if (isset($this->gpsTrack)) echo ' <font color="grey">( '.$this->gpsTrack->totalAscent.' ) </font>'; ?> </td>
317319
</tr>
318320
<tr>
319321
<td><?php echo JText::_('COM_JTG_ELEVATION_DOWN') ?></td>
320-
<td><input id="descent" type="text" name="descent" class="form-control" value="<?php echo $this->track->ele_desc; ?>" /> <?php echo JText::_('COM_JTG_ELEVATION_UNIT').' <font color="grey">( '.$this->gpsTrack->totalDescent.' )</font>'; ?> </td>
322+
<td><input id="descent" type="text" name="descent" class="form-control" value="<?php echo $this->track->ele_desc; ?>" /> <?php echo JText::_('COM_JTG_ELEVATION_UNIT');
323+
if (isset($this->gpsTrack)) echo ' <font color="grey">( '.$this->gpsTrack->totalDescent.' )</font>'; ?> </td>
321324
</tr>
322325
</tbody>
323326
</table>

0 commit comments

Comments
 (0)