<div class="std-settings-each-section" data-tab="email" style="display:none;">
    <div class="std-field-wrap">
        <label><?php esc_html_e('From Email', 'subscribe-to-download'); ?></label>
        <div class="std-field">
            <input type="text" name="form_details[email][from_email]" value="<?php echo (!empty($form_details['email']['from_email'])) ? esc_attr($form_details['email']['from_email']) : ''; ?>" />
            <p class="description"><?php esc_html_e('Please enter the from email which will be used to send the email to subscribers. Please enter any email which won\'t resembele the real person\'s email such as noreply@yoursiteurl.com ', 'subscribe-to-download'); ?></p>
        </div>
    </div>
    <div class="std-field-wrap">
        <label><?php esc_html_e('From Name', 'subscribe-to-download'); ?></label>
        <div class="std-field">
            <input type="text" name="form_details[email][from_name]" value="<?php echo (!empty($form_details['email']['from_name'])) ? esc_attr($form_details['email']['from_name']) : ''; ?>" />
            <p class="description"><?php esc_html_e('Please enter the from name which will be used to send the email to subscribers. Please enter any email which won\'t resembele the real person\'s email such as No Reply ', 'subscribe-to-download'); ?></p>
        </div>
    </div>

    <div class="std-double-optin-ref" <?php echo (empty($form_details['general']['double_optin'])) ? 'style="display:none;"' : ''; ?>>
        <div class="std-form-each-component">
            <div class="std-component-head std-clearfix">
                <h4><?php esc_html_e('Confirmation Email', 'subscribe-to-download'); ?></h4>
                <span class="dashicons dashicons-arrow-down"></span>
            </div>
            <div class="std-component-body">
                <div class="std-field-wrap">
                    <label><?php esc_html_e('Confirmation Email Subject', 'subscribe-to-download'); ?></label>
                    <div class="std-field">
                        <input type="text" name="form_details[email][confirmation_subject]" value="<?php echo (!empty($form_details['email']['confirmation_subject'])) ? esc_attr($form_details['email']['confirmation_subject']) : ''; ?>" />
                        <p class="description"><?php esc_html_e('Please enter the from email which will be used to send the email to subscribers. Please enter any email which won\'t resembele the real person\'s email such as noreply@yoursiteurl.com ', 'subscribe-to-download'); ?></p>
                    </div>
                </div>
                <div class="std-field-wrap">
                    <label><?php esc_html_e('Confirmation Email Message', 'subscribe-to-download'); ?></label>
                    <div class="std-field">
                        <textarea name="form_details[email][confirmation_email_message]"><?php echo (!empty($form_details['email']['confirmation_email_message'])) ? $this->output_converting_br($form_details['email']['confirmation_email_message']) : $this->get_default_confirmation_email_message(); ?></textarea>
                        <p class="description"><?php esc_html_e('Please use #confirmation_link,#first_name, #last_name which will be replaced with the confirmation link in the email.', 'subscribe-to-download'); ?></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="std-form-each-component">
        <div class="std-component-head std-clearfix">
            <h4><?php esc_html_e('Download Email', 'subscribe-to-download'); ?></h4>
            <span class="dashicons dashicons-arrow-down"></span>
        </div>
        <div class="std-component-body">
            <div class="std-field-wrap">
                <label><?php esc_html_e('Download Email Subject', 'subscribe-to-download'); ?></label>
                <div class="std-field">
                    <input type="text" name="form_details[email][subject]" value="<?php echo (!empty($form_details['email']['subject'])) ? esc_attr($form_details['email']['subject']) : ''; ?>" />
                </div>
            </div>
            <div class="std-field-wrap">
                <label><?php esc_html_e('Download Email Message', 'subscribe-to-download'); ?></label>
                <div class="std-field">
                    <textarea name="form_details[email][email_message]"><?php echo (!empty($form_details['email']['email_message'])) ? $this->output_converting_br($form_details['email']['email_message']) : $this->get_default_email_message(); ?></textarea>
                    <p class="description"><?php esc_html_e('Please use #download_link, #first_name, #last_name which will be replaced with the download link, first name and last name of the subscriber in the email.', 'subscribe-to-download'); ?></p>
                </div>
            </div>
        </div>
    </div>
    <div class="std-form-each-component">
        <div class="std-component-head std-clearfix">
            <h4><?php esc_html_e('Download Notification', 'subscribe-to-download'); ?></h4>
            <span class="dashicons dashicons-arrow-down"></span>
        </div>
        <div class="std-component-body">
            <div class="std-field-wrap">
                <label><?php esc_html_e('Status', 'subscribe-to-download'); ?></label>
                <div class="std-field">
                    <input type="checkbox" name="form_details[email][download_notification]" value="1" <?php echo (!empty($form_details['email']['download_notification'])) ? 'checked="checked"' : ''; ?> class="std-checkbox-toggle-trigger" data-toggle-class="std-download-notification-ref" />
                </div>
            </div>
            <div class="std-download-notification-ref <?php echo (empty($form_details['email']['download_notification'])) ? 'std-display-none' : ''; ?>">
                <div class="std-field-wrap">
                    <label><?php esc_html_e('Download Notification Email Subject', 'subscribe-to-download'); ?></label>
                    <div class="std-field">
                        <input type="text" name="form_details[email][download_notification_subject]" value="<?php echo (!empty($form_details['email']['download_notification_subject'])) ? esc_attr($form_details['email']['download_notification_subject']) : ''; ?>" />
                    </div>
                </div>
                <div class="std-field-wrap">
                    <label><?php esc_html_e('Notification Emails', 'subscribe-to-download'); ?></label>
                    <div class="std-field">
                        <input type="text" name="form_details[email][download_notification_emails]" value="<?php echo (!empty($form_details['email']['download_notification_emails'])) ? esc_attr($form_details['email']['download_notification_emails']) : ''; ?>" />
                        <p class="description"><?php esc_html_e('Please enter the comma separated email address in which you want to send the notification. If kept blank, it will send to the admin of this site.', 'subscribe-to-download'); ?></p>
                    </div>
                </div>
                <div class="std-field-wrap">
                    <label><?php esc_html_e('Download Notification Email Message', 'subscribe-to-download'); ?></label>
                    <div class="std-field">
                        <textarea name="form_details[email][download_notification_email_message]"><?php echo (!empty($form_details['email']['download_notification_email_message'])) ? $this->output_converting_br($form_details['email']['download_notification_email_message']) : $this->get_default_download_notification_message(); ?></textarea>
                        <p class="description"><?php esc_html_e('Please use #download_file, #name, #email & #custom_fields which will be replaced in the email with the downloaded file name,subscriber name and email address from which the download has been done.', 'subscribe-to-download'); ?></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="std-form-each-component">
        <div class="std-component-head std-clearfix">
            <h4><?php esc_html_e('Admin Notification', 'subscribe-to-download'); ?></h4>
            <span class="dashicons dashicons-arrow-down"></span>
        </div>
        <div class="std-component-body">
            <div class="std-field-wrap">
                <label><?php esc_html_e('Status', 'subscribe-to-download'); ?></label>
                <div class="std-field">
                    <input type="checkbox" name="form_details[email][admin_notification]" value="1" <?php echo (!empty($form_details['email']['admin_notification'])) ? 'checked="checked"' : ''; ?> class="std-checkbox-toggle-trigger" data-toggle-class="std-admin-notification-ref" />
                </div>
            </div>
            <div class="std-admin-notification-ref <?php echo (empty($form_details['email']['admin_notification'])) ? 'std-display-none' : ''; ?>">
                <div class="std-field-wrap">
                    <label><?php esc_html_e('Admin Notification Email Subject', 'subscribe-to-download'); ?></label>
                    <div class="std-field">
                        <input type="text" name="form_details[email][admin_notification_subject]" value="<?php echo (!empty($form_details['email']['admin_notification_subject'])) ? esc_attr($form_details['email']['admin_notification_subject']) : ''; ?>" />
                    </div>
                </div>
                <div class="std-field-wrap">
                    <label><?php esc_html_e('Notification Emails', 'subscribe-to-download'); ?></label>
                    <div class="std-field">
                        <input type="text" name="form_details[email][admin_notification_emails]" value="<?php echo (!empty($form_details['email']['admin_notification_emails'])) ? esc_attr($form_details['email']['admin_notification_emails']) : ''; ?>" />
                        <p class="description"><?php esc_html_e('Please enter the comma separated email address in which you want to send the notification. If kept blank, it will send to the admin of this site.', 'subscribe-to-download'); ?></p>
                    </div>
                </div>
                <div class="std-field-wrap">
                    <label><?php esc_html_e('Admin Notification Email Message', 'subscribe-to-download'); ?></label>
                    <div class="std-field">
                        <textarea name="form_details[email][admin_notification_email_message]"><?php echo (!empty($form_details['email']['admin_notification_email_message'])) ? $this->output_converting_br($form_details['email']['admin_notification_email_message']) : $this->get_default_admin_notification_message(); ?></textarea>
                        <p class="description"><?php esc_html_e('Please use #name, #email & #custom_fields which will be replaced in the email with the subscriber name, email address and custom fields received from which the subscription has been done.', 'subscribe-to-download'); ?></p>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>