Commits

Rafał Kos committed 4eb8b82

Added buttonset for radio inputs.
Changes in TODO

  • Participants
  • Parent commits 750b9d7

Comments (0)

Files changed (10)

-#Add Register action
-#Add Forgot password action
-#Add default categories during registration
-#Add confirmation dialog for removing payment
+#Add Register action: DONE
+#Add Forgot password action: DONE
+#Add default categories during registration: DONE
+#Add confirmation dialog for removing payment
+#Add footer and copyright text

homebudget/lib/forms/widgets.py

         kwargs.setdefault('id', field.id)
         html = ''
         for subfield in field:
-            html += u'%s %s' % (subfield.label.text, subfield())
+            html += u'%s %s' % (subfield.label, subfield())
 
         return HTMLString(u''.join(html))

homebudget/public/css/layout.css

 .clear { clear: both; }
 b { font-weight: bold; }
 body {
-	background: white;
+	background: #14171F;
 	font-family: Arial, Helvetica, sans-serif;
 	font-size: 12px;
 	color: #646464;
 }
 
 #wrapper {
+    background:url("http://static.tumblr.com/pvdmavg/HHOkuzdlf/h1_bg_top.png") repeat-x scroll left top transparent;
 	text-align: left;
 	width: 930px;
+    min-height: 120px;
 	margin: 0 auto;
 }
 
 /* Language choose ---------------------------------------- */
 #langChoose {
     width: 918px;
-    height: 16px;    
+    height: 16px;
 }
 
 #langChoose li {
 	display: block;
 	font-weight: bold;
 	text-decoration: none;
-	color: #646464;
+	color: white;
     margin-left: 10px;
 }
 
 
 
 #container {
-	background: #fff url(../img/content.gif) repeat-y left top;
+	background-color: #e9eff2;
 	border: 1px solid #ddd;
 	width: 918px;    
 }
 
 #sidebar .sideNav { width: 179px; }
 
-#sidebar .sideNav li { border-bottom: 1px solid #ddd; width: 179px; }
+#sidebar .sideNav li {
+    border-bottom: 1px solid #ddd;
+    border-right: 1px solid #ddd;
+    width: 179px;
+}
 
 #sidebar .sideNav li a {
 	display: block;
 	padding: 19px;
 	margin: 0 0 20px 0;
 	background: #fbfbfb;
+    -moz-border-radius: 5px; /* FF1+ */
+    -webkit-border-radius: 5px; /* Saf3+, Chrome */
+    border-radius: 5px; /* Opera 10.5, IE 9 */      
 }
 
 #main fieldset p { margin: 0 0 14px 0; float: left; }
     color:#B50007;
     font-weight:bold;
     padding:5px 0 0;
-    font-size:85%;
-    padding-left: 155px;    
+    font-size:85%;        
 }
 
 form input.errormsg {
     height: 1%;
 }
 
-form label{
+form label.standard{
     font-weight: bold;
     float: left;
     margin-left: -155px;

homebudget/public/js/scripts.js

 }
 
 $(document).ready(function() {
-    $("button, input:submit").button();
+    $("button, input:submit, .checkbox").button();
+    $(".radio").buttonset();
 
     $('.date-picker').datepicker({
         changeMonth: true,

homebudget/templates/base/main.html

         $('#dialog-form').dialog({
             autoOpen: false,
             modal: true,
-            width: 580,
-            position: 'top'
+            width: 580            
         });
 
 

homebudget/templates/macros/forms.html

             {% set class_ = [class_, 'errormsg']|join(' ') %}
         {% endif %}
 
-        {{ field.label }}        
+        {{ field.label(class_='standard') }}        
         {{ field(class_=class_, **kwargs) }}
 
         {% if field.errors %}
             {% for error in field.errors %}<br /> <label class='errormsg'>{{ error|e }}</label>{% endfor %}            
         {% endif %}
     </p>
+{%- endmacro %}
+
+{% macro render_radio_field(field, catch_kwargs=True) %}
+    <p class="radio">
+        {%  set class_ = kwargs.pop('class_', '') %}
+
+        {%  if field.errors %}
+            {% set class_ = [class_, 'errormsg']|join(' ') %}
+        {% endif %}
+
+        {{ field.label(class_='standard') }}
+        {{ field(class_=class_, **kwargs) }}
+
+        {% if field.errors %}
+            {% for error in field.errors %}<br /> <label class='errormsg'>{{ error|e }}</label>{% endfor %}
+        {% endif %}
+    </p>
 {%- endmacro %}

homebudget/templates/payments/edit-partial.html

             {{ forms.render_field(c.form.description) }}
             {{ forms.render_field(c.form.ammount) }}
             {{ forms.render_field(c.form.date, class_='date-picker') }}
-            {{ forms.render_field(c.form.type, class_='payment-type') }}
+            {{ forms.render_radio_field(c.form.type, class_='payment-type') }}
             {{ forms.render_field(c.form.company) }}
             {{ forms.render_field(c.form.account) }}
             {{ forms.render_field(c.form.category) }}            

homebudget/templates/payments/edit.html

                 {{ forms.render_field(c.form.description) }}
                 {{ forms.render_field(c.form.ammount) }}
                 {{ forms.render_field(c.form.date, class_='date-picker') }}
-                {{ forms.render_field(c.form.type, class_='payment-type') }}
+                {{ forms.render_radio_field(c.form.type, class_='payment-type') }}
                 {{ forms.render_field(c.form.company) }}
                 {{ forms.render_field(c.form.account) }}
                 {{ forms.render_field(c.form.category) }}

homebudget/templates/payments/new-partial.html

             {{ forms.render_field(c.form.description) }}
             {{ forms.render_field(c.form.ammount) }}
             {{ forms.render_field(c.form.date, class_='date-picker') }}
-            {{ forms.render_field(c.form.type, class_='payment-type') }}
+            {{ forms.render_radio_field(c.form.type, class_='payment-type') }}
             {{ forms.render_field(c.form.company) }}
             {{ forms.render_field(c.form.account) }}
             {{ forms.render_field(c.form.category) }}

homebudget/templates/payments/new.html

                 {{ forms.render_field(c.form.description) }}
                 {{ forms.render_field(c.form.ammount) }}
                 {{ forms.render_field(c.form.date, class_='date-picker') }}
-                {{ forms.render_field(c.form.type, class_='payment-type') }}
+                {{ forms.render_radio_field(c.form.type, class_='payment-type') }}
                 {{ forms.render_field(c.form.company) }}
                 {{ forms.render_field(c.form.account) }}
                 {{ forms.render_field(c.form.category) }}