Hide settings/limits for custom gateways
This commit is contained in:
parent
a09b703806
commit
9af66a5f33
|
|
@ -212,10 +212,14 @@ class _CompanyGatewayEditState extends State<CompanyGatewayEdit>
|
|||
),
|
||||
],
|
||||
),
|
||||
if (companyGateway.gatewayId == kGatewayCustom)
|
||||
Center(
|
||||
child: HelpText(localization.noPaymentTypesEnabled),
|
||||
)
|
||||
else
|
||||
ScrollableListView(
|
||||
children: <Widget>[
|
||||
FormCard(children: <Widget>[
|
||||
if (companyGateway.gatewayId != kGatewayCustom)
|
||||
DecoratedFormField(
|
||||
label: localization.label,
|
||||
initialValue: companyGateway.label,
|
||||
|
|
@ -230,7 +234,8 @@ class _CompanyGatewayEditState extends State<CompanyGatewayEdit>
|
|||
labelText: localization.captureCard,
|
||||
value: companyGateway.tokenBilling,
|
||||
onChanged: (dynamic value) => viewModel.onChanged(
|
||||
companyGateway.rebuild((b) => b..tokenBilling = value)),
|
||||
companyGateway
|
||||
.rebuild((b) => b..tokenBilling = value)),
|
||||
items: [
|
||||
CompanyGatewayEntity.TOKEN_BILLING_ALWAYS,
|
||||
CompanyGatewayEntity.TOKEN_BILLING_OPT_OUT,
|
||||
|
|
@ -244,7 +249,8 @@ class _CompanyGatewayEditState extends State<CompanyGatewayEdit>
|
|||
.toList(),
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
for (var gatewayTypeId in gateway?.options?.keys ?? <String>[])
|
||||
for (var gatewayTypeId
|
||||
in gateway?.options?.keys ?? <String>[])
|
||||
SwitchListTile(
|
||||
title: Text(localization
|
||||
.lookup(kGatewayTypes[gatewayTypeId] ?? '')),
|
||||
|
|
|
|||
Loading…
Reference in New Issue