def __init__(self, model, controller, opts): self.model = model self.controller = controller self.signal = controller.signal self.opts = opts self.items = [] self.form = IdentityForm() connect_signal(self.form, 'submit', self.done) connect_signal(self.form.confirm_password.widget, 'change', self._check_password) self.ssh_import_confirmed = True body = Pile([ ('pack', Text("")), Padding.center_90(ListBox([self.form.as_rows(self)])), ('pack', Pile([ ('pack', Text("")), button_pile([self.form.done_btn]), ('pack', Text("")), ])), ]) super().__init__(body)
def __init__(self, model, controller): self.model = model self.controller = controller self.items = [] self.error = Text("", align='center') self.additional_options = Pile(self._build_additional_options()) self.listbox = ListBox(self._build_model_inputs() + [ Padding.center_79(self.additional_options), Padding.line_break(""), ]) self.bottom = Pile([ Text(""), self._build_buttons(), Text(""), ]) self.error_showing = False self.frame = Pile([ ('pack', Text("")), ('pack', Padding.center_79(Text(_(self.excerpt)))), ('pack', Text("")), Padding.center_90(self.listbox), ('pack', self.bottom)]) self.frame.focus_position = 4 super().__init__(self.frame)