summaryrefslogtreecommitdiff
path: root/pgcommitfest/commitfest/widgets.py
blob: 0475001bd373c6bdc97c9fab4e9659aacffb4e38 (plain)
1
2
3
4
5
6
7
8
9
from django.forms import TextInput
from django.utils.safestring import mark_safe

class ThreadPickWidget(TextInput):
	def render(self, name, value, attrs=None):
		attrs['class'] += ' threadpick-input'
		html = super(ThreadPickWidget, self).render(name, value, attrs)
		html = html + '&nbsp;<button class="btn btn-default attachThreadButton" id="btn_%s">Find thread</button>' % name
		return mark_safe(html)