mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-07 19:54:15 +08:00
Merge pull request #25 from woocommerce/issue-23-hide-credentials
Enable merchant to hide credentials after showing them
This commit is contained in:
commit
d1f1215dc9
3 changed files with 30 additions and 6 deletions
|
@ -4,9 +4,22 @@
|
|||
|
||||
#field-client_secret,
|
||||
#field-client_id,
|
||||
#field-merchant_id {
|
||||
#field-merchant_id{
|
||||
display: none;
|
||||
}
|
||||
#field-client_secret.show,
|
||||
#field-client_id.show,
|
||||
#field-merchant_id.show {
|
||||
display: table-row;
|
||||
}
|
||||
|
||||
#field-toggle_manual_input span.hide,
|
||||
#field-toggle_manual_input.show span.show{
|
||||
display: none;
|
||||
}
|
||||
#field-toggle_manual_input.show span.hide {
|
||||
display: unset;
|
||||
}
|
||||
|
||||
#field-toggle_manual_input button {
|
||||
color: #0073aa;
|
||||
|
|
|
@ -64,10 +64,10 @@ const groupToggleSelect = (selector, group) => {
|
|||
'click',
|
||||
(event) => {
|
||||
event.preventDefault();
|
||||
document.querySelector('#field-toggle_manual_input').style.display = 'none';
|
||||
document.querySelector('#field-merchant_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-toggle_manual_input').classList.toggle('show');
|
||||
document.querySelector('#field-merchant_id').classList.toggle('show');
|
||||
document.querySelector('#field-client_id').classList.toggle('show');
|
||||
document.querySelector('#field-client_secret').classList.toggle('show');
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -236,7 +236,7 @@ return array(
|
|||
'toggle_manual_input' => array(
|
||||
'type' => 'ppcp-text',
|
||||
'title' => __( 'Manual mode', 'paypal-payments-for-woocommerce' ),
|
||||
'text' => '<button id="ppcp[toggle_manual_input]">' . __( 'Toggle to manual credential input', 'paypal-payments-for-woocommerce' ) . '</button>',
|
||||
'text' => '<button id="ppcp[toggle_manual_input]"><span class="show">' . __( 'Show manual credential input', 'paypal-payments-for-woocommerce' ) . '</span><span class="hide">' . __( 'Hide manual credential input', 'paypal-payments-for-woocommerce' ) . '</span></button>',
|
||||
'screens' => array(
|
||||
State::STATE_START,
|
||||
State::STATE_PROGRESSIVE,
|
||||
|
@ -287,6 +287,17 @@ return array(
|
|||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
|
||||
'checkout_settings_heading' => array(
|
||||
'heading' => __( 'PayPal Checkout Plugin Settings', 'paypal-payments-for-woocommerce' ),
|
||||
'type' => 'ppcp-heading',
|
||||
'screens' => array(
|
||||
State::STATE_PROGRESSIVE,
|
||||
State::STATE_ONBOARDED,
|
||||
),
|
||||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
'title' => array(
|
||||
'title' => __( 'Title', 'paypal-payments-for-woocommerce' ),
|
||||
'type' => 'text',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue