FIX: pending_authority validation error and add authority password length
authorYasin Rahman <loic.baron@lip6.fr>
Mon, 18 May 2015 10:02:59 +0000 (12:02 +0200)
committerYasin Rahman <loic.baron@lip6.fr>
Mon, 18 May 2015 10:02:59 +0000 (12:02 +0200)
portal/actions.py
portal/templates/join_view.html

index 4dda370..0375874 100644 (file)
@@ -677,13 +677,14 @@ def portal_validate_request(wsgi_request, request_ids):
                 a = PendingAuthority.objects.get(id=request['id'])
                 ctx = { 
                     'site_name'     : a.site_name,
-                    'short_name'    : a.short_name,
-                    'url'           : a.url,
-                    'city'          : a.city,
-                    'country'       : a.country,                          
-                    'portal_url'    : a.current_site,
+                    #'short_name'    : a.short_name,
+                    #'url'           : a.url,
+                    'city'          : a.address_city,
+                    'country'       : a.address_country,                          
+                    #'portal_url'    : a.current_site,
                 }
-                user_email = a.email
+                # address_line1 contains the email of the user in pending_authority table
+                user_email = a.address_line1
 
                 PendingAuthority.objects.get(id=request['id']).delete()
                 
index 89d06ba..ff9dad4 100644 (file)
                style="width:200px" placeholder="Phone number"  maxlength="20" class="form-control" required>
     </div>
        <div class="form-group">
-               <input type="password"  id="password" name="pi_password"   class="form-control" style="width:200px" minlength="4" value="{{ password }}" placeholder="Password" required/>
+               <input type="password"  id="password" name="pi_password"   class="form-control" style="width:200px" minlength="8" value="{{ password }}" 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/>
+       <input type="password"  id="confirmpassword" name="confirmpassword" style="width:200px"  minlength="8" class="form-control" value="" placeholder="Confirm Password" required/>
        </div>
 
        </div>