-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Move map settings Fix lat lon entry to allow any float Test Plan: Check you can load and save values Reviewers: evansims, aMoniker, lkamau, vladimir Subscribers: rjmackay, vladimir, lkamau, aMoniker Differential Revision: https://phabricator.ushahidi.com/D825
- Loading branch information
Showing
10 changed files
with
81 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<ol class="breadcrumb"> | ||
<li><a ng-href="/" translate>nav.home</a></li> | ||
<li><a ng-href="/tools" translate>nav.tools</a></li> | ||
<li class="active" translate>tool.map_settings</li> | ||
</ol> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-md-9 col-md-push-3 col-xs-12"> | ||
<div class="panel panel-default"> | ||
<div class="panel-heading"> | ||
<h4 class="title">{{title}}</h4> | ||
</div> | ||
<div class="panel-body"> | ||
<form id="map"> | ||
<div class="row"> | ||
<div class="col-md-6"> | ||
<div class="form-group" ng-if="mapSettingsReady"> | ||
<label translate>settings.map_default_location</label> | ||
<leaflet defaults="defaults" tiles="baselayer" markers="markers" center="center" height="300px" width="100%"></leaflet> | ||
</div> | ||
</div> | ||
<div class="col-md-6" ng-if="mapSettingsReady"> | ||
<div class="form-group"> | ||
<label for="map-settings-base-layer" translate>settings.map_default_baselayer</label> | ||
<select id="map-settings-base-layer" class="form-control" ng-model="map.default_view.baselayer" ng-options="index as layer.name for (index, layer) in baseLayers | orderBy" ng-change="updateMapPreview()"></select> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="col-sm-6"> | ||
<div class="form-group" ng-class="{'has-error': map.latitude.$valid}"> | ||
<label for="map-settings-latitude" translate>settings.map_default_latitude</label> | ||
<input name="latitude" id="map-settings-latitude" type="number" step="any" ng-min="-90" ng-max="90" required class="form-control" ng-model="map.default_view.lat" ng-pattern="patternFloat" ng-change="updateMapPreview()" /> | ||
</div> | ||
</div> | ||
<div class="col-sm-6"> | ||
<div class="form-group" ng-class="{'has-error': map.longitude.$valid}"> | ||
<label for="map-settings-longitude" translate>settings.map_default_longitude</label> | ||
<input name="longitude" id="map-settings-longitude" type="number" step="any" ng-min="-180" ng-max="180" required class="form-control" ng-model="map.default_view.lon" ng-pattern="patternFloat" ng-change="updateMapPreview()" /> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label for="map-settings-zoom" translate>settings.map_default_zoom_level</label> | ||
<input id="map-settings-zoom" type="number" ng-min="minZoom" ng-max="maxZoom" required class="form-control" ng-model="map.default_view.zoom" ng-pattern="onlyNumbers" ng-change="updateMapPreview()" /> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label><input type="checkbox" ng-model="map.clustering" id="map-settings-clustering" /> <span translate>settings.map_clustering</span></label> | ||
</div> | ||
|
||
<p> | ||
<button class="btn btn-primary pull-right flip" ng-click="updateConfig('map', map)" | ||
ng-disabled="form.$invalid || isUnchanged(map) || saving_config['map']"> | ||
<i class="fa fa-cog fa-spin" ng-show="saving_config['map']"></i> | ||
<span translate>settings.save</span> | ||
</button> | ||
</p> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
<tool-menu active="map-settings"></tool-menu> | ||
</div> |