various cleanups and tweaks
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Mon, 9 Sep 2013 08:52:59 +0000 (10:52 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Mon, 9 Sep 2013 08:52:59 +0000 (10:52 +0200)
created an embryo of onelab.css from register.css (now renamed registration.css)

14 files changed:
auth/css/login.css
auth/templates/widget-login.html
plugins/form/static/css/form.css
portal/contactview.py
portal/homeview.py
portal/registrationview.py
portal/static/css/onelab.css [new file with mode: 0644]
portal/static/css/registration.css [moved from portal/static/css/register.css with 53% similarity]
portal/templates/contact.html
portal/templates/home-view.html
portal/templates/registration_view.html
portal/templates/slice_request.html
portal/templates/user_register.html
views/css/layout-unfold2.css

index 11444f7..0d0ba19 100644 (file)
@@ -1,3 +1,7 @@
+p.login-status {
+    font-weight: bold;
+}
+
 p.login { 
     font-style: italic;
 }
 p.login { 
     font-style: italic;
 }
index 80578e5..b79e33f 100644 (file)
@@ -1,14 +1,16 @@
 {% insert_str prelude 'css/login.css' %}
 <p class='login-status'> {{ state }} </p>
 <!--<a href="/" alt="Home"><img class="logo" src="{{ STATIC_URL }}img/myslice-logo.png" alt="MySlice" /></a>-->
 {% insert_str prelude 'css/login.css' %}
 <p class='login-status'> {{ state }} </p>
 <!--<a href="/" alt="Home"><img class="logo" src="{{ STATIC_URL }}img/myslice-logo.png" alt="MySlice" /></a>-->
+<div class='well well-lg'>
 <form action="/login/" method="post">
   {% csrf_token %}
   {% if next %}
   <input type="hidden" name="next" value="{{ next }}" />
   {% endif %}
 <form action="/login/" method="post">
   {% csrf_token %}
   {% if next %}
   <input type="hidden" name="next" value="{{ next }}" />
   {% endif %}
-  <p class='login'>username</p>
+  <p class='login'>Username</p>
   <input class='login' type="text" name="username" value="{{ username}}" /><br />
   <input class='login' type="text" name="username" value="{{ username}}" /><br />
-  <p class='login'>password</p>
+  <p class='login'>Password</p>
   <input class='login' type="password" name="password" value="" /><br />
   <input type="submit" value="Log In" />
 </form>
   <input class='login' type="password" name="password" value="" /><br />
   <input type="submit" value="Log In" />
 </form>
+</div>
index e8f79e2..89fd941 100644 (file)
@@ -1,5 +1,4 @@
 #commentForm {
 #commentForm {
-    
     margin:0 auto;
     width:800px;
     padding:10px;
     margin:0 auto;
     width:800px;
     padding:10px;
@@ -7,33 +6,35 @@
     overflow:auto;
     }    
 input {
     overflow:auto;
     }    
 input {
-        border:2px solid #456879;
-        height: 22px;
-        width: 200px;
-        font-size: 10px;
+    border:2px solid #456879;
+    height: 22px;
+    width: 200px;
+    font-size: 10px;
     }    
 label { 
     }    
 label { 
-        float: left;
-        font-weight: bold;
-        text-align: right;
-        margin-right: 20px;
-        width: 200px;
-        display: inline-block;
+    float: left;
+    font-weight: bold;
+    text-align: right;
+    margin-right: 20px;
+    width: 200px;
+    display: inline-block;
         
 }
         
 }
-
-label.error { float: none; color: red; padding-left: .5em; vertical-align: top; font-size: 12px; }
-
+label.error { 
+    float: none;
+    color: red;
+    padding-left: .5em;
+    vertical-align: top;
+    font-size: 12px; 
+}
 p {
 p {
-/*border-bottom:1px solid #B7DDF2;*/
-color:#666666;
-font-size:10px;
-margin-bottom:20px;
-padding-bottom:10px;
+    /*border-bottom:1px solid #B7DDF2;*/
+    color:#666666;
+    font-size:10px;
+    margin-bottom:20px;
+    padding-bottom:10px;
 }
 
 }
 
-
-
 legend {
     position: relative;
     top: -2px;
 legend {
     position: relative;
     top: -2px;
@@ -53,16 +54,16 @@ textarea:focus, input:focus {
 }
 
 .required{
 }
 
 .required{
-font-size:12pt;
+    font-size:12pt;
 }
 .submit {
 }
 .submit {
-/* float:right; */
-text-align: center;
-margin-top: 15px;
-margin-left: 180px;
+    /* float:right; */
+    text-align: center;
+    margin-top: 15px;
+    margin-left: 180px;
 }
 .field {
 }
 .field {
-padding:2px;
+    padding:2px;
 }
 .hint{
     display:none;
 }
 .hint{
     display:none;
@@ -79,4 +80,3 @@ padding:2px;
     -webkit-border-radius: 7px;
     border-radius: 7px;
     }
     -webkit-border-radius: 7px;
     border-radius: 7px;
     }
-    
index de6a317..0b459a3 100644 (file)
@@ -28,7 +28,8 @@ class ContactView (View):
                 recipients.append(email)
 
             from django.core.mail import send_mail
                 recipients.append(email)
 
             from django.core.mail import send_mail
-            send_mail("Onelab user submitted a query ", [first_name,last_name,affiliation,subject,message], email, recipients)
+            send_mail("Onelab user %s submitted a query "%email, 
+                      [first_name,last_name,affiliation,subject,message], email, recipients)
             return render(request,'contact_sent.html') # Redirect after POST
         else:
             return self._display (request, form)
             return render(request,'contact_sent.html') # Redirect after POST
         else:
             return self._display (request, form)
index f5735ab..a66cd36 100644 (file)
@@ -43,6 +43,6 @@ class HomeView (View):
         env['username']=the_user(request)
         env['topmenu_items'] = topmenu_items('', request)
         if state: env['state'] = state
         env['username']=the_user(request)
         env['topmenu_items'] = topmenu_items('', request)
         if state: env['state'] = state
-        elif not env['username']: env['state'] = "Please log in below..."
+        elif not env['username']: env['state'] = "Please sign in"
         return render_to_response('home-view.html',env, context_instance=RequestContext(request))
 
         return render_to_response('home-view.html',env, context_instance=RequestContext(request))
 
index 6074969..e85d44f 100644 (file)
@@ -116,7 +116,7 @@ class RegistrationView (View):
                 recipients.append(ctx['email'])
 
             msg = render_to_string('user_request_email.txt', ctx)
                 recipients.append(ctx['email'])
 
             msg = render_to_string('user_request_email.txt', ctx)
-            send_mail("Onelab New User request submitted", msg, email, recipients)
+            send_mail("Onelab New User request for %s submitted"%email, msg, email, recipients)
 
             return render(request, 'user_register_complete.html')
 
 
             return render(request, 'user_register_complete.html')
 
diff --git a/portal/static/css/onelab.css b/portal/static/css/onelab.css
new file mode 100644 (file)
index 0000000..70418c0
--- /dev/null
@@ -0,0 +1,16 @@
+/* Thierry's Note 
+it seems to me that most of the stuff here is not register-related,
+but general-purpose settings for an openlab style
+I've started to move over such stuff in onelab.css
+feel free to add to this collection
+*/
+
+/* these in general are div.well */
+div.onelab-title{
+    margin-top:20px;
+    margin-bottom:20px;
+    text-align: center;
+    border: 1px solid #61210B;
+    background-color: #e0f0f0;
+}
+
similarity index 53%
rename from portal/static/css/register.css
rename to portal/static/css/registration.css
index 4cb8079..958f26f 100644 (file)
@@ -1,44 +1,50 @@
+/* Thierry's Note 
+it seems to me that most of the stuff here is not register-related,
+but general-purpose settings for an openlab style
+I've started to move over such stuff in onelab.css
+feel free to add to this collection
+*/
 #commentForm {
 #commentForm {
-    
     margin:0 auto;
     width:800px;
     padding:10px;
     font-size:12pt;
     overflow:auto;
     margin:0 auto;
     width:800px;
     padding:10px;
     font-size:12pt;
     overflow:auto;
-    }    
+}    
+#register {
+    text-align: center;
+}
+/*
 input {
 input {
-        /*border:2px solid #456879;*/
-        height: 22px;
-        width: 200px;
-        /* font-size: 10px; */
-    }    
+    height: 22px;
+    width: 200px;
+}
+*/
+/*
+    border:2px solid #456879;
+    font-size: 10px; 
+*/
 label { 
 label { 
-        float: left;
-        font-weight: bold;
-        text-align: right;
-        margin-right: 20px;
-        width: 200px;
-        display: inline-block;
+    float: left;
+    font-weight: bold;
+    text-align: right;
+    margin-right: 20px;
+    width: 200px;
+    display: inline-block;
         
 }
         
 }
-.OneLabTitle{
-    padding-top: 12px;
-    background-color: #C1DAD7;
-    border: 1px solid #61210B;
-    text-align: center;
-}
-.fed4fireTitle{
-    padding-top: 12px;
-    background-color: orange; 
-    border: 1px solid #61210B;
-    text-align: center;
+label.error { 
+    float: none;
+    color: red;
+    padding-left: .5em;
+    vertical-align:
+    top; 
+    font-size: 12px; 
 }
 
 }
 
-label.error { float: none; color: red; padding-left: .5em; vertical-align: top; font-size: 12px; }
-
 p {
 p {
-/*border-bottom:1px solid #B7DDF2;*/
-color:#666666;
+    color:#666666;
+/* border-bottom:1px solid #B7DDF2; */
 /* font-size:10px; */
 /* margin-bottom:20px; */
 /* padding-bottom:10px; */
 /* font-size:10px; */
 /* margin-bottom:20px; */
 /* padding-bottom:10px; */
@@ -64,21 +70,22 @@ textarea:focus, input:focus {
     border: 2px solid #900;
 }
 
     border: 2px solid #900;
 }
 
-.required{
-font-size:12pt;
+.required {
+    font-size:12pt;
 }
 }
-.submit {
-/* float:right; */
-text-align: center;
-margin-top: 15px;
-margin-left: 250px;
+/* 
+   .submit {
+    text-align: center;
+    margin-top: 15px;
+    margin-left: 250px;
 }
 }
+*/
 .field {
 .field {
-padding:10px;
+    padding:10px;
 }
 }
-.hint{
+.hint {
     display:none;
     display:none;
-    }
+}
 .field:hover .hint {
     position: absolute;
     display: block;
 .field:hover .hint {
     position: absolute;
     display: block;
@@ -90,8 +97,4 @@ padding:10px;
     -moz-border-radius: 7px;
     -webkit-border-radius: 7px;
     border-radius: 7px;
     -moz-border-radius: 7px;
     -webkit-border-radius: 7px;
     border-radius: 7px;
-    }
-    
-
-    
-    
+}
index 6630f23..bd37415 100644 (file)
@@ -1,5 +1,4 @@
 {% extends "layout-unfold1.html" %}
 {% extends "layout-unfold1.html" %}
-{% load i18n %}
 
 {% block head %}
 {{ wizard.form.media }}
 
 {% block head %}
 {{ wizard.form.media }}
@@ -7,19 +6,24 @@
 
 {% block unfold1_main %}
 
 
 {% block unfold1_main %}
 
-<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/register.css" />
-<form class="cmxform" id="commentForm" action="#" method="post">{% csrf_token %}
-<fieldset>
-<div class="OneLabTitle" style="margin-bottom:20px;">
-         <h2>Onelab Support</h2>
-         <h4>If you have already registered then send an <a href="mailto:support@myslice.info"> e-mail </a>  or <a href="http://trac.myslice.info/" >visit us</a></h4>
+<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/onelab.css" />
+<!-- xxx ideally only onelab.css but ... xxx -->
+<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/registration.css" />
+<div class="onelab-title well well-lg">
+  <h2>Onelab Support</h2>
+  <h4>If you have already registered, then please <a href="mailto:support@myslice.info">send an e-mail</a>
+  or <a href="http://trac.myslice.info/" >visit us</a></h4>
 </div>
 
 </div>
 
+<div class='well'>
+<form class="cmxform" id="commentForm" action="#" method="post">{% csrf_token %}
+<fieldset>
 {{ form.as_p }}
 <p style="text-align: center;width: 80%;">
 {{ form.as_p }}
 <p style="text-align: center;width: 80%;">
-    <input type="submit" value="Submit" />
+  <input class="btn" type="submit" value="Submit" />
 </p>
 </fieldset>
 </form>
 </p>
 </fieldset>
 </form>
+</div>
 {% endblock %}
 
 {% endblock %}
 
index 42265a5..5072e52 100644 (file)
@@ -7,14 +7,15 @@
 {% endblock unfold2_margin %}
 
 {% block unfold2_main %}
 {% endblock unfold2_margin %}
 
 {% block unfold2_main %}
-<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/register.css" />
-<div style='padding: 20px;'>
-  <div class='OneLabTitle'>
-    <h2 style="font-weight: bold;">Welcome to the OneLab portal !</h2>
-    <h3>New to OneLab? Please <a href="/portal/register">register</a> or learn more about <a href="http://www.onelab.eu/" target="_blank">the project</a>.</h3>
-  </div>
-<p/>
-  <p>
+<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/onelab.css" />
+<!-- xxx ideally only onelab.css but ... xxx -->
+<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/registration.css" />
+<div class='well well-lg onelab-title'>
+  <h2 style="font-weight: bold;">Welcome to the OneLab portal !</h2>
+  <h4>New to OneLab? Please <a href="/portal/register">register</a> or learn more about <a href="http://www.onelab.eu/" target="_blank">the project</a>.</h3>
+</div>
+<div class='well'>
+<p>
 Experimentally-driven research is key to success in exploring the possible
 futures of the Internet. The OneLab initiative provides an open,
 general-purpose, shared experimental facility, both large-scale and
 Experimentally-driven research is key to success in exploring the possible
 futures of the Internet. The OneLab initiative provides an open,
 general-purpose, shared experimental facility, both large-scale and
@@ -23,8 +24,7 @@ the performance of their solutions. Based on the results of several different
 European and national projects, OneLab offers access to a range of  tools and
 testbeds including PlanetLab Europe, the NITOS wireless testbed, and other
 federated testbeds.
 European and national projects, OneLab offers access to a range of  tools and
 testbeds including PlanetLab Europe, the NITOS wireless testbed, and other
 federated testbeds.
-  </p>
-  <div class="item-separator"></div>
+</p>
 <p>This UI server is connected to the manifold backend running at <code>{{ manifold_url }}</code>.</p>
 </div>
 
 <p>This UI server is connected to the manifold backend running at <code>{{ manifold_url }}</code>.</p>
 </div>
 
index f40b831..7e1c1d7 100644 (file)
@@ -1,7 +1,9 @@
 {% extends "layout-unfold1.html" %}
 
 {% block head %}                
 {% extends "layout-unfold1.html" %}
 
 {% block head %}                
-<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/register.css" />
+<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/onelab.css" />
+<!-- xxx ideally only onelab.css but ... xxx -->
+<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/registration.css" />
 <script type="text/javascript" src="{{STATIC_URL}}/jquery.validate.js"></script> 
 <script type="text/javascript" src="{{STATIC_URL}}/my_account.register.js"></script>
 {% endblock %}                              
 <script type="text/javascript" src="{{STATIC_URL}}/jquery.validate.js"></script> 
 <script type="text/javascript" src="{{STATIC_URL}}/my_account.register.js"></script>
 {% endblock %}                              
 {% block unfold1_main %}        
 
 
 {% block unfold1_main %}        
 
 
-
 {% if errors %}
 {% if errors %}
-        <ul>
-            {% for error in errors %}
-            <li>{{ error }}</li>
-            {% endfor %}
-        </ul>
-    {% endif %}
+<ul>
+  {% for error in errors %}
+  <li>{{ error }}</li>
+  {% endfor %}
+</ul>
+{% endif %}
 
 
 
 
+<div class="onelab-title well well-lg">
+  <h2>OneLab Experimenter Registration</h2>
+  <h4>For First Line Support please <a href="/portal/contact" >Contact Support</a></h3>
+</div>
+   
+<div class="well">
 <form class="cmxform" id="commentForm" method="post" action="" enctype="multipart/form-data" >
 {% csrf_token %}
  <fieldset>
 <form class="cmxform" id="commentForm" method="post" action="" enctype="multipart/form-data" >
 {% csrf_token %}
  <fieldset>
-    <div class="OneLabTitle">
-        <h2>OneLab Experimenter Registration</h2>
-        <h3>For First Line Support please <a href="/portal/contact" >Contact Support</a></h3>
-    </div>
-   
    <div class="field">
      <label for="cname">First Name</label>
      <input type="text" id="firstname" name="firstname" size="25" class="required" minlength="2" value="{{ firstname}}" /> 
    <div class="field">
      <label for="cname">First Name</label>
      <input type="text" id="firstname" name="firstname" size="25" class="required" minlength="2" value="{{ firstname}}" /> 
       <input type="file" name="user_public_key" class="required" id="user_public_key"/>
       <p class="hint">Upload a valid public key</p>
    </div>
       <input type="file" name="user_public_key" class="required" id="user_public_key"/>
       <p class="hint">Upload a valid public key</p>
    </div>
-   <div class="field">
-     <input class="submit" type="submit" name="submit" value="Register"/>
+   <div class="field" id="register">
+     <input class="submit btn" type="submit"  name="submit" value="Register"/>
    </div>
  </fieldset>
 </form>
    </div>
  </fieldset>
 </form>
+</div>
 
 {% endblock %}
 
 
 {% endblock %}
 
index acaf2df..175863c 100644 (file)
@@ -7,18 +7,19 @@
 
 {% block unfold1_main %}
 
 
 {% block unfold1_main %}
 
-<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/register.css" />
+<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/onelab.css" />
+<!-- xxx ideally only onelab.css but ... xxx -->
+<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/registration.css" />
 
 
-<form id="commentForm" action="" method="post">{% csrf_token %}
-
-<div class="OneLabTitle" style="margin-bottom:20px;">
-         <h2>Request a Slice</h2>
+<div class="onelab-title well well-lg">
+  <h2>Request a Slice</h2>
 </div>
 
 </div>
 
+<div class='well'>
+<form id="commentForm" action="" method="post">{% csrf_token %}
 {{ form.as_p }}
 {{ form.as_p }}
-<p style="text-align: center;width: 80%;">
-       <input type="submit" value="Submit" />
-</p>
+<input class="btn" type="submit" value="Submit" />
 </form>
 </form>
+</div>
 
 {% endblock %}
 
 {% endblock %}
index dda88f8..baa5667 100644 (file)
@@ -1,5 +1,4 @@
 {% extends "layout-unfold1.html" %}
 {% extends "layout-unfold1.html" %}
-{% load i18n %}
 
 {% block head %}
 {{ wizard.form.media }}
 
 {% block head %}
 {{ wizard.form.media }}
 
   <h1>User registration</h1>
 
 
   <h1>User registration</h1>
 
-{% if envoi %}Votre message a bien été envoyé !{% endif %}
+{% if envoi %}Your registration message has been sent !{% endif %}
  
  
+<div class='well'>
 <form enctype="multipart/form-data" action="" method="post">{% csrf_token %}
 {{ form.as_p }}
 <input type="submit" value="Submit" />
 </form>
 <form enctype="multipart/form-data" action="" method="post">{% csrf_token %}
 {{ form.as_p }}
 <input type="submit" value="Submit" />
 </form>
+</div>
 
 {% endblock %}
 
 {% endblock %}
index d91775c..9346643 100644 (file)
@@ -3,5 +3,5 @@
 }
 #unfold2-margin {
     padding: 10;
 }
 #unfold2-margin {
     padding: 10;
-    background-color: #fff2ff;
+#    background-color: #fff2ff;
 }
 }