don't allow to continue registering an account if we only get instructions. Fixes #6957

This commit is contained in:
Yann Leboulanger 2011-09-01 21:17:43 +02:00
parent 7b22628fe6
commit a87f811c8b
1 changed files with 13 additions and 0 deletions

View File

@ -3522,6 +3522,7 @@ class AccountCreationWizardWindow:
def on_back_button_clicked(self, widget):
cur_page = self.notebook.get_current_page()
self.forward_button.set_sensitive(True)
if cur_page in (1, 2):
self.notebook.set_current_page(0)
self.back_button.set_sensitive(False)
@ -3763,6 +3764,18 @@ class AccountCreationWizardWindow:
self.data_form_widget = dataforms_widget.DataFormWidget(dataform)
else:
self.data_form_widget = FakeDataForm(obj.config)
empty_config = True
for field in obj.config:
if field == 'instructions':
continue
if not obj.config[field]:
# ignore empty tag
continue
empty_config = False
break
if not obj.is_form and empty_config:
self.forward_button.set_sensitive(False)
self.notebook.set_current_page(4) # show form page
self.data_form_widget.show_all()
self.xml.get_object('form_vbox').pack_start(self.data_form_widget)
self.ssl_fingerprint = obj.ssl_fingerprint