diff --git a/app/views/supporters/_form.slim b/app/views/supporters/_form.slim index bbef31e..7317c7b 100644 --- a/app/views/supporters/_form.slim +++ b/app/views/supporters/_form.slim @@ -20,6 +20,10 @@ javascript: } }); + var suggestion_template = function (data) { + return '

' + data.plz + ' - ' + data.city + '

'; + } + $('#supporter_city').typeahead({ minLength: 2, },{ @@ -27,7 +31,7 @@ javascript: display: 'city', templates: { suggestion: function (data) { - return '

' + data.plz + ' - ' + data.city + '

'; + return suggestion_template(data); } }, source: cities @@ -42,7 +46,7 @@ javascript: display: 'plz', templates: { suggestion: function (data) { - return '

' + data.plz + ' - ' + data.city + '

'; + return suggestion_template(data); } }, source: cities