mirror of
https://github.com/tutao/tutanota.git
synced 2025-12-08 06:09:50 +00:00
fix: prevent users from selecting null as a country during signup
Co-authored-by: nig <nig@tutao.de>
This commit is contained in:
parent
52c86f1074
commit
5e85e213cb
3 changed files with 4 additions and 8 deletions
|
|
@ -57,13 +57,7 @@ export function renderCountryDropdown(params: {
|
||||||
return m(DropDownSelector, {
|
return m(DropDownSelector, {
|
||||||
label: params.label ?? "invoiceCountry_label",
|
label: params.label ?? "invoiceCountry_label",
|
||||||
helpLabel: params.helpLabel,
|
helpLabel: params.helpLabel,
|
||||||
items: [
|
items: [...dropdownCountries(), { value: null, name: lang.get("choose_label"), selectable: false }],
|
||||||
...dropdownCountries(),
|
|
||||||
{
|
|
||||||
value: null,
|
|
||||||
name: lang.get("choose_label"),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
selectedValue: params.selectedCountry,
|
selectedValue: params.selectedCountry,
|
||||||
selectionChangedHandler: params.onSelectionChanged,
|
selectionChangedHandler: params.onSelectionChanged,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,8 @@ export class InvoiceAndPaymentDataPage implements WizardPageN<UpgradeSubscriptio
|
||||||
disabled:
|
disabled:
|
||||||
(this._selectedPaymentMethod() === PaymentMethodType.CreditCard &&
|
(this._selectedPaymentMethod() === PaymentMethodType.CreditCard &&
|
||||||
this.ccViewModel.validateCreditCardPaymentData() != null) ||
|
this.ccViewModel.validateCreditCardPaymentData() != null) ||
|
||||||
(this._selectedPaymentMethod() === PaymentMethodType.Paypal && !this.isPaypalLinked()),
|
(this._selectedPaymentMethod() === PaymentMethodType.Paypal && !this.isPaypalLinked()) ||
|
||||||
|
this._invoiceDataInput?.selectedCountry() == null,
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -441,6 +441,7 @@ class RedeemGiftCardPage implements WizardPageN<RedeemGiftCardModel> {
|
||||||
.catch(ofClass(UserError, showUserError))
|
.catch(ofClass(UserError, showUserError))
|
||||||
.catch(ofClass(CancelledError, noOp))
|
.catch(ofClass(CancelledError, noOp))
|
||||||
},
|
},
|
||||||
|
disabled: !this.confirmed || this.country == null,
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
])
|
])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue