-
Notifications
You must be signed in to change notification settings - Fork 0
/
organization-edit.xhtml
405 lines (405 loc) · 16.7 KB
/
organization-edit.xhtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="/callimachus/template.xsl"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:calli="http://callimachusproject.org/rdf/2009/framework#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:vcard="http://www.w3.org/2006/vcard/ns#"
xmlns:gr="http://purl.org/goodrelations/v1#"
xmlns:directory="http://dir.w3.org/rdf/2012/directory/">
<head>
<title resource="?this">Editing {gr:legalName}</title>
<script type="text/javascript">
jQuery(function($){
if ($('#unit').val()) {
$('#units').hide();
} else {
$('#unit').parent().hide();
}
});
function updateLabel() {
var legal = $('#legal').val();
var unit = $('#unit').val();
var label = legal;
if (unit) {
label = label + ' ' + unit;
}
$('#label').val(label);
$('#fn').val(label);
$('#name').val(legal);
}
</script>
</head>
<body resource="?this">
<div class="container">
<div class="page-header">
<h1>{gr:legalName} <small>{vcard:organization-unit}</small></h1>
</div>
<form id="form" resource="?this" typeof="vcard:Organization vcard:VCard" method="POST" enctype="application/sparql-update">
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<h4 for="name">Legal Name</h4>
<input id="legal" type="text" autofocus="autofocus" required="required" value="{gr:legalName}" class="form-control" onchange="updateLabel()" />
<input id="label" type="hidden" value="{rdfs:label}" class="form-control" />
<input id="fn" type="hidden" value="{vcard:fn}" class="form-control" />
<input id="name" type="hidden" value="{vcard:organization-name}" class="form-control" />
</div>
<div class="form-group">
<h4 for="orgtype">Type of Organization</h4>
<select id="orgtype" rel="directory:isOrganizationType" class="form-control">
<option selected="selected" about="?orgtype" rev="calli:hasComponent" resource="type-of-organization/" property="skos:prefLabel" />
</select>
</div>
<div class="form-group">
<label for="unit">Business Unit</label>
<input type="text" id="unit" value="{vcard:organization-unit}" title="The name of a unit, division, department, or group within an organization" />
</div>
<div class="form-group">
<h4 for="url">Web site URL</h4>
<input id="url" type="url" required="required" value="{vcard:url}" class="form-control" />
</div>
<div class="form-group">
<h4 for="email">Email</h4>
<input id="email" type="email" value="{vcard:workEmail}" title="Preferred e-mail address for contact" class="form-control" />
</div>
<div class="form-group">
<h4 for="tel">Telephone</h4>
<input id="tel" type="text" placeholder="+country code-area-number" value="{vcard:workTel}" class="form-control" />
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<h4 for="note">Additional Information</h4>
<textarea id="note" rows="3" class="form-control" placeholder="Resources in this area, years experience, etc.">{vcard:note}</textarea>
</div>
<div class="form-group">
<h4 for="adr">
Address <a href="javascript:void(0)" title="Another Address" onclick="return calli.addResource(event,'#adr')"><span class="glyphicon glyphicon-plus" /></a>
</h4>
<div id="adr" rel="vcard:adr">
<div typeof="vcard:Address">
<input type="text" placeholder="street address" value="{vcard:street-address}" class="form-control" />
<input type="text" placeholder="extended address" value="{vcard:extended-address}" class="form-control" />
<input type="text" placeholder="po box" value="{vcard:post-office-box}" class="form-control" />
<input type="text" placeholder="city" value="{vcard:locality}" class="form-control" />
<input type="text" placeholder="state or province" value="{vcard:region}" class="form-control" />
<input type="text" placeholder="postal code" value="{vcard:postal-code}" class="form-control" />
<input type="hidden" value="{vcard:country-name}" />
<select onchange="$(this).parent().parent().children().children('div').find(':hidden').val(value).change()" class="form-control">
<option value="{vcard:country-name}">{vcard:country-name}</option>
<option>Afghanistan</option>
<option>Åland Islands</option>
<option>Albania</option>
<option>Algeria</option>
<option>American Samoa</option>
<option>Andorra</option>
<option>Angola</option>
<option>Anguilla</option>
<option>Antarctica</option>
<option>Antigua and Barbuda</option>
<option>Argentina</option>
<option>Armenia</option>
<option>Aruba</option>
<option>Australia</option>
<option>Austria</option>
<option>Azerbaijan</option>
<option>Bahamas</option>
<option>Bahrain</option>
<option>Bangladesh</option>
<option>Barbados</option>
<option>Belarus</option>
<option>Belgium</option>
<option>Belize</option>
<option>Benin</option>
<option>Bermuda</option>
<option>Bhutan</option>
<option>Bolivia, Plurinational State of</option>
<option>Bonaire, Sint Eustatius and Saba</option>
<option>Bosnia and Herzegovina</option>
<option>Botswana</option>
<option>Bouvet Island</option>
<option>Brazil</option>
<option>British Indian Ocean Territory</option>
<option>Brunei Darussalam</option>
<option>Bulgaria</option>
<option>Burkina Faso</option>
<option>Burundi</option>
<option>Cambodia</option>
<option>Cameroon</option>
<option>Canada</option>
<option>Cape Verde</option>
<option>Cayman Islands</option>
<option>Central African Republic</option>
<option>Chad</option>
<option>Chile</option>
<option>China</option>
<option>Christmas Island</option>
<option>Cocos (Keeling) Islands</option>
<option>Colombia</option>
<option>Comoros</option>
<option>Congo</option>
<option>Congo, the Democratic Republic of the</option>
<option>Cook Islands</option>
<option>Costa Rica</option>
<option>Côte d'Ivoire</option>
<option>Croatia</option>
<option>Cuba</option>
<option>Curaçao</option>
<option>Cyprus</option>
<option>Czech Republic</option>
<option>Denmark</option>
<option>Djibouti</option>
<option>Dominican Republic</option>
<option>Dominica</option>
<option>Ecuador</option>
<option>Egypt</option>
<option>El Salvador</option>
<option>Equatorial Guinea</option>
<option>Eritrea</option>
<option>Estonia</option>
<option>Ethiopia</option>
<option>Falkland Islands (Malvinas)</option>
<option>Faroe Islands</option>
<option>Fiji</option>
<option>Finland</option>
<option>France</option>
<option>French Guiana</option>
<option>French Polynesia</option>
<option>French Southern Territories</option>
<option>Gabon</option>
<option>Gambia</option>
<option>Georgia</option>
<option>Germany</option>
<option>Ghana</option>
<option>Gibraltar</option>
<option>Greece</option>
<option>Greenland</option>
<option>Grenada</option>
<option>Guadeloupe</option>
<option>Guam</option>
<option>Guatemala</option>
<option>Guernsey</option>
<option>Guinea-Bissau</option>
<option>Guinea</option>
<option>Guyana</option>
<option>Haiti</option>
<option>Heard Island and McDonald Islands</option>
<option>Holy See (Vatican City State)</option>
<option>Honduras</option>
<option>Hong Kong</option>
<option>Hungary</option>
<option>Iceland</option>
<option>India</option>
<option>Indonesia</option>
<option>Iran, Islamic Republic of</option>
<option>Iraq</option>
<option>Ireland</option>
<option>Isle of Man</option>
<option>Israel</option>
<option>Italy</option>
<option>Jamaica</option>
<option>Japan</option>
<option>Jersey</option>
<option>Jordan</option>
<option>Kazakhstan</option>
<option>Kenya</option>
<option>Kiribati</option>
<option>Korea, Democratic People's Republic of</option>
<option>Korea, Republic of</option>
<option>Kuwait</option>
<option>Kyrgyzstan</option>
<option>Lao People's Democratic Republic</option>
<option>Latvia</option>
<option>Lebanon</option>
<option>Lesotho</option>
<option>Liberia</option>
<option>Libya</option>
<option>Liechtenstein</option>
<option>Lithuania</option>
<option>Luxembourg</option>
<option>Macao</option>
<option>Macedonia, the former Yugoslav Republic of</option>
<option>Madagascar</option>
<option>Malawi</option>
<option>Malaysia</option>
<option>Maldives</option>
<option>Mali</option>
<option>Malta</option>
<option>Marshall Islands</option>
<option>Martinique</option>
<option>Mauritania</option>
<option>Mauritius</option>
<option>Mayotte</option>
<option>Mexico</option>
<option>Micronesia, Federated States of</option>
<option>Moldova, Republic of</option>
<option>Monaco</option>
<option>Mongolia</option>
<option>Montenegro</option>
<option>Montserrat</option>
<option>Morocco</option>
<option>Mozambique</option>
<option>Myanmar</option>
<option>Namibia</option>
<option>Nauru</option>
<option>Nepal</option>
<option>Netherlands</option>
<option>New Caledonia</option>
<option>New Zealand</option>
<option>Nicaragua</option>
<option>Nigeria</option>
<option>Niger</option>
<option>Niue</option>
<option>Norfolk Island</option>
<option>Northern Mariana Islands</option>
<option>Norway</option>
<option>Oman</option>
<option>Pakistan</option>
<option>Palau</option>
<option>Palestinian Territory, Occupied</option>
<option>Panama</option>
<option>Papua New Guinea</option>
<option>Paraguay</option>
<option>Peru</option>
<option>Philippines</option>
<option>Pitcairn</option>
<option>Poland</option>
<option>Portugal</option>
<option>Puerto Rico</option>
<option>Qatar</option>
<option>Réunion</option>
<option>Romania</option>
<option>Russian Federation</option>
<option>Rwanda</option>
<option>Saint Barthélemy</option>
<option>Saint Helena, Ascension and Tristan da Cunha</option>
<option>Saint Kitts and Nevis</option>
<option>Saint Lucia</option>
<option>Saint Martin (French part)</option>
<option>Saint Pierre and Miquelon</option>
<option>Saint Vincent and the Grenadines</option>
<option>Samoa</option>
<option>San Marino</option>
<option>Sao Tome and Principe</option>
<option>Saudi Arabia</option>
<option>Senegal</option>
<option>Serbia</option>
<option>Seychelles</option>
<option>Sierra Leone</option>
<option>Singapore</option>
<option>Sint Maarten (Dutch part)</option>
<option>Slovakia</option>
<option>Slovenia</option>
<option>Solomon Islands</option>
<option>Somalia</option>
<option>South Africa</option>
<option>South Georgia and the South Sandwich Islands</option>
<option>South Sudan</option>
<option>Spain</option>
<option>Sri Lanka</option>
<option>Sudan</option>
<option>Suriname</option>
<option>Svalbard and Jan Mayen</option>
<option>Swaziland</option>
<option>Sweden</option>
<option>Switzerland</option>
<option>Syrian Arab Republic</option>
<option>Taiwan, Province of China</option>
<option>Tajikistan</option>
<option>Tanzania, United Republic of</option>
<option>Thailand</option>
<option>Timor-Leste</option>
<option>Togo</option>
<option>Tokelau</option>
<option>Tonga</option>
<option>Trinidad and Tobago</option>
<option>Tunisia</option>
<option>Turkey</option>
<option>Turkmenistan</option>
<option>Turks and Caicos Islands</option>
<option>Tuvalu</option>
<option>Uganda</option>
<option>Ukraine</option>
<option>United Arab Emirates</option>
<option>United Kingdom</option>
<option>United States Minor Outlying Islands</option>
<option>United States</option>
<option>Uruguay</option>
<option>Uzbekistan</option>
<option>Vanuatu</option>
<option>Venezuela, Bolivarian Republic of</option>
<option>Viet Nam</option>
<option>Virgin Islands, British</option>
<option>Virgin Islands, U.S.</option>
<option>Wallis and Futuna</option>
<option>Western Sahara</option>
<option>Yemen</option>
<option>Zambia</option>
<option>Zimbabwe</option>
</select>
<a href="javascript:void(0)" title="Remove This Address" onclick="return calli.removeResource(event)"><span class="glyphicon glyphicon-remove" /></a>
</div>
</div>
</div>
</div>
<div class="col-sm-4">
<div id="units" class="form-group" dropzone="link s:text/uri-list" ondrop="return calli.insertResource(event)">
<h4>Business Units <a href="Unit" title="Create" onclick="return calli.createResource(event,'?create='+this.href)"><span class="glyphicon glyphicon-plus" /></a></h4>
<span about="?units" typeof="vcard:Organization">
<span class="label label-warning" property="vcard:organization-unit"></span>
</span>
</div>
<div id="person" class="form-group" dropzone="link s:text/uri-list" ondrop="return calli.insertResource(event)">
<h4>Contact Person <a href="Person" title="Create" onclick="return calli.createResource(event,'?create='+this.href)"><span class="glyphicon glyphicon-plus" /></a></h4>
<div rev="vcard:org">
<span typeof="foaf:Person" class="label label-warning">
<span property="foaf:name"></span>
<span property="vcard:role" content="?role">
({?role})
</span>
</span>
</div>
</div>
<div id="service" class="control-group" dropzone="link s:text/uri-list" ondrop="return calli.insertResource(event)">
<h4>Products, Services, or Projects <a href="ProductOrService" title="Create" onclick="return calli.createResource(event,'?create='+this.href)"><span class="glyphicon glyphicon-plus" /></a></h4>
<div rev="gr:hasManufacturer">
<span typeof="gr:ProductOrServiceModel" class="label label-warning">
<span property="rdfs:label"></span>
</span>
</div>
</div>
<div class="form-group" dropzone="link s:text/uri-list" ondrop="return calli.insertResource(event)">
<h4>Depiction <a href="?create=/callimachus/Image" title="Upload" onclick="return calli.createResource(event)"><span class="glyphicon glyphicon-plus" /></a></h4>
<div rel="foaf:depiction">
<span resource="?depiction" typeof="foaf:Image">
<img src="{?depiction}" />
</span>
</div>
</div>
<div class="form-group">
<h4 for="category">Experience</h4>
<div id="category" rel="vcard:category" class="sorted">
<label class="input" about="?category" style="display:block">
<input type="checkbox" name="category" checked="checked" />
<span rev="calli:hasComponent" resource="area-of-expertise/" property="skos:prefLabel" class="asc" />
</label>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12 form-group">
<button id="save" type="submit" class="btn btn-success">Save</button>
<button id="cancel" type="button" onclick="location.replace('?view')" class="btn">Cancel</button>
<button id="delete" type="button" onclick="calli.deleteResource(event)" class="btn btn-danger">Delete</button>
</div>
</div>
</form>
</div>
</body>
</html>