Permalink
Browse files

Committing and tagging the 2.2.4 release code

git-svn-id: http://svn.code.sf.net/p/formunculous/code/trunk@19 73555b9c-cbee-463b-918c-5b0eed200513
  • Loading branch information...
carsongee committed Feb 7, 2011
1 parent 9e78aba commit 253977afa5d02a11d32ef84f85aa8158904059be
View
2 README
@@ -59,5 +59,5 @@ for sql files for upgrading the schema. So if you went from 1.0 to 1.2
for example you will want to apply any and all .sql files that are designated
between those versions to your database.
-Of course if you have been using something like Django Evolution, this isn't
+Of course if you have been using something like Django South, this isn't
an issue, and running "manage.py syncdb" should be adequate.
View
37 RELEASE
@@ -1,3 +1,40 @@
+Formunculous 2.2.4 Release Notes:
+
+ This is a minor bug fix release with two minor
+ additional features.
+ A big thank you to Leho Kraav ( http://kraav.com/ )
+ for his help with getting translations working properly
+ and the split multi value field display code.
+
+New Features:
+ * CSV Export now includes the application ID as a field
+
+ * Added template code to properly display multi-select field responses on
+ the thank you and review pages (Courtesy of Leho Kraav)
+
+Bug Fixes:
+ * Fixed unicode handling in CSV export
+
+ * Added URLEncode filter for attached file links in thank you and review
+
+ * Fixed several spacing issues and missing trans/ugettext strings
+ (Courtesy of Leho Kraav)
+
+ * For additional language support, I setup the apply.html base template to
+ try and include a language specific date picker from
+ http://jquery-ui.googlecode.com/svn/trunk/ui/i18n/ if a language other
+ than en or en-us is selected:
+ {{ MEDIA_URL }}formunculous/js/jquery.ui.datepicker-{{ LANGUAGE_CODE }}.js
+ (You must add the specific js to that folder for it to work)
+ (Courtesy Leho Kraav)
+
+ * File type fields now properly check that the file name is less than the max
+ length allowed in the model. There is still an edge case where the path plus
+ the file name is too long. I have submitted a patch upstream to Django to
+ fix this.
+
+
+
Formunculous 2.2.0 Release Notes:
New Features:
View
@@ -12,9 +12,12 @@
#
# You should have received a copy of the GNU General Public License
# along with formunculous. If not, see <http://www.gnu.org/licenses/>.
-# Copyright 2009,2010 Carson Gee
+# Copyright 2009-2011 Carson Gee
-VERSION = (2, 2, 0, 'final', 0 )
+# This file is part of formunculous.
+# Copyright 2009-2011 Carson Gee
+
+VERSION = (2, 2, 4, 'final', 0 )
def get_version():
View
@@ -12,7 +12,7 @@
#
# You should have received a copy of the GNU General Public License
# along with formunculous. If not, see <http://www.gnu.org/licenses/>.
-# Copyright 2009,2010 Carson Gee
+# Copyright 2009-2011 Carson Gee
from django.contrib import admin
from django.conf.urls.defaults import *
View
@@ -12,7 +12,7 @@
#
# You should have received a copy of the GNU General Public License
# along with formunculous. If not, see <http://www.gnu.org/licenses/>.
-# Copyright 2009,2010 Carson Gee
+# Copyright 2009-2011 Carson Gee
from django.forms import Field, FileField, MultipleChoiceField
from django.forms import ValidationError
@@ -68,6 +68,8 @@ def clean(self, data, initial=None):
#Allow for null
if not f:
return f
+ if not data and initial:
+ return f
ext = splitext(f.name)[1][1:].lower()
if ext in DocumentFormField.valid_file_extensions \
View
@@ -12,7 +12,7 @@
#
# You should have received a copy of the GNU General Public License
# along with formunculous. If not, see <http://www.gnu.org/licenses/>.
-# Copyright 2009,2010 Carson Gee
+# Copyright 2009-2011 Carson Gee
from django import forms
from django.db import models
@@ -80,7 +80,7 @@ def __init__(self, app_def, app=None, reviewer=False, *args, **kwargs):
if field_def_choices and field_model.allow_dropdown:
choices = (())
for choice in field_def_choices:
- choices += (choice.value, choice.text,),
+ choices += (choice.value, _(choice.text),),
# Users are allowed to specify that a choiced
widget = Select
@@ -30,7 +30,6 @@ def handle_noargs(self, **options):
copy_tree(media_from, media_to)
-
- print(_("Copied %s to %s creating any needed directories" % (media_to, media_from) ))
+ print(_("Copied %(first)s to %(second)s creating any needed directories" % {'first': media_to, 'second': media_from} ))
@@ -43,7 +43,7 @@ def handle_noargs(self, **options):
Unable to link media, please check your permissions and ensure that
your operating system supports symbolic links.
""")
-
- print( _("Created symlink from %s to %s." % (media_from, media_to) ))
+
+ print( _("Created symlink from %(first)s to %(second)s." % {'first': media_from, 'second': media_to} ))
@@ -574,6 +574,10 @@ table.formunculous_review_table tr.odd:hover
/* End history styles */
+.formunculous_print {
+ float: left;
+}
+
.formunculous_form_info {
list-style-type: none;
padding-top: 1em;
View
@@ -12,7 +12,7 @@
#
# You should have received a copy of the GNU General Public License
# along with formunculous. If not, see <http://www.gnu.org/licenses/>.
-# Copyright 2009,2010 Carson Gee
+# Copyright 2009-2011 Carson Gee
from django.db import models
from django.contrib.auth.models import User, Group
@@ -258,7 +258,9 @@ def get_field_values(self, reviewer_fields=False, all_fields=False):
field_def = field_def)
field_dict = {'label': field_def.label,
'data': field_val.value,
- 'type': field_def.type },
+ 'type': field_def.type,
+ 'slug': field_def.slug,
+ 'multiselect': field_def.multi_select },
except:
field_dict = {'label': field_def.label, 'data': None,
'type': field_def.type },
@@ -522,7 +524,7 @@ class FileField(BaseField):
value = models.FileField(upload_to=upload_to_path,
storage=ApplicationStorage(),
- blank=True, null=True)
+ blank=True, null=True,max_length=100)
widget = FileWidget
allow_dropdown = False
@@ -538,7 +540,7 @@ class ImageField(BaseField):
value = models.ImageField(upload_to=upload_to_path,
storage=ApplicationStorage(),
- blank=True, null=True)
+ blank=True, null=True, max_length=100)
widget = FileWidget
allow_dropdown = False
@@ -554,6 +556,6 @@ class DocumentField(BaseField):
value = fields.DocumentField(upload_to=upload_to_path,
storage=ApplicationStorage(),
- blank=True, null=True)
+ blank=True, null=True, max_length=100)
widget = FileWidget
allow_dropdown = False
View
@@ -12,16 +12,11 @@
#
# You should have received a copy of the GNU General Public License
# along with formunculous. If not, see <http://www.gnu.org/licenses/>.
-# Copyright 2009,2010 Carson Gee
+# Copyright 2009-2011 Carson Gee
from django.core.files.storage import FileSystemStorage
from django.conf import settings
-# Still need to deal with access control to these files using this
-# storage system. Likely move this class out to another file
-# that handles viewing these files and the permissions they recieve
-
-
class ApplicationStorage(FileSystemStorage):
"""
Does file replacement on file fields instead of renaming them
@@ -8,7 +8,6 @@
<style type="text/css">
html {
font-family: Arial, Helvetica, sans-serif;
- font-size: .8em;
}
a {
color: #3333ff;
@@ -27,33 +26,31 @@
{% if perms.formunculous.change_form %}
<li>
<a href="{% url builder-index %}">Builder</a></li>
- </li>
{% endif %}
</ul>
- </div>
+ </div>
{% if user.is_authenticated %}
<div id="formunculous_auth"><a href="{% url formunculous-logout %}?next={% url formunculous-index %}">Logout</a></div>
{% else %}
<div id="formunculous_auth"><a href="{% url formunculous-login %}?next={{ request.path }}">Login</a></div>
{% endif %}
- <div id="body">
- {% block body %}
- {% block crumbs %}
- {% if breadcrumbs %}
- <ul id="breadcrumb_list">
- {% for crumb in breadcrumbs %}
- <li><a href="{{ crumb.url }}">{{ crumb.name }}</a></li>
- {% endfor %}
- </ul>
- {% endif %}
- {% endblock %}
- <div><h1>{% block content_title %}{% endblock %}</h1></div>
- <div class="content">
- {% block content %}{% endblock %}
- </div>
- {% endblock %}
+ {% block body %}
+ {% block crumbs %}
+ {% if breadcrumbs %}
+ <ul id="breadcrumb_list">
+ {% for crumb in breadcrumbs %}
+ <li><a href="{{ crumb.url }}">{{ crumb.name }}</a></li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+ {% endblock %}
+ <h1>{% block content_title %}{% endblock %}</h1>
+
+ <div class="content">
+ {% block content %}{% endblock %}
</div>
+ {% endblock %}
</body>
</html>
@@ -1,14 +1,15 @@
{% extends "formunculous/base.html" %}
{% load i18n widget_type formunculous_tags %}
+{% get_current_language as LANGUAGE_CODE %}
{% block css %}
{{ block.super }}
+<script type="text/javascript" src="{{ MEDIA_URL }}formunculous/js/jquery-1.3.2.min.js"></script>
{{ form.media }}
<link href="{{ MEDIA_URL }}formunculous/css/formunculous.css" rel="stylesheet" type="text/css" />
<link href="{{ MEDIA_URL }}formunculous/css/apply.css" rel="stylesheet" type="text/css" />
-<script type="text/javascript" src="{{ MEDIA_URL }}formunculous/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="{{ MEDIA_URL }}formunculous/js/jquery.formset.js"></script>
-
+{% ifnotequal LANGUAGE_CODE "en" %}{% ifnotequal LANGUAGE_CODE "en-us" %}<script type="text/javascript" src="{{ MEDIA_URL }}formunculous/js/jquery.ui.datepicker-{{ LANGUAGE_CODE }}.js"></script>{% endifnotequal %}{% endifnotequal %}
{% if subforms %}
<script type="text/javascript" src="{{ MEDIA_URL }}formunculous/js/apply_sub_form.js"></script>
@@ -23,7 +24,7 @@
deleteText: 'Remove',
deleteCssClass: 'apply_sub_form_deletelink',
maxForms: {% if not subform.formset.max_num %}0{% else %}{{ subform.formset.max_num }}{% endif %},
- alertText: '{% trans "You have reached the maximum number of forms for this group"%}'
+ alertText: '{% trans "You have reached the maximum number of forms for this group" %}'
});
{% endfor %}
});
@@ -43,8 +44,8 @@
{% endblock %}
-{% block title %}{{ ad.name }}{% endblock %}
-{% block content_title %}{{ ad.name }}{% endblock %}
+{% block title %}{% trans ad.name %}{% endblock %}
+{% block content_title %}{% trans ad.name %}{% endblock %}
{% block content %}
{% if history %}
@@ -116,7 +117,7 @@
{% ifequal widget "CheckboxInput" %}
{{ field.field }}
{% if field.field.label %}
- <label for="{{ field.field.auto_id}}" class="apply_cb_label">
+ <label for="{{ field.field.auto_id }}" class="apply_cb_label">
{{field.field.label}}
</label>
{% endif %}
@@ -182,7 +183,7 @@ <h3>{{ subform.sub_ad.name }}</h3>
{% endif %}
{% endifchanged %}
{% widget_type field.field.field.widget as widget %}
- <div class="apply_field_row{% cycle ' odd' ' even' %}{% if field.field.errors %} apply_row_errors{% endif%}">
+ <div class="apply_field_row{% cycle ' odd' ' even' %}{% if field.field.errors %} apply_row_errors{% endif %}">
<div class="apply_field_errors">{{ field.field.errors }}</div>
<div class="apply_field{% if field.required %} apply_required{% endif %}">
{% ifequal widget "CheckboxInput" %}
@@ -220,7 +221,7 @@ <h3>{{ subform.sub_ad.name }}</h3>
{% endfor %}
{% if not preview %}
<div class="apply_submit{% if subforms %} apply_sub_form_submit{% endif %}">
- {% if ad.authentication %}<input type="submit" name="save" value="Save" />{% endif %}<input type="submit" name="submit" value="Submit" />
+ {% if ad.authentication %}<input type="submit" name="save" value="{% trans "Save" %}" />{% endif %}<input type="submit" name="submit" value="{% trans "Submit" %}" />
</div>
{% endif %}
@@ -1,7 +1,7 @@
{% load i18n %}
<div class="formunculous_container">
- <div class="fr">
+ <div class="formunculous_print">
<a href="javascript:window.print()" class="formunculous_printlink">{% trans "Print" %}</a>
</div>
<ul class="formunculous_form_info">
@@ -88,7 +88,7 @@
{% endif %}
<div class="formunculous_container">
- <div class="fr" style="margin-right: 2em;">
+ <div class="formunculous_print" style="margin-right: 2em;">
<a href="javascript:window.print()" class="formunculous_printlink">{% trans "Print" %}</a>
</div>
<ul class="formunculous_form_info">
@@ -1,5 +1,5 @@
{% extends "formunculous/base.html" %}
-{% load i18n widget_type %}
+{% load i18n widget_type formunculous_tags %}
{% block css %}{{ block.super }}
{{ review_form.media }}
<link href="{{ MEDIA_URL }}formunculous/css/formunculous.css" rel="stylesheet" type="text/css" />
@@ -69,7 +69,7 @@
<h1>{% trans "Responses" %}</h1>
<div class="formunculous_container">
- <div class="fr" style="margin-right: 2em;">
+ <div class="formunculous_print" style="margin-right: 2em;">
<a href="javascript:window.print()" class="formunculous_printlink">{% trans "Print" %}</a>
</div>
@@ -83,9 +83,9 @@ <h1>{% trans "Responses" %}</h1>
{% endif %}
{% for field in app_fields %}
- <li>
+ <li class="{{ field_type.lower }}" id="{{ field.slug }}">
<span class="formunculous_field_label">{{ field.label }}:</span>
- <span class="formunculous_field_data">
+ <{% ifequal field.type "TextArea" %}p{% else %}span{% endifequal %} class="formunculous_field_data">
{% ifequal field.type "BooleanField" %}
<span class="
{{ field.data|yesno:"formunculous_yes\">Yes, formunculous_no\">No"|safe }}
@@ -95,17 +95,21 @@ <h1>{% trans "Responses" %}</h1>
{% if field.data %}
{% if field.data.url %}
- <a target="_blank" href="{{ field.data.url }}">
+ <a target="_blank" href="{{ field.data.url|urlencode }}">
{% endif %}
- {{ field.data }}
+ {% if field.multiselect %}
+ {% for split_data in field.data|split_as_list:'|' %}<img class="selected" src="{{ MEDIA_URL }}/formunculous/img/icon-yes.gif" alt="v" />{% if not forloop.last %}{% endif %}{% trans split_data %}{% if not forloop.last %}<br />{% endif %}{% endfor %}
+ {% else %}
+ {{field.data }}
+ {% endif %}
{% if field.data.url %}
</a>
{% endif %}
{% endif %}
{% endifequal %}
- </span>
+ </{% ifequal field.type "TextArea" %}p{% else %}span{% endifequal %}>
</li>
{% endfor %}
<li>
Oops, something went wrong.

0 comments on commit 253977a

Please sign in to comment.