mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
move merchant email into toggle
This commit is contained in:
parent
2679afd819
commit
5907d03ced
3 changed files with 14 additions and 12 deletions
|
@ -4,7 +4,8 @@
|
||||||
|
|
||||||
#field-client_secret,
|
#field-client_secret,
|
||||||
#field-client_id,
|
#field-client_id,
|
||||||
#field-merchant_id {
|
#field-merchant_id,
|
||||||
|
#field-merchant_email{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,7 @@ const groupToggleSelect = (selector, group) => {
|
||||||
(event) => {
|
(event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
document.querySelector('#field-toggle_manual_input').style.display = 'none';
|
document.querySelector('#field-toggle_manual_input').style.display = 'none';
|
||||||
|
document.querySelector('#field-merchant_email').style.display = 'table-row';
|
||||||
document.querySelector('#field-merchant_id').style.display = 'table-row';
|
document.querySelector('#field-merchant_id').style.display = 'table-row';
|
||||||
document.querySelector('#field-client_id').style.display = 'table-row';
|
document.querySelector('#field-client_id').style.display = 'table-row';
|
||||||
document.querySelector('#field-client_secret').style.display = 'table-row';
|
document.querySelector('#field-client_secret').style.display = 'table-row';
|
||||||
|
|
|
@ -197,13 +197,10 @@ return array(
|
||||||
'requirements' => array(),
|
'requirements' => array(),
|
||||||
'gateway' => 'paypal',
|
'gateway' => 'paypal',
|
||||||
),
|
),
|
||||||
'merchant_email' => array(
|
'toggle_manual_input' => array(
|
||||||
'title' => __( 'Email address', 'paypal-payments-for-woocommerce' ),
|
'type' => 'ppcp-text',
|
||||||
'type' => 'text',
|
'title' => __( 'Manual mode', 'paypal-payments-for-woocommerce' ),
|
||||||
'required' => true,
|
'text' => '<button id="ppcp[toggle_manual_input]">' . __( 'Toggle to manual credential input', 'paypal-payments-for-woocommerce' ) . '</button>',
|
||||||
'desc_tip' => true,
|
|
||||||
'description' => __( 'The email address of your PayPal account.', 'paypal-payments-for-woocommerce' ),
|
|
||||||
'default' => '',
|
|
||||||
'screens' => array(
|
'screens' => array(
|
||||||
State::STATE_START,
|
State::STATE_START,
|
||||||
State::STATE_PROGRESSIVE,
|
State::STATE_PROGRESSIVE,
|
||||||
|
@ -212,10 +209,13 @@ return array(
|
||||||
'requirements' => array(),
|
'requirements' => array(),
|
||||||
'gateway' => 'paypal',
|
'gateway' => 'paypal',
|
||||||
),
|
),
|
||||||
'toggle_manual_input' => array(
|
'merchant_email' => array(
|
||||||
'type' => 'ppcp-text',
|
'title' => __( 'Email address', 'paypal-payments-for-woocommerce' ),
|
||||||
'title' => __( 'Manual mode', 'paypal-payments-for-woocommerce' ),
|
'type' => 'text',
|
||||||
'text' => '<button id="ppcp[toggle_manual_input]">' . __( 'Toggle to manual credential input', 'paypal-payments-for-woocommerce' ) . '</button>',
|
'required' => true,
|
||||||
|
'desc_tip' => true,
|
||||||
|
'description' => __( 'The email address of your PayPal account.', 'paypal-payments-for-woocommerce' ),
|
||||||
|
'default' => '',
|
||||||
'screens' => array(
|
'screens' => array(
|
||||||
State::STATE_START,
|
State::STATE_START,
|
||||||
State::STATE_PROGRESSIVE,
|
State::STATE_PROGRESSIVE,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue