[sibebar] added polygon
[u/erikhf/frm.git] / src / components / sidebar / sidebar.html
CommitLineData
c1cf798d 1<div>
f800869b 2 <div [hidden]="!active" class="form-background" style="overflow-y:auto; position:relative; float:right; ">
8c91a910 3 <form *ng-if="editmode" [(ng-form-model)]="form" (ng-submit)="onSubmit()" #of="form">
99b3fec0 4 <h2>{{newObject?"Add new Organizational Unit":"Update Organizational Unit"}}</h2>
8c91a910 5
9ce2e2a9
EHF
6 <div class="form-group">
7 <label>Name</label>
8c91a910 8 <input class="form-control" type="text" ng-control="name">
59ab0e7a
EHF
9 <p [hidden]="name.valid || name.untouched" class="alert alert-danger">
10 Name is required
11 </p>
9bdb78d0 12
c1cf798d 13 </div>
9ce2e2a9
EHF
14 <div class="form-group">
15 <label>Short Name</label>
8c91a910
EHF
16 <input class="form-control" type="text" ng-control="shortName" #shortname="form">
17
18 <p [hidden]="shortname.valid || shortname.untouched" class="alert alert-danger">
9bdb78d0
EHF
19 Short name is required
20 </p>
9ce2e2a9 21 </div>
9bdb78d0 22
9ce2e2a9
EHF
23 <div class="form-group">
24 <label>Description</label>
8c91a910 25 <textarea class="form-control" ng-control="description" rows="3"></textarea>
9ce2e2a9
EHF
26 </div>
27 <div class="form-group">
28 <label>Code</label>
8c91a910 29 <input class="form-control" type="text" ng-control="code">
9ce2e2a9 30 </div>
8c91a910 31
9ce2e2a9
EHF
32 <div class="form-group">
33 <label>Opening Date</label>
8c91a910
EHF
34 <input class="form-control" type="date" ng-control="openingDate" #openingDate="form">
35
59ab0e7a 36 <p [hidden]="openingdate.valid || openingdate.untouched" class="alert alert-danger">Opening date is required</p>
9ce2e2a9
EHF
37 </div>
38 <div class="form-group">
39 <label>Closed Date</label>
8c91a910 40 <input class="form-control" type="date" ng-control="closedDate">
9ce2e2a9
EHF
41 </div>
42 <div class="form-group">
43 <label>URL</label>
8c91a910
EHF
44 <input class="form-control" type="url" ng-control="url" #url="form">
45
9bdb78d0 46 <p [hidden]="url.valid" class="alert alert-danger">The specified URL is not valid</p>
9ce2e2a9 47 </div>
99b3fec0 48 <fieldset class="form-group">
8c91a910 49 <Legend>Coordinates</Legend>
99b3fec0 50 <div *ng-if="featureType.value == 'POINT'" class="form-group">
f03b7890 51 <label>Latitude</label>
59ab0e7a 52 <input class="form-control" type="number" ng-control="lat" #lat="form" step="any" max="90" min="-90"/>
f03b7890 53 <label>Longitude</label>
59ab0e7a 54 <input class="form-control" type="number" ng-control="lng" #lng="form" step="any" max="180" min="-180"/>
9ce2e2a9 55 </div>
99b3fec0
EHF
56 <div *ng-if="featureType.value == 'NONE'" class="alert alert-danger">
57 <p>This organisation unit has no associated coordinates</p>
58 </div>
8c91a910
EHF
59 </fieldset>
60
61
62 <fieldset class="form-group">
63 <legend>Contact information</legend>
64 <label>Contact person</label>
65 <input class="form-control" type="text" ng-control="contactPerson"/>
66 <label>Address</label>
67 <input class="form-control" type="text" ng-control="address"/>
68 <label>E-mail</label>
69 <input class="form-control" type="email" ng-control="email"/>
70 <label>Phone number</label>
71 <input class="form-control" type="text" ng-control="phoneNumber"/>
9ce2e2a9 72 </fieldset>
57c243b6 73 <button type="button" (click)="cancel()" class="btn btn-default">Cancel</button>
8c91a910
EHF
74 <button type="submit" [disabled]="!of.form.valid" class="btn btn-default">{{newObject? "Add":"Update"}}
75 </button>
9bdb78d0 76
9ce2e2a9 77 </form>
9bdb78d0 78
8c91a910 79
9ce2e2a9 80 <section *ng-if="!editmode">
99b3fec0 81 <h2>Organisation Unit</h2>
9ce2e2a9
EHF
82 <label for="actOrgUnitName">Name</label>
83
8c91a910 84 <p id="actOrgUnitName">{{(form.controls.name.value) || "[None]"}}</p>
9ce2e2a9
EHF
85
86 <label for="actOrgUnitShortName">Short Name</label>
87
8c91a910 88 <p id="actOrgUnitShortName">{{(form.controls.shortName.value)||["None"]}}</p>
9ce2e2a9
EHF
89
90 <label for="actOrgUnitDescription">Description</label>
91
8c91a910 92 <p id="actOrgUnitDescription">{{(form.controls.description.value)||"None"}}</p>
9ce2e2a9
EHF
93
94 <label for="actOrgUnitCode">Code</label>
95
8c91a910 96 <p id="actOrgUnitCode">{{(form.controls.code.value)||["None"]}}</p>
9ce2e2a9
EHF
97
98 <label for="actOrgUnitOpeningDate">Opening Date</label>
99
8c91a910 100 <p id="actOrgUnitOpeningDate">{{form.controls.openingDate.value||["None"]}}</p>
9ce2e2a9
EHF
101
102 <label for="actOrgUnitClosingDate">Closed Date</label>
103
8c91a910 104 <p id="actOrgUnitClosingDate">{{form.controls.closedDate.value||["None"]}}</p>
9ce2e2a9
EHF
105
106 <label for="actOrgUnitURL">Url</label>
107
8c91a910 108 <p id="actOrgUnitURL">{{(form.controls.url.value) ||["None"]}}</p>
9ce2e2a9 109
99b3fec0
EHF
110 <fieldset>
111 <legend>Coordinates</legend>
112 <div *ng-if="featureType.value == 'POINT'" class="form-group">
f03b7890 113 <label>Latitude</label>
99b3fec0 114 <p>{{form.controls.lat.value}}</p>
f03b7890 115 <label>Longitude</label>
99b3fec0
EHF
116 <p>{{form.controls.lng.value}}</p>
117 </div>
118 <div *ng-if="featureType.value == 'NONE'" class="alert alert-danger">
119 <p>This organisation unit has no associated coordinates</p>
120 </div>
f03b7890
EHF
121 <div *ng-if="featureType.value == 'POLYGON' || featureType.value == 'MULTI_POLYGON'">
122 <p>polygon</p>
99b3fec0 123 </div>
f03b7890 124
99b3fec0
EHF
125 </fieldset>
126
127 <fieldset>
128 <legend>Contact Information</legend>
129 <label>Contact person</label>
130 <p>{{form.controls.contactPerson.value || ["None"]}}</p>
131 <label>Address</label>
132 <p>{{form.controls.address.value || ["None"]}}</p>
133 <label>E-mail</label>
134 <p>{{form.controls.email.value || ["None"]}}</p>
135 <label>Phone number</label>
136 <p>{{form.controls.phoneNumber.vaule || ["None"]}}</p>
137 </fieldset>
57c243b6 138 <button class="btn btn-default" (click)="editmode = !editmode">Edit</button>
9ce2e2a9 139 </section>
57c243b6 140
c1cf798d
EHF
141 </div>
142</div>