<div class="std-settings-each-section" data-tab="form" style="display:none;">
    <div class="std-form-left">

        <div class="std-form-each-component">
            <div class="std-component-head std-clearfix">
                <h4><?php esc_html_e('Heading', '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('Show', 'subscribe-to-download'); ?></label>
                    <div class="std-field">
                        <input type="checkbox" name="form_details[form][heading][show]" value="1" <?php echo (!empty($form_details['form']['heading']['show'])) ? 'checked="checked"' : ''; ?> />
                    </div>
                </div>
                <div class="std-field-wrap">
                    <label><?php esc_html_e('Heading Text', 'subscribe-to-download'); ?></label>
                    <div class="std-field">
                        <textarea name="form_details[form][heading][text]"><?php echo (!empty($form_details['form']['heading']['text'])) ? $this->sanitize_html($form_details['form']['heading']['text']) : ''; ?></textarea>
                    </div>
                </div>
            </div>
        </div>
        <div class="std-form-each-component">
            <div class="std-component-head std-clearfix">
                <h4><?php esc_html_e('Sub Heading', '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('Show', 'subscribe-to-download'); ?></label>
                    <div class="std-field">
                        <input type="checkbox" name="form_details[form][sub_heading][show]" value="1" <?php echo (!empty($form_details['form']['sub_heading']['show'])) ? 'checked="checked"' : ''; ?> />
                    </div>
                </div>
                <div class="std-field-wrap">
                    <label><?php esc_html_e('Sub Heading Text', 'subscribe-to-download'); ?></label>
                    <div class="std-field">
                        <textarea name="form_details[form][sub_heading][text]"><?php echo (!empty($form_details['form']['sub_heading']['text'])) ? $this->sanitize_html($form_details['form']['sub_heading']['text']) : ''; ?></textarea>
                    </div>
                </div>
            </div>
        </div>
        <div class="std-form-each-component">
            <div class="std-component-head std-clearfix">
                <h4><?php esc_html_e('Name', '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('Show', 'subscribe-to-download'); ?></label>
                    <div class="std-field">
                        <input type="checkbox" name="form_details[form][name][show]" value="1" <?php echo (!empty($form_details['form']['name']['show'])) ? 'checked="checked"' : ''; ?> />
                    </div>
                </div>
                <div class="std-field-wrap">
                    <label><?php esc_html_e('Required', 'subscribe-to-download'); ?></label>
                    <div class="std-field">
                        <input type="checkbox" name="form_details[form][name][required]" value="1" <?php echo (!empty($form_details['form']['name']['required'])) ? 'checked="checked"' : ''; ?> />
                    </div>
                </div>

                <div class="std-field-wrap">
                    <label><?php esc_html_e('Label', 'subscribe-to-download'); ?></label>
                    <div class="std-field">
                        <input type="text" name="form_details[form][name][label]" value="<?php echo (!empty($form_details['form']['name']['label'])) ? esc_attr($form_details['form']['name']['label']) : ''; ?>" />
                    </div>
                </div>
            </div>
        </div>
        <div class="std-form-each-component">
            <div class="std-component-head std-clearfix">
                <h4><?php esc_html_e('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('Label', 'subscribe-to-download'); ?></label>
                    <div class="std-field">
                        <input type="text" name="form_details[form][email][label]" value="<?php echo (!empty($form_details['form']['email']['label'])) ? esc_attr($form_details['form']['email']['label']) : ''; ?>" />
                    </div>
                </div>
            </div>
        </div>
        <div class="std-form-each-component">
            <div class="std-component-head std-clearfix">
                <h4><?php esc_html_e('Custom Fields', 'subscribe-to-download'); ?></h4>
                <span class="dashicons dashicons-arrow-down"></span>
            </div>
            <div class="std-component-body">
                <?php include(STD_PATH . '/inc/views/backend/form-sections/custom-field-add-form.php'); ?>
                <div class="std-fields-holder std-sortable">
                    <?php
                    $custom_field_list = STD_CUSTOM_FIELD_TYPE_LIST;
                    if (!empty($form_details['form']['custom_fields'])) {
                        foreach ($form_details['form']['custom_fields'] as $field_key => $field_details) {
                            $field_type = $field_details['field_type'];
                            $field_name_prefix = 'form_details[form][custom_fields][' . $field_key . ']';
                            $custom_field_type_label = $custom_field_list[$field_type]['label'];
                            include(STD_PATH . '/inc/views/backend/form-sections/custom-fields/custom-fields-holder.php');
                    ?>

                    <?php
                        }
                    }
                    ?>
                </div>
            </div>
        </div>

        <div class="std-form-each-component">
            <div class="std-component-head std-clearfix">
                <h4><?php esc_html_e('Terms and Agreement', '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('Show', 'subscribe-to-download'); ?></label>
                    <div class="std-field">
                        <input type="checkbox" name="form_details[form][terms_agreement][show]" <?php echo (!empty($form_details['form']['terms_agreement']['show'])) ? 'checked="checked"' : ''; ?> />
                    </div>
                </div>
                <div class="std-field-wrap">
                    <label><?php esc_html_e('Text', 'subscribe-to-download'); ?></label>
                    <div class="std-field">
                        <textarea name="form_details[form][terms_agreement][agreement_text]"><?php echo (!empty($form_details['form']['terms_agreement']['agreement_text'])) ? $this->sanitize_html($form_details['form']['terms_agreement']['agreement_text']) : ''; ?></textarea>
                        <p class="description"><?php esc_html_e('You can enter basic html tags such as strong, a, ul, li etc.', 'subscribe-to-download'); ?></p>

                    </div>
                </div>
            </div>
        </div>
        <div class="std-form-each-component">
            <div class="std-component-head">
                <div class="std-clearfix">
                    <h4>
                        <?php esc_html_e('GDPR Agreement', 'subscribe-to-download'); ?>
                        <span class="std-field-info"> - <?php esc_html_e('This field is useful to take consent from the user to add them in the marketing list. If they don\'t check this checkbox, they won\'t be subscribed to third party subscription services.', 'subscribe-to-download'); ?></span>
                    </h4>
                    <span class="dashicons dashicons-arrow-down"></span>
                </div>

            </div>
            <div class="std-component-body">
                <div class="std-field-wrap">
                    <label><?php esc_html_e('Show', 'subscribe-to-download'); ?></label>
                    <div class="std-field">
                        <input type="checkbox" name="form_details[form][gdpr_agreement][show]" <?php echo (!empty($form_details['form']['gdpr_agreement']['show'])) ? 'checked="checked"' : ''; ?> />

                    </div>
                </div>
                <div class="std-field-wrap">
                    <label><?php esc_html_e('Required', 'subscribe-to-download'); ?></label>
                    <div class="std-field">
                        <input type="checkbox" name="form_details[form][gdpr_agreement][required]" value="1" <?php echo (!empty($form_details['form']['gdpr_agreement']['required'])) ? 'checked="checked"' : ''; ?> />
                    </div>
                </div>
                <div class="std-field-wrap">
                    <label><?php esc_html_e('Text', 'subscribe-to-download'); ?></label>
                    <div class="std-field">
                        <textarea name="form_details[form][gdpr_agreement][agreement_text]"><?php echo (!empty($form_details['form']['gdpr_agreement']['agreement_text'])) ? $this->sanitize_html($form_details['form']['gdpr_agreement']['agreement_text']) : ''; ?></textarea>
                        <p class="description"><?php esc_html_e('You can enter basic html tags such as strong, a, ul, li etc.', '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('Subscribe Button', '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('Button Text', 'subscribe-to-download'); ?></label>
                    <div class="std-field">
                        <input type="text" name="form_details[form][subscribe_button][button_text]" value="<?php echo (!empty($form_details['form']['subscribe_button']['button_text'])) ? esc_attr($form_details['form']['subscribe_button']['button_text']) : esc_attr__('Subscribe & Download', 'subscribe-to-download'); ?>">
                    </div>
                </div>
            </div>
        </div>
        <div class="std-form-each-component">
            <div class="std-component-head std-clearfix">
                <h4><?php esc_html_e('Footer', '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('Show', 'subscribe-to-download'); ?></label>
                    <div class="std-field">
                        <input type="checkbox" name="form_details[form][footer][show]" <?php echo (!empty($form_details['form']['footer']['show'])) ? 'checked="checked"' : ''; ?> />
                    </div>
                </div>
                <div class="std-field-wrap">
                    <label><?php esc_html_e('Footer Text', 'subscribe-to-download'); ?></label>
                    <div class="std-field">
                        <textarea name="form_details[form][footer][footer_text]"><?php echo (!empty($form_details['form']['footer']['footer_text'])) ? $this->sanitize_html($form_details['form']['footer']['footer_text']) : ''; ?></textarea>
                    </div>
                </div>
            </div>
        </div>

    </div>
    <div class="std-form-right">
        <a href="<?php echo esc_url(STD_IMG_DIR . '/layout-reference.png'); ?>" target="_blank">
            <img src="<?php echo esc_url(STD_IMG_DIR . '/layout-reference.png'); ?>" />
        </a>

    </div>
</div>