Revision 1b3398a0

b/snf-astakos-app/astakos/im/forms.py
91 91
        super(LocalUserCreationForm, self).__init__(*args, **kwargs)
92 92
        self.fields.keyOrder = ['email', 'first_name', 'last_name',
93 93
                                'password1', 'password2']
94
        if get_latest_terms():
95
            self.fields.keyOrder.append('has_signed_terms')
94

  
96 95
        if RECAPTCHA_ENABLED:
97 96
            self.fields.keyOrder.extend(['recaptcha_challenge_field',
98 97
                                         'recaptcha_response_field',])
99

  
98
        if get_latest_terms():
99
            self.fields.keyOrder.append('has_signed_terms')
100
            
100 101
        if 'has_signed_terms' in self.fields:
101 102
            # Overriding field label since we need to apply a link
102 103
            # to the terms within the label
b/snf-astakos-app/astakos/im/static/im/css/forms.css
21 21
form h2 span 								{ padding-bottom: 3px; }
22 22
form .form-row 								{ min-height: 30px; position: relative;}
23 23
form .form-row.submit 						{ margin: 22px 0 ;}
24
form .form-row .extra-link 					{ color: #808080; text-decoration: none; border: none; margin-top:15px; line-height:98%; display:inline-block; padding-top:15px;   float: right; }
24
form .form-row .extra-link 					{ color: #808080; text-decoration: none; border: none; margin-top:15px; line-height:98%; display:inline-block; padding-top:15px;   float: right; position:absolute; right:0; top:0; }
25 25
form .form-row .extra-link:hover			{ border-bottom:1px solid #808080;}
26 26
form .form-row label 						{ font-size: 1.1em; }
27 27
form.innerlabels label 						{ position: absolute; bottom: 11px; left: 1.5em; color: #808080 ; }
......
69 69
.form-errors.all .form-error 				{ position: relative; border-radius: 0; margin-bottom: 1.3em; padding: 0.5em; }
70 70
div.form-stacked 							{ margin-bottom: 4em; }
71 71
.checkbox-widget.checked 					{ background-color: #FF0000; background-image: url("../images/checkbox.png"); background-position: 50% 50%; }
72
.checkbox-widget 							{ border: 1px solid #808080; cursor: pointer; display: block; float: left; height: 25px; margin:5px 20px 0 0 ; width: 25px; }
72
.content a.checkbox-widget 					{ border: 1px solid #808080; cursor: pointer; display: block; float: left; height: 25px; margin:5px 20px 0 0 ; width: 25px; }
73 73
form.withlabels .checkbox-widget			{ margin-top:20px; }
74 74
form.innerlabels .checkbox-widget +  label	{ position:static; line-height:36px; color:#808080; }
75 75
form.innerlabels .checkbox-widget +  label + a	{ border-bottom:1px solid #F89A1C; font-size: 1.1em; }
......
84 84
form p										{ margin-bottom:0;position:relative;}
85 85
form input[readonly=true] 					{ /*background-color: #ddd;*/ color: #5e5e5e; }
86 86
#recaptcha_area 							{ margin-top:20px; } 
87
form.innerlabels .with-checkbox .checkbox-widget 	{ margin-top:15px; }
87
form.innerlabels .with-checkbox .checkbox-widget 	{  }
88 88
form.innerlabels .with-checkbox .checkbox-label		{ left:2.5em; top:17px; }
89
form.withlabels .with-checkbox .checkbox-widget		{ position:absolute; left:224px; top:0; }
89 90

  
90 91
form .extra-img								{ display:block; width:21px; height:21px; overflow:hidden;  position:absolute; }
91 92
form.withlabels .extra-img					{ left:440px; bottom:12px; }
......
105 106

  
106 107

  
107 108
/* custom captcha */
108
#okeanos_recaptcha								{ width:331px; border:1px solid #808080; margin:20px 0; position:relative; }
109
#okeanos_recaptcha								{ width:329px; border:1px solid #808080; margin:0 0 20px; position:relative; }
109 110
#okeanos_recaptcha #recaptcha_image				{ padding:15px 0; }
110 111
#okeanos_recaptcha label.recaptcha_only_if_image,
111 112
#okeanos_recaptcha label.recaptcha_only_if_audio{ position:absolute; top:auto; bottom:11px; }
......
127 128
    form.withlabels span.info 	   				{ left:222px; }
128 129
    form .extra-img	               				{ left:222px; }
129 130
    .form-error		              	 			{ margin-left:0!important; } 
131
    
130 132
}
131 133

  
132 134

  
b/snf-astakos-app/astakos/im/static/im/css/max480.css
2 2
.two-cols-blog .rt 								{ width:auto; padding-right:0; margin-left:0; float:none;}
3 3
.resources .categories ul li					{ display:block; float:none;}
4 4
.container .navigation ul+ul					{ margin-top:20px}
5

  
6
/* forms */
7
form .form-row .extra-link						{   float:none; position:static; margin-left:15px;}
b/snf-astakos-app/astakos/im/static/im/css/max768.css
4 4
.bg-wrap										{ background-position:-9999px -9999px; }
5 5
.buttons-list.fixpos 							{ position:static;  }
6 6
.buttons-list .button 							{ margin-left:0; }
7
form input.submit, form input[type="submit"] 	{ margin:0; }
8 7
.container .lt-div								{ float:none; width:auto; }
9 8
.container ul.options 							{ margin-bottom:30px; }
9
/* forms */
10
form input.submit, form input[type="submit"] 	{ margin:0; }
11
form .form-row .extra-link 						{ padding-top:0; }
b/snf-astakos-app/astakos/im/static/im/css/modules.css
1
body											{ min-width:32px; overflow-y: scroll;}
1
body											{ min-width:320px; overflow-y: scroll;}
2 2
.wrapper                                        { margin:0 auto; position:relative; width:820px; padding:36px 70px; }
3 3
.container .wrapper,
4 4
.footer .wrapper                                { border: 1px solid #808080; border-top:0 none;}
b/snf-astakos-app/astakos/im/static/im/js/forms.js
5 5
    return this.each(function() {
6 6
      // process checkboxes
7 7
      var $this = $(this);
8
      var el = $('<span class="checkbox-widget" />');
8
      var el = $('<a class="checkbox-widget" href="javascript:void(0)"/>');
9 9
      var form = $this.closest(".form-row");
10 10

  
11 11
      // add class to identify form rows which contain a checkbox
......
33 33
      el.click(function() {
34 34
        el.toggleClass("checked");
35 35
        $this.attr('checked', el.hasClass("checked"));
36
      });
37
      
38
      el.keypress(function(e){
39
      	
40
      	if (e.keyCode == 0 || e.keyCode == 32){
41
      		e.preventDefault();
42
      		el.toggleClass("checked");
43
        	$this.attr('checked', el.hasClass("checked"));
44
      	}
36 45
      })
37 46

  
38
      $this.after(el);
47
      $this.prev('label').before(el);
39 48
    });
40 49

  
41 50

  
b/snf-astakos-app/astakos/im/templates/im/login_base.html
27 27
		    	{% include "im/form_render.html" %}
28 28
		    {% endwith %}
29 29
		    <input type="hidden" name="next" value="{{ next }}">
30
		    <div class="form-row submit">
31
		    	<a class="extra-link" href="{% url django.contrib.auth.views.password_reset %}">Forgot your password?</a>
30
		    <div class="form-row submit clearfix">
31
		    	
32 32
		        <input type="submit" class="submit altcol" value="SUBMIT" />
33
		        
33
		        <a class="extra-link" href="{% url django.contrib.auth.views.password_reset %}">Forgot your password?</a>
34 34
		    </div>
35 35
    	</form>
36 36
    {% endif %}
......
44 44
        {% endif %}
45 45
        </div>
46 46
        {% endfor %}
47
    </div>
47
    </div><br />
48 48
    {% block body.signup %}
49 49
	    {% for o in im_modules %}
50 50
	        {% if o != 'local' %}

Also available in: Unified diff