

<div id="affiliate_shortcode_popup" style="display:block;" class="popup_div_outer">

    <div class="live-links-outer" id="affiliate_shortcode_popup_inner">
		<div class="container" id="memberpages_shortcode_popup_button">
			<h3 class="mb-4 border-bottom pb-2"><i class="fa fa-users" aria-hidden="true"></i>  Affiliate Info
			 <a href="<?= admin_url('admin.php?page=dap_memberpages'); ?>" title="Back to Member Pages" class="member_backicon">Return to Member Pages</a></h3> 
		 
			<div class="shortcode_container" style="display:none;"> 
				 <h5>Here is the DAP AffiliateInfo Shortcode</h5>
				<textarea  style=" height: 50px !important;"> [DAPAffiliateInfo/] </textarea>
			</div> 
			
			<!--div class="shortcode_container" style="display:block; height: 50px !important;"> 
				<textarea  style=" height: 50px !important;"> [DAPAffiliateInfo/] </textarea>
			</div--> 
			 		
			<div align="center" class="btn_outer">
				<a href="<?= admin_url('admin.php?page=dap_memberpages'); ?>"><button class="button-primary back-btn" id="backbtn">Back</button> </a>
				<button class="button-primary next-btn" id="affiliatebtn">Generate Shortcode</button>
			</div>     

		<br><br>
		</div>  
	</div>  
</div>  
	
	<script>

		jQuery('#affiliatebtn').on('click',function() {
			//tinymce.activeEditor.execCommand('mceInsertContent', false, "[DAPAffiliateInfo]");
			//e.preventDefault();	
			var shortcode = '[DAPAffiliateInfo/]';
				jQuery('.shortcode_container').show();
				jQuery('.shortcode_container textarea').html(shortcode);
		});
	</script>

