fix for issue 653 by adding wrap=hard attr to textareas for surveys
authorJames Levy <jamesalexanderlevy@gmail.com>
Thu, 23 Jul 2009 18:28:49 -0700
changeset 2670 884f808d8469
parent 2669 c28e2dc4cd51
child 2671 2eaacbbdb168
fix for issue 653 by adding wrap=hard attr to textareas for surveys
app/soc/content/js/survey-edit-090708.js
app/soc/views/helper/surveys.py
--- a/app/soc/content/js/survey-edit-090708.js	Thu Jul 23 16:56:00 2009 -0700
+++ b/app/soc/content/js/survey-edit-090708.js	Thu Jul 23 18:28:49 2009 -0700
@@ -615,7 +615,7 @@
                            '<option value="True" selected="selected">',
                            'True</option>', '<option value="False">',
                            'False</option>', '</select>',
-                           "<textarea cols='40' rows='", MIN_ROWS,
+                           "<textarea wrap='hard' cols='40' rows='", MIN_ROWS,
                            "' class='long_answer'/>", '</fieldset>'
                           ].join("");
               break;
--- a/app/soc/views/helper/surveys.py	Thu Jul 23 16:56:00 2009 -0700
+++ b/app/soc/views/helper/surveys.py	Thu Jul 23 18:28:49 2009 -0700
@@ -295,6 +295,8 @@
       comment: initial comment value for field
     """
 
+    #fix growfield wrapping
+    attrs['wrap'] = 'hard'
     widget = widgets.Textarea(attrs=attrs)
 
     if not tip: