fix wpcfto select and repeater related visibility and validation
This commit is contained in:
@@ -57,6 +57,30 @@ class Settings {
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Enable Multi Currency', 'formipay' )
|
||||
],
|
||||
'enable_auto_exchangerate' => [
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Enable Auto Exchange Rate', 'formipay' ),
|
||||
'dependency' => [
|
||||
'key' => 'enable_multicurrency',
|
||||
'value' => 'not_empty'
|
||||
]
|
||||
],
|
||||
'enable_auto_exchangerate_apikey' => [
|
||||
'type' => 'text',
|
||||
'label' => __( 'Auto Exchange Rate API Key', 'formipay' ),
|
||||
'required' => true,
|
||||
'dependency' => [
|
||||
[
|
||||
'key' => 'enable_multicurrency',
|
||||
'value' => 'not_empty'
|
||||
],
|
||||
[
|
||||
'key' => 'enable_auto_exchangerate',
|
||||
'value' => 'not_empty'
|
||||
]
|
||||
],
|
||||
'dependencies' => '&&'
|
||||
],
|
||||
'multicurrencies' => [
|
||||
'type' => 'repeater',
|
||||
'label' => __( 'Currencies', 'formipay' ),
|
||||
@@ -94,13 +118,12 @@ class Settings {
|
||||
'options' => $payment_checkboxes,
|
||||
'submenu' => __( 'General', 'formipay' ),
|
||||
),
|
||||
'payment_gateways_select' => array(
|
||||
'type' => 'multiselect',
|
||||
'label' => __( 'Payment Gateways', 'formipay' ),
|
||||
'options' => $payment_checkboxes,
|
||||
'exchange_rate' => array(
|
||||
'type' => 'number',
|
||||
'label' => __( 'Manual Exchange Rate', 'formipay' ),
|
||||
'description' => __( 'This value is the exchange rate of default currency against this currency. If this currency selected, total order will be multiplied to this value. <b>This override the value from ExchangeRatePI if enabled</b>', 'formipay' ),
|
||||
'submenu' => __( 'General', 'formipay' ),
|
||||
'placeholder' => 'Select related Payments'
|
||||
),
|
||||
)
|
||||
],
|
||||
'required' => true,
|
||||
'dependency' => [
|
||||
|
||||
Reference in New Issue
Block a user