Skip to content

Commit

Permalink
LinkField - make link disappear if no value
Browse files Browse the repository at this point in the history
  • Loading branch information
paj committed Jul 16, 2010
1 parent ce06973 commit d75e548
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tw2/forms/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def prepare(self):
super(LinkField, self).prepare()
self.safe_modify('attrs')
self.attrs['href'] = self.link.replace('$', unicode(self.value or ''))
self.text = self.text.replace('$', unicode(self.value or ''))
self.text = self.value and self.text.replace('$', unicode(self.value)) or ''


class Button(InputField):
Expand Down

0 comments on commit d75e548

Please sign in to comment.