pressbooks aldine theme the theme used for the front page or default book
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

33 lines
1.0 KiB

document.addEventListener( 'DOMContentLoaded', function () {
let checkbox = document.getElementById( '_customize-input-pb_network_contact_form' );
let email = document.getElementById( 'customize-control-pb_network_contact_email' );
let link = document.getElementById( 'customize-control-pb_network_contact_link' );
let title = document.getElementById( 'customize-control-pb_network_contact_form_title' );
checkbox.addEventListener( 'click', toggleReadOnly );
function toggleReadOnly() {
if ( checkbox.checked === false ) {
email.classList.add( 'hidden' );
email.style.cssText = null;
title.classList.add( 'hidden' );
title.style.cssText = null;
link.classList.remove( 'hidden' );
link.style.cssText = 'display: list-item;';
} else {
email.classList.remove( 'hidden' );
email.style.cssText = 'display: list-item;';
title.classList.remove( 'hidden' );
title.style.cssText = 'display: list-item;';
link.classList.add( 'hidden' );
link.style.cssText = null;
}
}
toggleReadOnly();
} );