function initValidateNode(oldNode) {
  let newNode = $('#validate_template').clone();
  // Add attributes necessary for validation functions:
  // Convert the placeholder onclick method into the button's onclick method.
  $('.validate_button', newNode).attr('onclick', oldNode.attr('onclick'));
  oldNode.removeAttr('onclick');
  // Add an id to the button.
  if (oldNode.attr('id')) {
    $('.validate_button', newNode).attr('id', oldNode.attr('id') + '_button');
  }
  oldNode.append(newNode.children());
}
/**
 * Sets up a validator div (button, status indicator, error list, etc.) by
 * inserting contents into a div in reaction.html.
 * @param {!Node} oldNode Target node for the new validation elements.
 */
Sets up a validator div (button, status indicator, error list, etc.) by
inserting contents into a div in reaction.html.
@param {!Node} oldNode Target node for the new validation elements.
Sets up a validator div ( button status indicator error list etc . ) by inserting contents into a div in reaction . html . @param { !Node } oldNode Target node for the new validation elements .
function initValidateNode(oldNode) {
  let newNode = $('#validate_template').clone();
  $('.validate_button', newNode).attr('onclick', oldNode.attr('onclick'));
  oldNode.removeAttr('onclick');
  if (oldNode.attr('id')) {
    $('.validate_button', newNode).attr('id', oldNode.attr('id') + '_button');
  }
  oldNode.append(newNode.children());
}
function initValidateNode ( oldNode ) { let newNode = $ ( '#validate_template' ) . clone ( ) ; $ ( '.validate_button' , newNode ) . attr ( 'onclick' , oldNode . attr ( 'onclick' ) ) ; oldNode . removeAttr ( 'onclick' ) ; if ( oldNode . attr ( 'id' ) ) { $ ( '.validate_button' , newNode ) . attr ( 'id' , oldNode . attr ( 'id' ) + '_button' ) ; } oldNode . append ( newNode . children ( ) ) ; }
Sets up a validator div (button, status indicator, error list, etc.)
Sets up a validator div ( button status indicator error list etc . )
// Add attributes necessary for validation functions: // Convert the placeholder onclick method into the button's onclick method. // Add an id to the button.