function templateChange(templateDetails) {
    const elLocation = $('#node-input-extTemplate')
    const etInput = $('#et-input')
    // If template.location is not empty, show the location but make it read only
    if ( templateDetails && templateDetails.location ) {
        elLocation
            .val(templateDetails.location)
            .prop('readonly', true)
        etInput.show()
        // .css('background-color', '#eee')
    } else if ( $('#node-input-templateFolder').val() === 'external' ) {
        // Unhide the external template name input if external selected
        elLocation
            .val('')
            .prop('readonly', false)
        etInput.show()
    } else {
        // Reset and hide the external template name input
        elLocation
            .val('')
            .prop('readonly', false)
        etInput.hide()
        // .css('background-color', '#fff')
    }
    // Show the template description
    if ( templateDetails && templateDetails.description ) $('#template-descr').html(templateDetails.description)
}
Handle a template dropdown change
@param {object} templateDetails The template details object