summaryrefslogtreecommitdiff
path: root/archaeological_operations/widgets.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-01-16 18:51:38 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-01-16 18:51:38 +0100
commit60422080838102e4c78e930126e98711734ed0e1 (patch)
tree3464fa1d2937ca936eedf02cfb253da1aeff4fef /archaeological_operations/widgets.py
parenta6530a965b088699005bd0d7438afd42e128d527 (diff)
downloadIshtar-60422080838102e4c78e930126e98711734ed0e1.tar.bz2
Ishtar-60422080838102e4c78e930126e98711734ed0e1.zip
UI: improve parcel form
Diffstat (limited to 'archaeological_operations/widgets.py')
-rw-r--r--archaeological_operations/widgets.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/archaeological_operations/widgets.py b/archaeological_operations/widgets.py
index 3a587e4fd..1d53bb199 100644
--- a/archaeological_operations/widgets.py
+++ b/archaeological_operations/widgets.py
@@ -52,9 +52,10 @@ class ParcelWidget(widgets.MultiWidget):
class SelectParcelWidget(widgets.TextInput):
def render(self, *args, **kwargs):
render = super(SelectParcelWidget, self).render(*args, **kwargs)
- render += u" <button name='formset_add' value='add'>%s</button>" \
- % _(u"Add")
- return mark_safe(render)
+ html = u"""{}
+ <button class='input-group-addon btn btn-success' name='formset_add'
+ value='add'>{}</button>""".format(render, _(u"Add"))
+ return mark_safe(html)
class OAWidget(forms.TextInput):