[sibebar] added polygon
authorErik Haider Forsén <erikhf@ifi.uio.no>
Sun, 6 Dec 2015 11:32:08 +0000 (12:32 +0100)
committerErik Haider Forsén <erikhf@ifi.uio.no>
Sun, 6 Dec 2015 11:32:08 +0000 (12:32 +0100)
src/components/sidebar/sidebar.html
src/components/sidebar/sidebar.ts

index c6059a8..f019dd8 100644 (file)
@@ -48,9 +48,9 @@
             <fieldset class="form-group">
                 <Legend>Coordinates</Legend>
                 <div *ng-if="featureType.value == 'POINT'" class="form-group">
-                    <label>lat</label>
+                    <label>Latitude</label>
                     <input class="form-control" type="number" ng-control="lat" #lat="form" step="any" max="90" min="-90"/>
-                    <label>long</label>
+                    <label>Longitude</label>
                     <input class="form-control" type="number" ng-control="lng" #lng="form" step="any" max="180" min="-180"/>
                 </div>
                 <div *ng-if="featureType.value == 'NONE'" class="alert alert-danger">
             <fieldset>
                 <legend>Coordinates</legend>
                 <div *ng-if="featureType.value == 'POINT'" class="form-group">
-                    <label>lat</label>
+                    <label>Latitude</label>
                     <p>{{form.controls.lat.value}}</p>
-                    <label>long</label>
+                    <label>Longitude</label>
                     <p>{{form.controls.lng.value}}</p>
                 </div>
                 <div *ng-if="featureType.value == 'NONE'" class="alert alert-danger">
                     <p>This organisation unit has no associated coordinates</p>
                 </div>
-                <!--
-                <div *ng-if="featureType.value == 'POLYGON' || 'featureType.value == 'MULTI_POLYGON'">
-                    <label>polygon</label>
-                    <p>{{form.controls.coordinates.value}}</p>
+                <div *ng-if="featureType.value == 'POLYGON' || featureType.value == 'MULTI_POLYGON'">
+                    <p>polygon</p>
                 </div>
-                -->
+
             </fieldset>
 
             <fieldset>
index b915779..900b089 100644 (file)
@@ -51,6 +51,7 @@ export class Sidebar {
     email: Control = new Control("");
     phoneNumber: Control = new Control("");
     featureType: Control = new Control("");
+    coordinates: Control = new Control("");
 
 
     constructor(http:Http, fb: FormBuilder) {
@@ -76,7 +77,8 @@ export class Sidebar {
             "address": this.address,
             "email": this.email,
             "phoneNumber": this.phoneNumber,
-            "featureType": this.featureType
+            "featureType": this.featureType,
+            "coordinates": this.coordinates
         });
         let instance = this;
         this.lat.valueChanges.observer({