<?php if ( ! defined( 'ABSPATH' ) ) { exit; } ?> 
<div id="embed-popup-wrap">
    <div id="embed-popup">
        <button title="Close" type="button" class="mfp-close">×</button>
        <div id="popup-header" class="ead-popup-header">
        <h1><?php _e('Add Document','ead');?></h1>
        </div>
        <div class="ead-section">
            <div id="embed-message" class="awsm-error" style="display:none;"><p></p></div>
            <div class="ead-container">
            <form action="" onSubmit="return false" method="post" enctype="multipart/form-data" id="Docuploader">
            <ul class="ead-options">
                <li><a href="#" id="ead-upload"><span><img src="<?php echo $this->plugin_url;?>images/icon-upload.png" alt="Upload document" /><?php _e('Upload Document','ead');?></span></a></li>
                <li><a href="#" id="ead-doc-url"><span><img src="<?php echo $this->plugin_url;?>images/icon-link.png" alt="Add From URL" /><?php _e('Add from URL','ead');?></span></a></li>
                <li><?php echo $this->providerlink('ead_dropbox','ead-dropbox','Dropbox') ;?></li>
                <li><?php echo $this->providerlink(array('ead_drivekey','ead_driveClient'),'ead-google','Drive') ;?></li>
                <li><?php echo $this->providerlink('ead_box','ead-box','Box') ;?></li>
            </ul>
            <div class="box addurl-box">
             <label for="awsm-url"><?php _e('Enter document URL','ead');?></label>
                <input name="awsm-url" type="text" class="opt dwl input-group-text" id="awsm-url" placeholder="http://www.example.com/filename.pdf" />
                <input type="button"  value="Add URL" class="ead-btn button-primary input-group-btn" id="add-url"/>  
                <div class="clear"></div>
                <a href="#" class="go-back">&larr; <?php _e('back','ead');?></a> 
            </div>        
            </form>
            </div><!--ead-container-->
            <div class="upload-success">
                <div class="inner">
                <div class="uploaded-doccument">
                    <p id="ead-filename"></p>
                    <span id="ead-filesize"></span>
                </div>
                <!-- <a class="ead-btn button" id="adv-options"><?php _e('Advanced Options','ead');?></a> -->
                <div class="clear"></div>
                </div>
                <div class="advanced-options">
                    <h3><?php _e('Advanced Options','ead');?> <span><?php _e('(Leave blank for default settings)','ead');?></span></h3>
                <ul class="option-fields">
                    <li>
                        <div class="f-left"><label><?php _e('Width','ead');?></label> <input type="text" name="width"  class="embedval embed-sanitize input-small" id="ead-width" data-setting="width" value="<?php echo get_option('ead_width', '100%' );?>"></div>
                        <div class="f-left"><label><?php _e('Height','ead');?></label> <input type="text" name="height" class="embedval embed-sanitize input-small" id="ead-height" data-setting="height" value="<?php echo get_option('ead_height', '500px' );?>"></div>
                        <div class="f-left" id="ead-downloadc">
                        <label><?php _e('Show Download Link',$this->text_domain);?></label> 
                        <?php 
                        $downoptions= array('all' => __('For all users',$this->text_domain),'logged' => __('For Logged-in users',$this->text_domain),'none' => __('No Download',$this->text_domain));
                        $this->selectbuilder('ead-download', $downoptions,esc_attr( get_option('ead-download')),'ead-usc','data-setting="download"'); 
                        ?> 
                        </div>
                        <div class="f-left" id="ead-download-text">
                        <label><?php _e('Download Text',$this->text_domain);?></label> 
                        <input type="text" name="text"  class="embedval" id="ead-text" data-setting="text" value="<?php echo get_option('ead_text', 'Download' );?>"> 
                        </div>
                        <div class="f-left last" id="new-provider">
                        <label><?php _e('Viewer',$this->text_domain);?></label> 
                        <?php 
                        $providers = array('google' => __('Google Docs Viewer',$this->text_domain),'microsoft' => __('Microsoft Office Online',$this->text_domain));
                        $this->selectbuilder('ead-provider', $providers,esc_attr( get_option('ead_provider','google')),'ead-usc','data-setting="viewer"'); 
                        ?> 
                        </div>

                        <div class="f-left" id="ead-pseudo" style="display:none">
                        <label><?php _e('Viewer',$this->text_domain);?></label> 
                        <select name="ead-pseudo" disabled>
                            <option value="box"><?php _e('Box','ead');?></option>
                            <option value="drive"><?php _e('Drive','ead');?></option>
                        </select> 
                        </div>
                        <div class="f-left last" id="ead-boxtheme"   style="display:none">
                        <label><?php _e('Theme',$this->text_domain);?></label> 
                        <?php 
                        $themes = array('dark' => __('Dark',$this->text_domain),'light' => __('Light',$this->text_domain));
                        $this->selectbuilder('ead-boxtype', $themes,'dark','ead-boxtheme'); 
                        ?> 
                        </div>   
                        <div class="clear"></div>
                    </li>
                    <li class="checkbox" id="eadcachemain">
                        <input type="checkbox" id="ead-cache" class="ead-usc" value="on">
                        <label for="ead-cache"><?php _e('Do not cache this file (Affects performance)','ead');?></label> 
                    </li>
                     <li>
                        <label><?php _e('Shortcode Preview', 'ead'); ?></label>
                        <textarea name="shortcode" style="width:100%" id="shortcode" readonly="readonly"></textarea>
                    </li>            
                </ul>
            </div>
        </div>
       </div>  
        <div class="mceActionPanel ead-action-panel">
        <div style="float: right">
            <input type="button" id="insert-doc" name="insert" data-txt="<?php _e('Insert', 'ead'); ?>" data-loading="<?php _e('Loading...', 'ead'); ?>" class="ead-btn button button-primary button-medium" value="<?php _e('Insert', 'ead'); ?>" disabled/>
        </div>
        
        <div style="float: left">
            <input type="button" name="cancel"  class="ead-btn button cancel-embed button-medium" value="<?php _e('Cancel', 'ead'); ?>" />
        </div>
        <div class="clear"></div>
        </div>
    
    </div>
</div> 