]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/templates/ask.html
Merging the experimental branch back to trunk.
[osqa.git] / forum / skins / default / templates / ask.html
index e681f4f32291edfc8e4ff05f147c11ea11254ab9..35a6c2c50acd383fb971572897dbd8498fa66559 100644 (file)
             });
 
             //Tags autocomplete action
-            var tags = {{ tags|safe }};
-               $("#id_tags").autocomplete(tags, {
+               $("#id_tags").autocomplete("/matching_tags", {
                 minChars: 1,
                        matchContains: true,
                 max: 20,
                 multiple: true,
                 multipleSeparator: " ",
-                       formatItem: function(row, i, max) {
+                       /*formatItem: function(row, i, max) {
                                return row.n + " ("+ row.c +")";
                        },
                 formatResult: function(row, i, max){
                     return row.n;
+                }*/
+                formatItem: function(row, i, max, value) {
+                    return row[1].split(".")[0] + " (" + row[1].split(".")[1] + ")";
+                },
+
+                formatResult: function(row, i, max, value){
+                    return row[0];
                 }
 
             });
-
         });
         </script>
 {% endblock %}
@@ -78,7 +83,7 @@
 
             <div class="form-item">
                 <div id="wmd-button-bar" class="wmd-panel"></div>
-                {{ form.text }}
+                {{ form.text }} {{ form.text.errors }}
 
                 <div class="preview-toggle">
                     <table width="100%">