jQuery( function( $ ) {
	// show warning when filename does not contain unique identifier
	$('#wpo-wcpdf-settings #filename').change(function(){
		var filename = $(this).val();
		if ( filename.length > 0 && ( filename.indexOf("{{") == -1 || filename.indexOf("}}") == -1 ) ) {
			$(this).closest('td').addClass('setting-warning');
		} else {
			$(this).closest('td').removeClass('setting-warning');
		}
	}).change();
});