show required field in a dataform with an *
This commit is contained in:
parent
39f96a92be
commit
6cd341ad69
|
@ -555,8 +555,13 @@ class SingleForm(gtk.Table, object):
|
||||||
widget.set_sensitive(readwrite)
|
widget.set_sensitive(readwrite)
|
||||||
widget = decorate_with_tooltip(widget, field)
|
widget = decorate_with_tooltip(widget, field)
|
||||||
self.attach(widget, 1, 2, linecounter, linecounter+1,
|
self.attach(widget, 1, 2, linecounter, linecounter+1,
|
||||||
yoptions=gtk.FILL)
|
yoptions=gtk.FILL)
|
||||||
widget.show_all()
|
|
||||||
|
if field.required:
|
||||||
|
label = gtk.Label('*')
|
||||||
|
label.set_tooltip_text(_('This field is required'))
|
||||||
|
self.attach(label, 2, 3, linecounter, linecounter+1, xoptions=0,
|
||||||
|
yoptions=0)
|
||||||
|
|
||||||
linecounter+=1
|
linecounter+=1
|
||||||
if self.get_property('visible'):
|
if self.get_property('visible'):
|
||||||
|
|
Loading…
Reference in New Issue