--- a/app/soc/content/js/survey-edit-090703.js Sat Jul 04 12:07:27 2009 +0200
+++ b/app/soc/content/js/survey-edit-090703.js Sat Jul 04 13:53:17 2009 +0200
@@ -192,7 +192,8 @@
});
edit_form.append(deleted_input);
}
- this_field.remove();
+ this_field.next('tr').remove().end()
+ .remove();
}
}
);
@@ -572,13 +573,13 @@
'" name="required_for_', field_name,
'"><option value="True" selected="selected">True',
'</option>', '<option value="False">False</option>',
- '</select><br/>', '<label for="comment_for_',
+ '</select>', '<label for="comment_for_',
field_name, '">Allow Comments</label>',
'<select id="comment_for_', field_name,
'" name="comment_for_', field_name, '">',
'<option value="True" selected="selected">',
'True</option>', '<option value="False">',
- 'False</option>', '</select><br/>',
+ 'False</option>', '</select>',
"<input type='text' ",
"class='short_answer'>", "</fieldset>"
].join("");
@@ -592,13 +593,13 @@
'" name="required_for_', field_name,
'"><option value="True" selected="selected">True',
'</option>', '<option value="False">False</option>',
- '</select><br/>', '<label for="comment_for_',
+ '</select>', '<label for="comment_for_',
field_name, '">Allow Comments</label>',
'<select id="comment_for_', field_name,
'" name="comment_for_', field_name, '">',
'<option value="True" selected="selected">',
'True</option>', '<option value="False">',
- 'False</option>', '</select><br/>',
+ 'False</option>', '</select>',
"<textarea cols='40' rows='", MIN_ROWS,
"' class='long_answer'/>", '</fieldset>'
].join("");
@@ -638,12 +639,12 @@
'<select id="required_for_', name, '" name="required_for_',
name, '"><option value="True" selected="selected">True',
'</option>', '<option value="False">False</option>',
- '</select><br/>', '<label for="comment_for_', name,
+ '</select>', '<label for="comment_for_', name,
'">Allow Comments</label>', '<select id="comment_for_', name,
'" name="comment_for_', name, '">',
'<option value="True" selected="selected">True</option>',
'<option value="False">False</option>',
- '</select><br/>',
+ '</select>',
'<label for="render_for_', name,
'">Render as</label>', '\n <select id="render_for_', name,
'" name="render_for_', name, '">', '\n <option',
@@ -726,7 +727,7 @@
'for',
'id_' + formatted_name
)
- .append(question_content + ":").end()
+ .append(question_content).end()
.find(
'td'
)
--- a/app/soc/views/helper/surveys.py Sat Jul 04 12:07:27 2009 +0200
+++ b/app/soc/views/helper/surveys.py Sat Jul 04 13:53:17 2009 +0200
@@ -56,7 +56,7 @@
>True</option>
<option value="False" {% if not is_required %} selected='selected'
{% endif %}>False</option>
- </select><br/>
+ </select>
<label for="comment_for_{{ name }}">Allow Comments</label>
<select id="comment_for_{{ name }}" name="comment_for_{{ name }}">
@@ -64,7 +64,7 @@
>True</option>
<option value="False" {% if not has_comment %} selected='selected'
{% endif %}>False</option>
- </select><br/>
+ </select>
"""
@@ -379,9 +379,10 @@
attrs: the attrs for the widget
tip: tooltip text for this field
"""
+ attrs['class'] = 'comment'
widget = widgets.Textarea(attrs=attrs)
- comment_field = CharField(help_text=tip, required=False, label='Comments',
- widget=widget, initial=comment)
+ comment_field = CharField(help_text=tip, required=False,
+ label='Add a Comment (optional)', widget=widget, initial=comment)
self.survey_fields[COMMENT_PREFIX + field] = comment_field