FIBRE: updated to the new version, wip on institution page
[unfold.git] / portal / templates / registration_view.html
index 6fc4bf5..ee6c0d4 100644 (file)
@@ -9,8 +9,8 @@
 </div>
 <div class="row">
        <div class="col-md-12">
-               <h3>Questions? <a href="/portal/contact" >Contact us</a></h3>
-       </div>
+               <p><strong>Questions? <a href="/portal/contact" >Contact us.</a></strong></p>
+  </div>
 </div>
 {% if errors %}
 <ul>
   {% endfor %}
 </ul>
 {% endif %}
-   
-<form class="cmxform form-horizontal" id="registrationForm" method="post" enctype="multipart/form-data" role="form">
-{% csrf_token %}
-       <div class="form-group">
-               <label for="authority_hrn" class="control-label">Organization</label>
-               <input id="authority_hrn" name="authority_hrn" class="form-control" style="width:530px" value="{{ authority_hrn }}" required>
-               <p class="help-block">Start typing to find the name of your organization (company or university).<br> If it is not in the list, <a href="/portal/join">please add it.</a></p>
+<div class="row">
+       <div class="col-md-12">
+               
+                       <div class="form-group">
+                               <form class="cmxform form-horizontal" id="registrationForm" method="post" enctype="multipart/form-data" role="form">
+                       {% csrf_token %}
+                               <label for="authority_hrn" class="control-label">Organization</label>
+                               <p></p>
+                               <input id="authority_hrn" name="org_name" class="form-control" style="width:590px" value="{{ organization }}" 
+                               title="Choose your organization (company/university) from the list that apears when you click in the field and start to type.
+                                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, 
+                               please request its addition by clicking the link below. We will send an email to the managers that we have on record for 
+                               your organization, asking them to validate your sign-up request." required/>
+                               <p></p>
+                               <p>Organization not listed? <a href="/portal/join">Request its addition now.</a></p>
+                       </div>
        </div>
+</div>
 
-       <div class="row">
-       <div class="col-md-4">
-
-    <div class="form-group">
-               <label for="firstname" class="control-label">Personal Information</label>
-               <input type="text" name="firstname" class="form-control" style="width:200px" minlength="2" value="{{ firstname }}" placeholder="First Name" required />
-    </div>
-    <div class="form-group">
-               <input type="text" name="lastname" size="25" class="form-control" style="width:200px" minlength="2" value="{{ lastname }}" placeholder="Last Name" required />
-    </div>
-       <div class="form-group">
-       <input type="email" name="email" size="25"  class="form-control" style="width:200px" value="{{ email }}" 
-               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."
-               placeholder="Email" required/>
-       </div>
-</div> 
+<div class="row">
+       <div class="col-md-6">
+       
+           <div class="form-group">
+                       <label for="firstname" class="control-label">Personal information</label>
+                       <p></p>
+                       <input type="text" name="firstname" class="form-control" style="width:350px" minlength="2" value="{{ first_name }}" placeholder="First name" required />
+           </div>
+           <div class="form-group">
+                       <input type="text" name="lastname" size="25" class="form-control" style="width:350px" minlength="2" value="{{ last_name }}" placeholder="Last name" required />
+           </div>
+               <div class="form-group">
+               <input type="email" name="email" size="25"  class="form-control" style="width:350px" value="{{ email }}" 
+                       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."
+                       placeholder="Email" required/>
+               </div>
+       </div>  
 
        <!-- LOGIN
        TODO: Login should be suggested from user email or first/last name, and
       <div class="col-xs-6"><p class="form-hint">Enter your login</p></div>
     </div>
        -->
-<div class="col-md-4">
-    <div class="form-group">
-      <label for="password" class="control-label">Authentication</label>
-      <input type="password"  id="password" name="password"   class="form-control" style="width:200px" minlength="4" value="{{ password }}" 
-               title="Your password allows you to log in to this portal."
-               placeholder="Password" required/>
-    </div>
-    <div class="form-group">
-               <input type="password"  id="confirmpassword" name="confirmpassword" style="width:200px"  minlength="4" class="form-control" value="" 
-                       placeholder="Confirm Password" required/>
-    </div>
-    <div class="form-group">
-       <!--<label for="question" class="control-label">Keys</label> -->
-               <select name="question" class="form-control" style="width:200px" id="key-policy" 
-                       title="Your public/private key pair allows you to access the testbeds." required>        
-                       <option value="generate">Generate my keys for me (recommended)</option>
-                       <option value="upload">Upload my public key (advanced users only)</option>
-               </select>
-    </div>
-    <div class="form-group" style="display:none;" id="upload_key">
-       <label for="file" class="control-label">Upload public key</label>
-       <input type="file" name="user_public_key" class="form-control" style="width:200px" id="user_public_key" required/>
-       <br />
-               <div class="alert alert-danger" id="pkey_del_msg">
-                       In order for the portal to contact testbeds on your behalf, so as to list and reserve resources, you will need to i
-                       <a href="http://trac.myslice.info/wiki/InstallSfa" target="_blank">delegate your public key to the portal.</a>
-               </div>
-    </div>
+       <div class="col-md-6">
+           <div class="form-group">
+             <label for="password" class="control-label">Authentication</label>
+                 <p></p>       
+             <input type="password"  id="password" name="password"   class="form-control" style="width:250px" minlength="4" value="{{ password }}" 
+                       title="Your password allows you to log in to this portal."
+                       placeholder="Password" required/>
+           </div>
+           <div class="form-group">
+                       <input type="password"  id="confirmpassword" name="confirmpassword" style="width:250px"  minlength="4" class="form-control" value="" 
+                               placeholder="Confirm password" required/>
+           </div>
+           <div class="form-group">
+               <!--<label for="question" class="control-label">Keys</label> -->
+                       <select name="question" class="form-control" style="width:350px" id="key-policy" 
+                               title="Your public/private key pair allows you to access the testbeds." required>        
+                               <option value="generate">Generate my keys for me (recommended)</option>
+                               <option value="upload">Upload my public key (advanced users only)</option>
+                       </select>
+           </div>
+           <div class="form-group" style="display:none;" id="upload_key">
+               <label for="file" class="control-label">Upload public key</label>
+               <input type="file" name="user_public_key" class="form-control" style="width:200px" id="user_public_key" required/>
+               <br />
+                       <div class="alert alert-danger" id="pkey_del_msg">
+                               In order for the portal to contact testbeds on your behalf, so as to list and reserve resources, you will need to 
+                               <a href="http://trac.myslice.info/wiki/InstallSfa" target="_blank">delegate your public key to the portal.</a>
+                       </div>
+           </div>
        </div>
+</div>
+<div class="row">
+       <div class="col-md-12">
+               <div class="form-group">
+                       <p></p>
+                       <input type="checkbox" name="agreement" value="agreement" required/>&nbsp;&nbsp; I agree to the 
+                       <a href="#" data-toggle="modal" data-target="#myModal">terms and conditions.</a> 
+               </div>
        </div>
-       <div class="form-group">
-               <input type="checkbox" name="agreement" value="agreement" required/> I agree to the 
-               <button class="btn btn-primary btn-xs" data-toggle="modal" data-target="#myModal">terms and conditions</button> 
+</div>
+<div class="row">
+       <div class="col-md-12">
+               <div class="form-group" id="register">
+                       <p></p> 
+               <button class="submit btn btn-onelab" type="submit">Sign up</button>
+           </div>
+       </form> 
        </div>
+</div>
+       
+       
        <!-- Modal - columns selector -->
                <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                        <div class="modal-dialog">
                                </div>
                                <div class="modal-body">
                                                <p align="left">
-                                       TERMS AND CONDITIONS
-                                       <br/>
                                        for OneLab Basic level service
                                        <br/>
                                        Version 0.6 of 20 May 2014
+                                               <br>
+                                               <a href="/portal/terms" target="_blank">[Printable format]</a>
                                                </p>
                                        <h1 align="left">1 Context</h1>
                                        <h2 align="left">1.1 OneLab</h2>
     Users who seek such guarantees are invited to consider a higher level of service.
 </p>
 <h2 align="left">
-    <a name="_Toc261537715">2.3 Limited</a>
-    liability
+    2.3 Limitedliability
 </h2>
 <p align="left">
     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
                        </div>
                </div>
 
-    <div class="form-group" id="register">
-      <button class="submit btn btn-default" type="submit">Sign up</button>
-    </div>
-  </form>  
-</div>
+    
 <script>
 jQuery(document).ready(function(){
     var availableTags = [
     {% if authorities %}
         {% for authority in authorities %}
             {% if authority.name %}
-                {value:"{{ authority.authority_hrn }}",label:"{{authority.name}}"},
+                {value:"{{ authority.name }}",label:"{{authority.name}}"},
             {% else %}
                 {value:"{{ authority.authority_hrn }}",label:"{{authority.authority_hrn}}"},
             {% endif %}
@@ -479,6 +502,21 @@ jQuery(document).ready(function(){
         {value:"",label:"No authority found !!!"}
     {% endif %}
     ];
+
+    console.log(availableTags);
+
+       // sorting the list
+       availableTags.sort(function(a,b){
+               var nameA=a.value.toLowerCase(), nameB=b.value.toLowerCase();
+               if (nameA < nameB) {
+               return -1;
+               }
+               if (nameA > nameB) {
+               return 1;
+               }
+       return 0;
+       }); 
+       // auto-complete the form
     jQuery( "#authority_hrn" ).autocomplete({
       source: availableTags,
       minLength: 0,
@@ -492,6 +530,8 @@ jQuery(document).ready(function(){
       }
       //select: function( event, ui ) {console.log(jQuery(this))}
     });
+       // for hover texts
+       jQuery('[title!=""]').qtip();
 });
 </script>
 {% endblock %}