Project

General

Profile

1
<div class="row" style="height: 5em">
2
	<div class="col-xl-8 col-lg-10">
3
		<div class="alert alert-success" ng-if="message">{{message}}</div>
4
		<organization-info ng-if="orgId && !message" info="info"></organization-info>
5
	</div>
6
</div>
7

    
8
<div class="row">
9
	<div class="col-xl-8 col-lg-10">
10
		<div class="card">
11
			<div class="card-header">
12
				<org-tabs-menu selected='1' org-id="{{orgId}}" info="info"></org-tabs-menu>
13
			</div>
14
			<div class="card-body">
15
				<form name="organizationForm">
16
					<fieldset>
17
						<legend>Official name and type</legend>
18
				
19
						<div class="form-group">
20
							<div class="input-group input-group-sm">
21
								<div class="input-group-prepend">
22
									<div class="input-group-text bg-primary text-white">name</div>
23
								</div>
24
								<input name="org_nm" type="text" class="form-control" placeholder="organization name..." ng-model="org.name" required="required" ng-class="{'is-invalid' : organizationForm.org_nm.$error.required}"/>
25
								<div class="input-group-append input-group-prepend">
26
									<div class="input-group-text bg-primary text-white">type</div>
27
								</div>
28
								<select name="org_tp" class="custom-select" ng-model="org.type" required="required" ng-class="{'is-invalid' : organizationForm.org_tp.$error.required}">
29
									<option disabled="disabled" value=''>type...</option>
30
									<option ng-repeat="t in vocabularies.orgTypes">{{t}}</option>
31
								</select>
32
							</div>
33
						</div>
34
					</fieldset>
35
					<fieldset class="mt-4">
36
						<legend>Geographical location</legend>
37
					
38
						<div class="form-group">
39
							<div class="input-group input-group-sm">
40
								<div class="input-group-prepend">
41
									<div class="input-group-text bg-primary text-white">city</div>
42
								</div>
43
								<input name="org_ct" type="text" class="form-control" placeholder="" ng-model="org.city" />
44
								<div class="input-group-append input-group-prepend">
45
									<div class="input-group-text bg-primary text-white">country</div>
46
								</div>
47
								<select name="org_cntr" class="custom-select" ng-model="org.country" required="required" ng-class="{'is-invalid' : organizationForm.org_cntr.$error.required}">
48
									<option disabled="disabled" value=''>country...</option>
49
									<option ng-repeat="c in vocabularies.countries">{{c}}</option>
50
								</select>
51
								<div class="input-group-append input-group-prepend">
52
									<div class="input-group-text bg-primary text-white">lat</div>
53
								</div>
54
								<input name="org_lat" type="text" class="form-control" placeholder="0.0" ng-model="org.lat" />
55
								<div class="input-group-append input-group-prepend">
56
									<div class="input-group-text bg-primary text-white">lng</div>
57
								</div>
58
								<input name="org_lng" type="text" class="form-control" placeholder="0.0" ng-model="org.lng" />
59
							</div>
60
						</div>
61
					</fieldset>
62
					
63
					<fieldset class="mt-4">
64
						<legend>Other names and identifiers</legend>
65
						
66
						<div class="form-group row">
67
							<div class="col-lg-8 mb-2">
68
								<div class="card">
69
									<div class="card-header bg-primary text-white text-center py-1">Acronyms</div>
70
									<table class="table table-sm">
71
										<tbody>
72
											<tr ng-repeat="a in org.acronyms">
73
												<td>{{a}}</td>
74
												<td class="text-right" style="width: 44px">
75
													<button type="button" class="btn btn-sm  btn-outline-danger" ng-click="org.acronyms.splice($index, 1)"><i class="fa fa-trash"></i></button>
76
												</td>
77
											</tr>
78
										</tbody>
79
										<tfoot>
80
											<tr ng-init="newAcronym=''">
81
												<td>
82
													<input type="text" class="form-control form-control-sm" placeholder="new acronym..." ng-model='newAcronym'/>
83
												</td>
84
												<td class="text-right"  style="width: 44px">
85
													<button type="button" class="btn btn-sm btn-outline-success" ng-click="org.acronyms.push(newAcronym); newAcronym=''" ng-disabled="!newAcronym || org.acronyms.indexOf(newAcronym) !== -1" ><i class="fa fa-plus"></i></button>
86
												</td>
87
											</tr>
88
										</tfoot>
89
									</table>
90
								</div>
91
							</div>
92
						</div>
93

    
94
						<div class="form-group row">
95
							<div class="col-lg-8 mb-2">
96
								<div class="card">
97
									<div class="card-header bg-primary text-white text-center py-1">Aliases</div>
98
									<table class="table table-sm">
99
										<thead class="thead-light">
100
											<tr>
101
												<th>name</th>
102
												<th style="width: 156px">language</th>
103
												<th style="width: 44px"></th>
104
											</tr>
105
										</thead>
106
										<tbody>
107
											<tr ng-repeat="n in org.otherNames">
108
												<td>{{n.name}}</td>
109
												<td>{{n.lang}}</td>
110
												<td class="text-right">
111
													<button type="button" class="btn btn-sm  btn-outline-danger" ng-click="org.otherNames.splice($index, 1)"><i class="fa fa-trash"></i></button>
112
												</td>
113
											</tr>
114
										</tbody>
115
										<tfoot>
116
											<tr ng-init="newOtherName=newLang=''">
117
												<td>
118
													<input type="text" class="form-control form-control-sm" placeholder="new alias..." ng-model="newOtherName" />
119
												</td>
120
												<td>
121
													<select class="custom-select custom-select-sm" ng-model="newLang">
122
														<option disabled="disabled" value=''>language...</option>
123
														<option ng-repeat="l in vocabularies.languages">{{l}}</option>
124
													</select>
125
												</td>
126
												<td class="text-right" style="width: 44px">
127
													<button type="button" class="btn btn-sm btn-outline-success" ng-click="org.otherNames.push({'name': newOtherName, 'lang': newLang}); newOtherName=newLang=''" ng-disabled="!newOtherName || !newLang"><i class="fa fa-plus"></i></button>
128
												</td>
129
											</tr>
130
										</tfoot>
131
									</table>
132
								</div>
133
							</div>
134
						</div>
135

    
136
						<div class="form-group row">
137
							<div class="col-lg-8 mb-2">
138
								<div class="card">
139
									<div class="card-header bg-primary text-white text-center py-1">Identifiers</div>
140
									<table class="table table-sm">
141
										<thead class="thead-light">
142
											<tr>
143
												<th>id</th>
144
												<th style="width: 156px">type</th>
145
												<th style="width: 44px"></th>
146
											</tr>
147
										</thead>
148
										<tbody>
149
											<tr ng-repeat="id in org.otherIdentifiers">
150
												<td>{{id.id}}</td>
151
												<td>{{id.type}}</td>
152
												<td class="text-right" style="width: 44px">
153
													<button type="button" class="btn btn-sm  btn-outline-danger" ng-click="org.otherIdentifiers.splice($index, 1)"><i class="fa fa-trash"></i></button>
154
												</td>
155
											</tr>
156
										</tbody>
157
										<tfoot>
158
											<tr ng-init="newId=newIdType=''">
159
												<td>
160
													<input type="text" class="form-control form-control-sm" placeholder="new id..." ng-model="newId" />
161
												</td>
162
												<td>
163
													<select class="custom-select custom-select-sm" ng-model="newIdType">
164
														<option disabled="disabled" value=''>type...</option>
165
														<option ng-repeat="t in vocabularies.idTypes">{{t}}</option>
166
													</select>
167
												</td>
168
												<td class="text-right" style="width: 44px">
169
													<button type="button" class="btn btn-sm btn-outline-success" ng-click="org.otherIdentifiers.push({'id': newId, 'type': newIdType}); newId=newIdType=''" ng-disabled="!newId || !newIdType"><i class="fa fa-plus"></i></button>
170
												</td>
171
											</tr>
172
										</tfoot>
173
									</table>
174
								</div>
175
							</div>
176
						</div>
177

    
178
						<div class="form-group row">
179
							<div class="col-lg-8 mb-2">
180
								<div class="card">
181
									<div class="card-header bg-primary text-white text-center py-1">Urls</div>
182
									<table class="table table-sm">
183
										<tbody>
184
											<tr ng-repeat="u in org.urls">
185
												<td><a href="{{u}}" target="_blank">{{u}}</a></td>
186
												<td class="text-right" style="width: 44px">
187
													<button type="button" class="btn btn-sm  btn-outline-danger" ng-click="org.urls.splice($index, 1)"><i class="fa fa-trash"></i></button>
188
												</td>
189
											</tr>
190
										</tbody>
191
										<tfoot>
192
											<tr ng-init="newUrl=''">
193
												<td>
194
													<input type="text" class="form-control form-control-sm" placeholder="http://..." ng-model="newUrl" />
195
												</td>
196
												<td class="text-right" style="width: 44px">
197
													<button type="button" class="btn btn-sm btn-outline-success" ng-click="org.urls.push(newUrl); newUrl=''" ng-disabled="!newUrl || org.urls.indexOf(newUrl) !== -1" ><i class="fa fa-plus"></i></button>
198
												</td>
199
											</tr>
200
										</tfoot>
201
									</table>
202
								</div>
203
							</div>
204
						</div>
205
					</fieldset>
206
					
207
					<button type="submit" class="btn btn-primary" ng-click="save()" ng-disabled="organizationForm.$invalid">save</button>
208
				</form>
209
			</div>
210
		</div>
211
	</div>
212
</div>
(4-4/9)