Rework the include wording in the export modal

This commit is contained in:
Phyks (Lucas Verney) 2019-07-20 19:43:07 +02:00
parent c1169c5c6a
commit 5dc7445d62
3 changed files with 21 additions and 22 deletions

View file

@ -680,26 +680,30 @@
</label> </label>
</div> </div>
</div> </div>
</div>
</fieldset>
<fieldset id="export-includes" class="form-group">
<div class="row">
<legend <legend
class="col-form-label col-sm-2" class="col-form-label col-sm-2"
data-i18n="export.exportWaypoints" data-i18n="export.include"
> >
<label Include
class="form-check-label"
for="export-waypoints"
>
Include waypoints
</label>
</legend> </legend>
<div class="col-sm-10"> <div class="col-sm-10">
<div class="form-check"> <div class="form-check">
<input <label class="form-check-label">
class="form-check-input" <input
id="export-waypoints" class="form-check-input"
type="checkbox" id="include-waypoints"
name="export-waypoints" type="checkbox"
value="1" name="include-waypoints"
/> />
<span
data-i18n="export.include_waypoints"
>Waypoints</span
>
</label>
</div> </div>
</div> </div>
</div> </div>

View file

@ -45,13 +45,13 @@ BR.Export = L.Class.extend({
exportForm['format'].value || exportForm['format'].value ||
$('#export-format input:radio:checked').val(); $('#export-format input:radio:checked').val();
var name = encodeURIComponent(exportForm['trackname'].value); var name = encodeURIComponent(exportForm['trackname'].value);
var exportWaypoints = exportForm['export-waypoints'].checked; var includeWaypoints = exportForm['include-waypoints'].checked;
var uri = this.router.getUrl( var uri = this.router.getUrl(
this.latLngs, this.latLngs,
format, format,
name, name,
exportWaypoints includeWaypoints
); );
var evt = document.createEvent('MouseEvents'); var evt = document.createEvent('MouseEvents');

View file

@ -137,12 +137,7 @@ L.BRouter = L.Class.extend({
trackname: trackname trackname: trackname
}) })
); );
if (exportWaypoints) if (exportWaypoints) args.push('exportWaypoints=1');
args.push(
L.Util.template('exportWaypoints={exportWaypoints}', {
exportWaypoints: +exportWaypoints
})
);
var prepend_host = format != null; var prepend_host = format != null;