added disclaimet for planetlab europe users
[unfold.git] / portal / templates / onelab / onelab_registration_view.html
1 {% extends "layout.html" %}
2
3 {% block content %}        
4
5 <div class="row">
6         <div class="col-md-12">
7         <h1><img src="{{ STATIC_URL }}icons/user-xs.png" alt="User Registration" />User sign-up</h1>
8         </div>
9 </div>
10 <div class="row">
11         <div class="col-md-12">
12                 <p><strong>Questions? <a href="/portal/contact" >Contact us.</a></strong></p>
13   </div>
14 </div>
15 {% if errors %}
16 <ul>
17   {% for error in errors %}
18   <li>{{ error }}</li>
19   {% endfor %}
20 </ul>
21 {% endif %}
22 <div class="row">
23         <div class="col-md-12">
24                 
25                         <div class="form-group">
26                                 <form class="cmxform form-horizontal" id="registrationForm" method="post" enctype="multipart/form-data" role="form">
27                         {% csrf_token %}
28                                 <label for="authority_hrn" class="control-label">Organization</label>
29                                 <p></p>
30                                 <input id="authority_hrn" name="org_name" class="form-control" style="width:590px" value="{{ organization }}" 
31                                 title="Choose your organization (company/university) from the list that apears when you click in the field and start to type.
32                                  Use the arrow keys to scroll through the list; type part of the name to narrow down the list. If it is not in the list, 
33                                 please request its addition by clicking the link below. We will send an email to the managers that we have on record for 
34                                 your organization, asking them to validate your sign-up request." required/>
35                                 <p></p>
36                                 <p>Organization not listed? <a href="/portal/join">Request its addition now.</a></p>
37                         </div>
38         </div>
39 </div>
40
41 <div class="row">
42         <div class="col-md-6">
43         
44             <div class="form-group">
45                         <label for="firstname" class="control-label">Personal information</label>
46                         <p></p>
47                         <input type="text" name="firstname" class="form-control" style="width:350px" minlength="2" value="{{ first_name }}" placeholder="First name" required />
48             </div>
49             <div class="form-group">
50                         <input type="text" name="lastname" size="25" class="form-control" style="width:350px" minlength="2" value="{{ last_name }}" placeholder="Last name" required />
51             </div>
52                 <div class="form-group">
53                 <input type="email" name="email" size="25"  class="form-control" style="width:350px" value="{{ email }}" 
54                         title="Your e-mail address will be your identifier for logging in. We contact you to verify your account and then, occasionally, for important issues."
55                         placeholder="Email" required/>
56                 </div>
57         </div>  
58
59         <!-- LOGIN
60         TODO: Login should be suggested from user email or first/last name, and
61         checked for existence. In addition, the full HRN should be shown to the
62         user.
63     <div class="form-group">
64       <label for="login" class="col-xs-2 control-label">Login</label>
65       <div class="col-xs-4">
66           <input type="text" name="login" size="25" class="form-control" minlength="2" value="{{ login }}" placeholder="Login" required />
67       </div>
68       <div class="col-xs-6"><p class="form-hint">Enter your login</p></div>
69     </div>
70         -->
71         <div class="col-md-6">
72             <div class="form-group">
73               <label for="password" class="control-label">Authentication</label>
74                   <p></p>       
75               <input type="password"  id="password" name="password"   class="form-control" style="width:250px" minlength="4" value="{{ password }}" 
76                         title="Your password allows you to log in to this portal."
77                         placeholder="Password" required/>
78             </div>
79             <div class="form-group">
80                         <input type="password"  id="confirmpassword" name="confirmpassword" style="width:250px"  minlength="4" class="form-control" value="" 
81                                 placeholder="Confirm password" required/>
82             </div>
83             <div class="form-group">
84                 <!--<label for="question" class="control-label">Keys</label> -->
85                         <select name="question" class="form-control" style="width:350px" id="key-policy" 
86                                 title="Your public/private key pair allows you to access the testbeds." required>        
87                                 <option value="generate">Generate my keys for me (recommended)</option>
88                                 <option value="upload">Upload my public key (advanced users only)</option>
89                         </select>
90             </div>
91             <div class="form-group" style="display:none;" id="upload_key">
92                 <label for="file" class="control-label">Upload public key</label>
93                 <input type="file" name="user_public_key" class="form-control" style="width:200px" id="user_public_key" required/>
94                 <br />
95                         <div class="alert alert-danger" id="pkey_del_msg">
96                                 In order for the portal to contact testbeds on your behalf, so as to list and reserve resources, you will need to 
97                                 <a href="http://trac.myslice.info/wiki/InstallSfa" target="_blank">delegate your public key to the portal.</a>
98                         </div>
99             </div>
100         </div>
101 </div>
102 <div class="row">
103         <div class="col-md-12">
104                 <div class="form-group">
105                         <p></p>
106                         <input type="checkbox" name="agreement" value="agreement" required/>&nbsp;&nbsp; I agree to the 
107                         <a href="#" data-toggle="modal" data-target="#myModal">terms and conditions.</a> 
108                 </div>
109         </div>
110 </div>
111 <div class="row">
112         <div class="col-md-10">
113                 <div class="form-group" id="register">
114                         <span class="glyphicon glyphicon-info-sign"></span> &nbsp;
115                 If you are a <b>PlanetLab Europe</b> fill in this form using the same email address that you currently use for your PlanetLab Europe account,
116                 your existing credentials will be used to validate your OneLab account.
117                 Please be sure to specify a different password for your new OneLab account.
118             </div>
119         </form> 
120         </div>
121 </div>
122 <div class="row">
123         <div class="col-md-12">
124                 <div class="form-group" id="register">
125                         <p></p> 
126                 <button class="submit btn btn-onelab" type="submit">Sign up</button>
127             </div>
128         </form> 
129         </div>
130 </div>
131         
132         
133         <!-- Modal - columns selector -->
134                 <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
135                         <div class="modal-dialog">
136                         <div class="modal-content">
137                                 <div class="modal-header">
138                                         <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
139                                                 <h4 class="modal-title" id="myModalLabel">Terms & Conditions</h4>
140                                 </div>
141                                 <div class="modal-body">
142                                                 <p align="left">
143                                         for OneLab Basic level service
144                                         <br/>
145                                         Version 0.6 of 20 May 2014
146                                                 <br>
147                                                 <a href="/portal/terms" target="_blank">[Printable format]</a>
148                                                 </p>
149                                         <h1 align="left">1 Context</h1>
150                                         <h2 align="left">1.1 OneLab</h2>
151                                         <p align="left">
152                                 OneLab is an experimental facility for testing new ideas and new technologies in the area of computer networking. It consists of a variety of types of
153                                 platforms, including:</p>
154                                         <ul type="disc">
155                                 <li>
156                                 <strong>internet overlay testbeds</strong>
157                                 , testbeds that offer virtual machines distributed across locations in different countries, allowing users to deploy overlays on the internet;
158                                 </li>
159                                 <li>
160                                 <strong>wireless testbeds</strong>
161                                 , testbeds that consist of clusters of computers that are within Wi-Fi communication range of each other, either in an office environment or in an
162                                 isolated setting;
163                                 </li>
164                                 <li>
165                                 <strong>internet of things testbeds</strong>
166                                 , testbeds that consist of embedded computing nodes with sensor capabilities, communicating wirelessly in an isolated environment;
167                                 </li>
168                                 <li>
169                                 <strong>emulation testbeds,</strong>
170                                 computing clusters that offer virtual machines on servers that are interconnected by a high speed switch, enabling large scale network emulation.
171                                 </li>
172                                         </ul>
173                                         <p align="left">
174                                 This list of types of platforms is subject to change, and the current list, along with the identities of the specific platforms of each type, can be found
175                                 on the OneLab website (onelab.eu).</p>
176                                         <p align="left">
177                                 Each platform has its own owners, and OneLab is the grouping of these platforms through a consortium of institutions. The OneLab consortium is coordinated
178                                 by UPMC Sorbonne Universités. It operates on a not-for-profit basis.</p>
179                                         <p align="left">
180                                 Access to OneLab may also provide access to additional platforms that are not part of OneLab, due to a federation agreement between OneLab and the owners
181                                 of those platforms.</p>
182                                         <h2 align="left">1.2 Fee-free Basic level service</h2>
183                                         <p align="left">These terms and conditions define and apply to OneLab's Basic level service, which is available free of charge.</p>
184                                         <p align="left">
185                                 Users who would like additional services are encouraged to contact support@onelab.eu. Some additional services require a written agreement, but are
186                                 otherwise free. Others require the payment of fees or in-kind contributions. (An example of an in-kind contribution is the hosting of a PlanetLab Europe
187                                 server node.)</p>
188                                         <h2 align="left">1.3 Managers and standard users</h2>
189                                         <p align="left">
190                                 There are two classes of OneLab user: the manager and the standard user. OneLab grants access rights to managers, who, in turn, provide access rights to
191                                         standard users. Examples are: for a small enterprise, an executive may be the manager and the employees may be standard users; for a research team, a
192                                 senior scientist (faculty member or research scientist) may be a manager and doctoral students and other members of the team may be standard users; for a
193                                 university course, a professor may be a manager and the students may be standard users.</p>
194                                         <h2 align="left">1.4 These terms and conditions</h2>
195                                         <p align="left">
196                                 Acceptance of these terms and conditions is a condition of obtaining OneLab Basic level user service. They are posted to the OneLab portal site
197                                 (portal.onelab.eu). They may be changed without other notice than the posting of a new version to the portal site.</p>
198                                         <h1 align="left">2 Services provided by OneLab</h1>
199                                         <h2 align="left">2.1 Access to the experimental facility</h2>
200                                         <p align="left">
201                                 OneLab provides users with access to the platforms that make up the experimental facility. Each platform owner determines the specifics of this access (for
202                                 example, how many nodes are available to a user, what happens in case of oversubscription, etc.), with the proviso that Basic level service requires that
203                                         users be able to conduct meaningful experiments on every OneLab testbed.</p>
204                                         <p align="left">
205                                 Basic level service may also provide access to platforms that are federated with OneLab, but such access depends upon the terms of the federation
206                                 agreements with those platforms, which may require that the user have a higher level of service in order to gain access. For example, Basic level service
207                                 provides access to PlanetLab Europe, a OneLab platform, without providing access to PlanetLab Central, a federated platform. Users wanting full access
208                                 across the global PlanetLab system should contact support@onelab.eu to arrange to enter into a PlanetLab Europe membership agreement.</p>
209                                         <p align="left">OneLab's role is to facilitate access to the platforms. Specifically, it provides each user with:</p>
210                                         <ul>
211                                 <li align="left">
212                                 <strong>a single account,</strong>
213                                 the credentials for which can be used to access all of the OneLab testbeds;
214                                 </li>
215                                 <li align="left">
216                                 <strong>tools through which to access the testbeds</strong>
217                                 , including, notably, a web-based portal (portal.onelab.eu) that allows a user to see the resources available on each testbed and to reserve them,
218                                 along with a number of experiment control tools that a user can employ to deploy an experiment on those resources;
219                                 </li>
220                                 <li align="left">
221                                 <strong>support</strong>
222                                 , with documentation on how to use the tools, pointers to documentation for individual testbeds, and a helpdesk to respond to user questions.
223                                 </li>
224                                         </ul>
225 <p align="left">
226     Additional support, such as accompaniment through the design and deployment of experiments and the interpretation of their results, is available through
227     higher levels of service.
228 </p>
229 <h2 align="left">
230     2.2 Best effort, without guarantees
231 </h2>
232 <p align="left">
233     OneLab and the owners of the individual OneLab testbeds do their best to provide the services outlined here, with the understanding that Basic level
234     service offers no guarantees. Users should clearly understand the following limitations.
235 </p>
236 <ul type="disc">
237     <li>
238         <strong>Reliability:</strong>
239         OneLab does not provide any guarantees with respect to the reliability of the portal, of other tools, or of the individual nodes on platforms. These
240         may be taken down for maintenance, rebooted, or reinstalled at any time. Reinstallation implies that disks are wiped, meaning that users should not
241         consider a local disk to be a persistent form of storage.
242     </li>
243     <li>
244         <strong>Fitness:</strong>
245         OneLab does not guarantee that the platforms are suitable for the experiments that users intend to conduct. There may be limitations in the
246         technologies that are offered that prevent certain types of experiments from being carried out.
247     </li>
248     <li>
249         <strong>Privacy</strong>
250         : OneLab does not guarantee the privacy of traffic generated on the platforms (e.g., wireless signals, packets). Unless otherwise specified by an
251         individual platform owner, users should assume that traffic is monitored and logged. Such monitoring may be done intentionally, for example, to allow
252         platform administrators as well as other users to investigate abuse.
253     </li>
254 </ul>
255 <p align="left">
256     Users who seek such guarantees are invited to consider a higher level of service.
257 </p>
258 <h2 align="left">
259     2.3 Limitedliability
260 </h2>
261 <p align="left">
262     In no event shall the partners of the OneLab consortium be liable to any user for any consequential, incidental, punitive, or lost profit damages, or for
263     any damages arising out of loss of use or loss of data, to the extent that such damages arise out of the activities of OneLab consortium partners, or any
264     breach of the present terms and conditions, even if the consortium partner has been advised of the possibility of such damages.
265 </p>
266 <p align="left">
267     Nothing contained in these terms and conditions shall be deemed as creating any rights or liabilities in or for third parties who are not Basic level users
268     of OneLab.
269 </p>
270 <h1 align="left">
271     3 Acceptable use policy
272 </h1>
273 <h2 align="left">
274     3.1 Responsibilities of managers and standard users
275 </h2>
276 <p align="left">
277     OneLab creates and administers accounts for managers and delegates to managers the responsibility for creating and administering accounts for standard
278     users. Both managers and standard users are required to follow OneLab's acceptable use policy. In addition, managers are fully responsible for the
279     activities of the standard users whose accounts they create.
280 </p>
281 <p align="left">
282     A manager is expected to grant user access only an individual with whom he or she has a working relationship. In general, this means an individual who
283     works for the same institution as the manager, or, in the case of higher education and research, an individual who is a student at the university where the
284     manager works. Managers may also grant access to individuals from other institutions, provided that they are collaborating on a common project on OneLab.
285     If there is a doubt, a manager should refer the question to support@onelab.eu.
286 </p>
287 <h2 align="left">
288     3.2 Types of use
289 </h2>
290 <p align="left">
291     OneLab may be used by enterprise, by scientific researchers, and by educators.
292 </p>
293 <p align="left">
294     OneLab may be used for pre-commercial research and development. In keeping with OneLab's not-for-profit status, it may not be used to deploy services that
295     are designed to generate a commercial profit.
296 </p>
297 <p align="left">
298     Not-for-profit use of OneLab to deploy services that are designed to generate revenue requires prior approval through a written agreement, and thus may not
299     be carried out on a Basic level account. Interested users are invited to contact support@onelab.eu.
300 </p>
301 <p align="left">
302     OneLab may be used for scientific research.
303 </p>
304 <p align="left">
305     OneLab may be used to host lab exercises for university courses.
306 </p>
307 <p align="left">
308     Questions about other types of use should be addressed to support@onelab.eu.
309 </p>
310 <h2 align="left">
311     3.3 Applicable laws and regulations
312 </h2>
313 <p align="left">
314     OneLab is managed, and the portal is hosted, in France. Information regarding the countries in which individual testbeds are managed and hosted is
315     available from those testbeds. Users are responsible for being aware of the countries in which their experiments are deployed and for ensuring that their
316     use of OneLab fully conforms to the laws and regulations of those countries, as well as the laws and regulations of the country in which they themselves
317     are present when conducting their experiments.
318 </p>
319 <p align="left">
320     Above and beyond specific national laws, the activities email spamming, phishing through web services, and all types of Internet fraud are prohibited on
321     OneLab.
322 </p>
323 <h2>
324     3.4 Security and accounting mechanisms
325 </h2>
326 <p align="left">
327     Users are expected to respect the security and accounting mechanisms put in place by OneLab, its platforms, and federated platforms. For example, access to
328     PlanetLab Europe is designed to take place through the SSH cryptographically-secured connection protocol, which uses public/private key pair
329     authentication, and so users should not attempt to bypass this mechanism. As another example, OneLab's notion of a "slice" associates a set of resources
330     with the group of users who have reserved those resources, and users should not attempt to obscure the identities of participants in a slice.
331 </p>
332 <p align="left">
333     Hacking attempts against the OneLab portal and testbeds are not permitted. This includes "red team" (hacker test) experiments.
334 </p>
335 <h2>
336     3.5 Sharing of resources
337 </h2>
338 <p align="left">
339     OneLab is intended for ambitious experiments. Large numbers of resources and extended leases on resources may legitimately be granted in order to carry
340     these out. At the same time, OneLab and its testbeds are shared environments, and when there is contention for resources, limits must be imposed.
341 </p>
342 <p align="left">
343     Each OneLab platform sets its own policies for handling resource contention. As a general rule, users are encouraged to design their experiments to use
344     resources efficiently. In particular, spinning/busy-waiting techniques for extended periods of time are strongly discouraged. Some resource contention
345     policies (e.g., PlanetLab Europe's) terminate the jobs that are using the most resources in the case of contention.
346 </p>
347 <h2>
348     3.6 Internet-connected platforms
349 </h2>
350 <p align="left">
351     Some of OneLab's platforms allow experiments to take place on resources that have access to the public internet. These experiments can potentially generate
352     traffic to, and receive traffic from, any host or router in the internet.<a></a><a id="_anchor_1" href="#_msocom_1" name="_msoanchor_1">[LB1]</a>
353 </p>
354 <p align="left">
355     Furthermore, some internet-connected platforms (e.g., PlanetLab Europe) consist of servers that are hosted by a large number of member institutions.
356 </p>
357 <p align="left">
358     The accessibility of internet-connected platforms and the distributed hosting model of some of these platforms imply certain responsibilities on the part
359     of users, as detailed below.
360 </p>
361 <h3>
362     3.6.1 General guidance
363 </h3>
364 <p align="left">
365     A good litmus test when considering whether an experiment is appropriate for such internet-connected platforms is to ask what the network administrator at
366     one's own organisation would say about the experiment running locally. If the experiment disrupts local activity (e.g., uses more than its share of the
367     site's internet bandwidth) or triggers complaints from remote network administrators (e.g., performs systematic port scans), then it is not appropriate for
368     such internet-connected platforms.
369 </p>
370 <p align="left">
371     It is the responsibility of the user and the user's manager to ensure that an application that will run on an internet-connected platform is tested and
372     debugged in a controlled environment, to better understand its behaviour prior to deployment.
373 </p>
374 <h3>
375     3.6.2 Standards of network etiquette
376 </h3>
377 <p align="left">
378     Internet-connected platforms are designed to support experiments that generate unusual traffic, such as network measurements. However, it is expected that
379     all users adhere to widely accepted standards of network etiquette in an effort to minimise complaints from network administrators. Activities that have
380     been interpreted as worm and denial-of-service attacks in the past (and should be avoided) include sending SYN packets to port 80 on random machines,
381     probing random IP addresses, repeatedly pinging routers, overloading bottleneck links with measurement traffic, and probing a single target machine from
382     many nodes.
383 </p>
384 <p align="left">
385     For internet-connected platforms that have a distributed hosting model, each host institution will have its own acceptable use policy. Users should not
386     knowingly violate such local policies. Conflicts between local policies and OneLab's stated goal of supporting research into wide-area networks should be
387     brought to the attention of OneLab administrators at support@onelab.eu.
388 </p>
389 <h3>
390     3.6.3 Specific network usage rules
391 </h3>
392 <p align="left">
393     It is not allowed to use one or more nodes of an internet-connected platform to generate a high number of network flows or flood a site with high traffic
394     to the point of interfering with its normal operation. Use of congestion-controlled flows for large transfers is highly encouraged.
395 </p>
396 <p align="left">
397     It is not allowed to perform systematic or random port or address block scans from an internet-connected platform.
398 </p>
399 <p align="left">
400     For internet-connected platforms that use a distributed hosting model, it is not allowed to spoof or sniff traffic on a hosted server or on the network the
401     server belongs to.
402 </p>
403 <p align="left">
404     Access to a server on a distributed hosting platform may not be used to gain access to other servers or networked equipment that are not part of the
405     testbed.
406 </p>
407 <h2>
408     3.7 Wireless platforms
409 </h2>
410 <p align="left">
411     Wireless-connected platforms give users access to nodes that communicate via Wi-Fi and other wireless technologies. They may be capable of detecting
412     wireless activity in the neighbourhood of those nodes: traffic generated by other users of the platform or by individuals not associated with the platform.
413     In general, much of the traffic will be encrypted, with certain aspects (such as SSIDs) not encrypted, but it is also possible that there will be fully
414     unencrypted traffic. They may also be capable of generating wireless activity that reaches equipment outside of the testbed.
415 </p>
416 <p align="left">
417     Furthermore, some wireless-connected platforms may have built-in limitations to prevent them from generating signals at a strength that exceeds health and
418     safety regulations.
419 </p>
420 <p align="left">
421     These characteristics of wireless-connected platforms imply certain responsibilities on the part of users, as detailed below.
422 </p>
423 <h3>
424     3.7.1 Specific network usage rules
425 </h3>
426 <p align="left">
427     Experimenters may make no attempt to defeat the encryption of encrypted third-party traffic. Furthermore, experimenters must treat with utmost discretion
428     any unencrypted traffic. Limited metadata can be recorded for the bona fide purposes of an experiment, but under no case should third party communications
429     be recorded.
430 </p>
431 <p align="left">
432     No attempt may be made to reverse engineer traffic in order to learn the identities of the parties who have generated the traffic.
433 </p>
434 <p align="left">
435     Wireless-connected platforms may not be used to gain access to any network equipment that is not part of the testbed itself.
436 </p>
437 <p align="left">
438     It is not allowed to perform systematic or random scans of wireless networks that are not part of a wireless-connected platform. Similarly, it is not
439     allowed to spoof or sniff wireless traffic of the institution that hosts a wireless-connected platform or of other networks in the proximity.
440 </p>
441 <p align="left">
442     Care must be taken so that traffic on wireless-connected platforms does not interfere with the normal functioning of network equipment that is not part of
443     the testbed itself.
444 </p>
445 <p align="left">
446     No attempt may be made to defeat the mechanisms that limit signal strength on wireless-connected platforms.
447 </p>
448 <h2>
449     3.8 Handling suspected violations
450 </h2>
451 <p align="left">
452     Suspected violations of the OneLab acceptable use policy should be reported to support@onelab.eu.
453 </p>
454 <p align="left">
455     Upon notification or detection of a possible violation, OneLab management will attempt to understand if a violation has in fact occurred. To do so,
456     management will freely communicate with the users concerned, the operators of the platforms concerned, as well as any third parties that might be involved.
457     An example of a third party is a network operator who detects what they believe to be unauthorized traffic emanating from a OneLab platform.
458 </p>
459 <p align="left">
460     The priority is to resolve any real or apparent violations amicably. However, if OneLab management believes that a violation may have occurred, it can, at
461     its sole discretion, and without prior notice, apply any of the following measures:
462 </p>
463 <ul type="disc">
464     <li>
465         notification of the users of the concerned slice (set of resources);
466     </li>
467     <li>
468         disabling of the concerned slice;
469     </li>
470     <li>
471         disabling an individual user's account;
472     </li>
473     <li>
474         reporting of the user's activity to his/her manager;
475     </li>
476     <li>
477         disabling of the manager's account and all user accounts for which the manager is responsible;
478     </li>
479     <li>
480         disabling of all accounts associated with the user's institution.
481     </li>
482 </ul>
483 <p align="left">
484     In the case of suspected illegal activity, OneLab management might need, without prior notice, to notify the relevant authorities.
485 </p>
486 <div>
487     <div>
488         <div id="_com_1">
489         </div>
490     </div>
491 </div>
492                                 </div>
493                                 <div class="modal-footer">
494                                         <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
495                                 </div>
496                         </div>
497                         </div>
498                 </div>
499
500     
501 <script>
502 jQuery(document).ready(function(){
503     var availableTags = [
504     {% if authorities %}
505         {% for authority in authorities %}
506             {% if authority.name %}
507                 {value:"{{ authority.name }}",label:"{{authority.name}}"},
508                         // to show only full name
509            // {% else %}
510            //     {value:"{{ authority.authority_hrn }}",label:"{{authority.authority_hrn}}"},
511             {% endif %}
512         {% endfor %}    
513     {% else %}
514         {value:"",label:"No authority found !!!"}
515     {% endif %}
516     ];
517         // sorting the list
518         availableTags.sort(function(a,b){
519                 var nameA=a.value.toLowerCase(), nameB=b.value.toLowerCase();
520                 if (nameA < nameB) {
521                 return -1;
522                 }
523                 if (nameA > nameB) {
524                 return 1;
525                 }
526         return 0;
527         }); 
528         // auto-complete the form
529     jQuery( "#authority_hrn" ).autocomplete({
530       source: availableTags,
531       minLength: 0,
532       change: function (event, ui) {
533           if(!ui.item){
534               //http://api.jqueryui.com/autocomplete/#event-change -
535               // The item selected from the menu, if any. Otherwise the property is null
536               //so clear the item for force selection
537               jQuery("#authority_hrn").val("");
538           }
539       }
540       //select: function( event, ui ) {console.log(jQuery(this))}
541     });
542         // for hover texts
543         jQuery('[title!=""]').qtip();
544 });
545 </script>
546 {% endblock %}
547