<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<table class="form-table">
    
    <tr valign="top">
        <th scope="row" class="align-middle">
            <div class="th-div">
                <span class="mr-5"><?php esc_html_e( 'Shortcode', 'kirilkirkov-pdf-invoice-manager' ); ?></span>
                <a class="show-info" data-info="<?php esc_attr_e( 'Enable and place this shortcode to page in which your authorized users will see their invoices. If shortcode is not enable widget of the preview will be hidden. Its good to run the default wordpress cron to clear the stored from users pdf files into the uploads directory, WP Invoices has schedule to clean them by cron hourly. ', 'kirilkirkov-pdf-invoice-manager' ) ?>" href="javascript:;"></a>
            </div>
        </th>
        <td>
            <?php 
                $kirilkirkovwipdf_enable_shortcode_prev_inv = get_option($Config::INPUTS_PREFIX.'enable_shortcode_prev_inv');
            ?>
            <input type="hidden" name="<?php echo esc_attr($Config::INPUTS_PREFIX).'enable_shortcode_prev_inv'; ?>" value="0" />
            <label>
                <input type="checkbox" name="<?php echo esc_attr($Config::INPUTS_PREFIX).'enable_shortcode_prev_inv'; ?>" value="1" <?php echo $kirilkirkovwipdf_enable_shortcode_prev_inv && (int)$kirilkirkovwipdf_enable_shortcode_prev_inv === 1 ? 'checked' : ''; ?>>
                <?php esc_html_e( 'Enable shortcode (show invoices preview)', 'kirilkirkov-pdf-invoice-manager' ); ?>
            </label>
        </td>
        <td>
            <div class="flex">
                <div class="shortcode">
                    <span><?php esc_html_e('shortcode', 'kirilkirkov-pdf-invoice-manager'); ?></span>
                    <div>[<?php echo esc_attr($ShortCodes::SHORTCODE_PREVIEW_INV); ?>]</div>
                </div>
            </div>
        </td>
    </tr>

</table>
<input type="hidden" name="page_options" value="<?php echo esc_attr(sanitize_text_field($Config::CLIENTS_PAGE_INPUT_GROUP)); ?>" />
<?php settings_fields($Config::CLIENTS_PAGE_INPUT_GROUP); ?>