function templateSettings(node) {
    $('#adv-templ').hide()
    $('#show-templ-props').css( 'cursor', 'pointer' )
    $('#show-templ-props').on('click', function() { // (e) {
        $('#adv-templ').toggle()
        if ( $('#adv-templ').is(':visible') ) {
            $('#show-templ-props').html('<i class="fa fa-caret-down"></i> Template Settings')
        } else {
            $('#show-templ-props').html('<i class="fa fa-caret-right"></i> Template Settings')
        }
    })

    // Populate the template selection drop-down and select default (in advanced)
    populateTemplateDropdown(node)

    // Handle change of template - NB: Change also happens when panel is opened.
    $('#node-input-templateFolder').on('change', function() { // (e) {
        // update the help tip
        if ( RED.settings.uibuilderTemplates[node.templateFolder] )
            $('#node-templSel-info').text(RED.settings.uibuilderTemplates[node.templateFolder].description)
        // Check if the dependencies are installed, warn if not + return the template details
        const templateDetails = checkDependencies()
        // Show the template location if needed
        templateChange(templateDetails)
    })

    // Button press for loading new template
    $('#btn-load-template').on('click', function(e) {
        e.preventDefault() // don't trigger normal click event
        btnTemplate()
    })
}
Configure the template dropdown & setup button handlers (called from onEditPrepare)
@param {object} node A reference to the panel's `this` object