<?php
if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

$license_key = get_option( 'awsm_team_pro_license' );
settings_errors();
?>
<div id="settings-awsm-settings-license" class=" wrap awsm-admin-settings">
    <h1><?php esc_html_e( 'AWSM Team Pro - License', 'awsm-team-pro'); ?></h1>

    <p><?php esc_html_e( 'Enter purchase code for AWSM Team Pro. This is required for automatic updates and support. ', 'awsm-team-pro' ); ?> <br> <?php esc_html_e( 'NOTE: You need to have a valid', 'awsm-team-pro' ); ?> <strong><?php esc_html_e( 'support licence', 'awsm-team-pro' ); ?></strong> <?php esc_html_e( 'for activating automatic updates', 'awsm-team-pro' ); ?> </p>

    <form method="POST" action="options.php" id="awsm-team-pro-license-form">
        <?php
        settings_fields( 'awsm-team-pro-license-settings' );
        ?>

        <div class="awsm-form-section-main awsm-sub-options-container" id="awsm-license-options-container">
            <table class="form-table">
                <tbody>
                    <tr>
                        <th scope="row">
                            <label for="awsm_team_pro_license"><?php esc_html_e( 'Envato Purchase Code', 'awsm-team-pro' ); ?></label>
                        </th>
                        <td>
                            <div class="awsm-team-pro-inputholder">
                                <input type="password" name="awsm_team_pro_license" id="awsm_team_pro_license" value="<?php echo esc_attr( $license_key ); ?>" class="regular-text" required />
                            </div>
                            <p class=" description awsm-team-pro-instructions">
                                <a href="https://goo.gl/BF6Jk6" target="_blank"><?php esc_html_e( 'How to get the purchase code', 'awsm-team-pro' ); ?></a>
                            </p>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div><!-- #awsm-license-options-container -->
        <div class="awsm-form-footer">
            <?php echo apply_filters( 'awsm_team_settings_submit_btn', get_submit_button(), 'license' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
        </div><!-- .awsm-form-footer -->
    </form>
</div> 
