'',
'accept_terms' => false,
);
function display() {
if ( ! $this->license_key && defined( 'GF_LICENSE_KEY' ) ) {
$this->license_key = GF_LICENSE_KEY;
}
?>
', '' ); ?>
validation_message( 'license_key', false );
if ( $key_error ) {
echo $key_error;
}
?>
validation_message( 'accept_terms', false );
if ( $message || $key_error || $this->accept_terms ) {
?>
is_valid_key = true;
$license_key = $this->license_key;
if ( empty ( $license_key ) ) {
$message = esc_html__( 'Please enter a valid license key.', 'gravityforms' ) . '';
$this->set_field_validation_result( 'license_key', $message );
$this->is_valid_key = false;
} else {
$key_info = GFCommon::get_key_info( $license_key );
if ( empty( $key_info ) || ( ! $key_info['is_active'] ) ){
$message = " " . __( 'Invalid or Expired Key : Please make sure you have entered the correct value and that your key is not expired.', 'gravityforms' ) . '';
$this->set_field_validation_result( 'license_key', $message );
$this->is_valid_key = false;
}
}
if ( ! $this->is_valid_key && ! $this->accept_terms ) {
$this->set_field_validation_result( 'accept_terms', __( 'Please accept the terms', 'gravityforms' ) );
}
$valid = $this->is_valid_key || ( ! $this->is_valid_key && $this->accept_terms );
return $valid;
}
function install() {
if ( $this->license_key ) {
GFFormsModel::save_key( $this->license_key );
$version_info = GFCommon::get_version_info( false );
}
}
function get_previous_button_text() {
return '';
}
}