Disable passphrase field, activate if TOS is accept #169
This commit is contained in:
@@ -65,6 +65,17 @@ NewOrRestorePage::NewOrRestorePage(FirstTimeWizard *parent) : QWizardPage(parent
|
||||
|
||||
parent->button(QWizard::CommitButton)->setEnabled(false);
|
||||
setButtonText(QWizard::CommitButton, "Next");
|
||||
form.txtPassword->setEnabled(false);
|
||||
form.txtConfirmPassword->setEnabled(false);
|
||||
|
||||
QObject::connect(form.TOS, &QRadioButton::clicked, [=](bool checked) {
|
||||
if (checked) {
|
||||
|
||||
form.txtPassword->setEnabled(true);
|
||||
form.txtConfirmPassword->setEnabled(true);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
auto fnPasswordEdited = [=](const QString&) {
|
||||
@@ -83,6 +94,7 @@ NewOrRestorePage::NewOrRestorePage(FirstTimeWizard *parent) : QWizardPage(parent
|
||||
form.radioRestoreWallet->setEnabled(true);
|
||||
form.radioNewWallet->setEnabled(true);
|
||||
form.radioNewWallet->setChecked(true);
|
||||
parent->button(QWizard::CommitButton)->setEnabled(true);
|
||||
|
||||
int length = passphrase.length();
|
||||
|
||||
@@ -134,12 +146,7 @@ NewOrRestorePage::NewOrRestorePage(FirstTimeWizard *parent) : QWizardPage(parent
|
||||
}
|
||||
});
|
||||
|
||||
QObject::connect(form.TOS, &QRadioButton::clicked, [=](bool checked) {
|
||||
if (checked) {
|
||||
parent->button(QWizard::CommitButton)->setEnabled(true);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user