Hi guys.

Here is a patch to configure wiki formatting from the admin panel. Hope it 
is useful.

Regards.

-- 
Follow Agilo on Twitter: http://twitter.com/agiloforscrum
Please support us by reviewing and voting on: 
http://userstories.com/products/8-agilo-for-scrum 
http://ohloh.net/p/agilo-scrum 
http://freshmeat.net/projects/agiloforscrum

You have received this message because you are subscribed to
the "Agilo for Scrum" Google Group. This group is focused on
supporting Agilo for Scrum users and is moderated by
Agilo Software GmbH <http://www.agiloforscrum.com>.

To post to this group, send email to [email protected]
To unsubscribe from this group, send an email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/agilo
diff --git a/agilo/agilo/ticket/admin/custom_fields.py 
b/agilo/agilo/ticket/admin/custom_fields.py
index 93c0102..64253a2 100644
--- a/agilo/agilo/ticket/admin/custom_fields.py
+++ b/agilo/agilo/ticket/admin/custom_fields.py
@@ -52,6 +52,7 @@ class CustomFieldAdminPanel(AgiloAdminPanel):
                   Key.OPTIONS: [x.strip() for x in 
req.args.get(Key.OPTIONS).split("\n")],
                   Key.COLS: req.args.get(Key.COLS),
                   Key.ROWS: req.args.get(Key.ROWS),
+                  Key.FORMAT: req.args.get(Key.FORMAT),
                   Key.ORDER: req.args.get(Key.ORDER, 0)}
         return cfdict
     
@@ -245,7 +246,7 @@ class CustomFields(Component):
                     customfield[key] = unicode(default)
             # dwt: why is this called twice?
             set_default_value(Key.COLS, 60)
-            set_default_value(Key.COLS, 5)
+            set_default_value(Key.ROWS, 5)
         
         if create:
             number_of_custom_fields = len(self.get_custom_fields())
@@ -274,7 +275,7 @@ class CustomFields(Component):
         self.ticket_custom.change_option(config_key, value)
     
     def _remove_old_keys(self, fieldname, added_keys):
-        for key in (Key.VALUE, Key.OPTIONS, Key.COLS, Key.ROWS):
+        for key in (Key.VALUE, Key.OPTIONS, Key.COLS, Key.ROWS, Key.FORMAT):
             if key not in added_keys:
                 self.ticket_custom.remove_option('%s.%s' % (fieldname, key), 
                                                  save=False)
diff --git a/agilo/agilo/ticket/templates/agilo_admin_customfields.html 
b/agilo/agilo/ticket/templates/agilo_admin_customfields.html
index 6a95b2e..d6adcad 100644
--- a/agilo/agilo/ticket/templates/agilo_admin_customfields.html
+++ b/agilo/agilo/ticket/templates/agilo_admin_customfields.html
@@ -18,15 +18,15 @@
       }
       switch($('#type').val()) {
         case 'text':            
-          hide('options'); hide('cols'); hide('rows'); break;
+          hide('options'); hide('cols'); hide('rows'); hide('format'); break;
         case 'select':
-          show('options'); hide('cols'); hide('rows'); break;
+          show('options'); hide('cols'); hide('rows'); hide('format'); break;
         case 'checkbox':
-          hide('options'); hide('cols'); hide('rows'); break;
+          hide('options'); hide('cols'); hide('rows'); hide('format'); break;
         case 'radio':
-          show('options'); hide('cols'); hide('rows'); break;
+          show('options'); hide('cols'); hide('rows'); hide('format'); break;
         case 'textarea':
-          hide('options'); show('cols'); show('rows'); break;
+          hide('options'); show('cols'); show('rows'); show('format'); break;
       }
     }
     $(function() {
@@ -91,6 +91,11 @@
             Columns: <input type="text" name="cols" id="cols" size="5" 
value="${cfadmin.customfield.width}" />
             Rows: <input type="text" size="5" name="rows" id="rows" 
value="${cfadmin.customfield.height}" /></label>
         </div>
+        <div class="field">
+          <input id='format' type="checkbox" name="format" value="wiki"
+           checked="${cfadmin.customfield.format=='wiki' and 'wiki' or None}" 
/>
+         <label for='format'>Wiki Formatting</label>
+        </div>
         <div class="buttons">
           <input type="submit" name="cancel" value="Cancel" />
           <input type="submit" name="save" value="Save" />
@@ -138,6 +143,10 @@
             Rows: <input type="text" size="2" name="rows" id="rows" />
           </label>
         </div>
+        <div class="field">
+          <input id='format' type="checkbox" name="format" value="wiki" />
+         <label for='format'>Wiki Formatting: </label>
+        </div>
         <div class="buttons">
           <input type="submit" name="add" value="Add" />
         </div>
diff --git a/agilo/agilo/utils/constants.py b/agilo/agilo/utils/constants.py
index c3340f9..eb6df7f 100644
--- a/agilo/agilo/utils/constants.py
+++ b/agilo/agilo/utils/constants.py
@@ -136,6 +136,7 @@ class Key(object):
     VELOCITY = 'velocity'
     WARNINGS = 'warnings'
     WIDTH = 'width'
+    FORMAT = 'format'
 
 
 class Type(object):

Reply via email to