Merge pull request #263 from prculley/bug9767

Bug9767 Fix LDS editor for 'Family' related issues
This commit is contained in:
Sam Manzi 2016-11-05 14:20:07 +11:00 committed by GitHub
commit 676ff5601c

View File

@ -230,22 +230,21 @@ class EditLdsOrd(EditSecondary):
self.db.readonly)
self.track_ref_for_deletion('status_menu')
self.ord_type_changed()
self.update_parent_label()
def _post_init(self):
self.ord_type_changed()
def ord_type_changed(self):
if self.obj.get_type() == LdsOrd.BAPTISM:
self.parents.hide()
self.parents_label.hide()
self.parents_select.hide()
elif self.obj.get_type() == LdsOrd.ENDOWMENT:
self.parents.hide()
self.parents_label.hide()
self.parents_select.hide()
elif self.obj.get_type() == LdsOrd.SEAL_TO_PARENTS:
if self.obj.get_type() == LdsOrd.SEAL_TO_PARENTS:
self.parents.show()
self.parents_label.show()
self.parents_select.show()
else:
self.parents.hide()
self.parents_label.hide()
self.parents_select.hide()
new_data = [(item[1],item[0]) for item in LdsOrd._STATUS_MAP
if item[0] in _DATA_MAP[self.obj.get_type()] ]
self.status_menu.change_menu(new_data)
@ -354,6 +353,11 @@ class EditFamilyLdsOrd(EditSecondary):
self.share_btn = self.top.get_object('share_place')
self.add_del_btn = self.top.get_object('add_del_place')
def _post_init(self):
self.parents.hide()
self.parents_label.hide()
self.parents_select.hide()
def _connect_signals(self):
self.define_cancel_button(self.top.get_object('cancel'))
self.define_help_button(self.top.get_object('help'))