Last active
August 18, 2020 14:30
-
-
Save champsupertramp/b1cae3fe7867623e4c38ca850d331673 to your computer and use it in GitHub Desktop.
Ultimate Member - Terms & Conditions : Open to a new tab instead of displaying the full content in the form
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?> | |
<div class="um-field um-field-type_terms_conditions" data-key="use_terms_conditions_agreement" style="display: block;padding:0px"> | |
<div class="um-field-area"> | |
<div class="um-terms-conditions-content" style="display:none"> | |
<?php if ( ! empty( $args['use_terms_conditions_content_id'] ) ) { | |
if ( isset( $um_content_query ) ) { ?> | |
<a href="<?php echo get_the_permalink( $args['use_terms_conditions_content_id'] );?>" target="_blank" class="um-hide-terms"> | |
<?php echo ! empty( $args['use_terms_conditions_toggle_hide'] ) ? $args['use_terms_conditions_toggle_hide'] : __( 'Hide Terms', 'um-terms-conditions' ); ?> | |
</a> | |
<?php echo apply_filters( 'um_terms_conditions_tc_page_content', $um_content_query->post_content, $args ); | |
} | |
} ?> | |
</div> | |
</div> | |
<div class="um-field-area"> | |
<label class="um-field-checkbox"> | |
<input type="checkbox" name="use_terms_conditions_agreement" value="1"> | |
<span class="um-field-checkbox-state"> | |
<i class="um-icon-android-checkbox-outline-blank"></i> | |
</span> | |
<span class="um-field-checkbox-option"> | |
<a href="<?php echo get_the_permalink( $args['use_terms_conditions_content_id'] );?>" target="_blank" > | |
<?php echo ! empty( $args['use_terms_conditions_agreement'] ) ? $args['use_terms_conditions_agreement'] : __( 'Please confirm that you agree to our terms & conditions', 'um-terms-conditions' ); ?> | |
</a> | |
</span> | |
</label> | |
<div class="um-clear"></div> | |
<?php $errors = UM()->form()->errors; | |
if ( isset( $errors['use_terms_conditions_agreement'] ) ) { | |
$error_message = ! empty( $args['use_terms_conditions_error_text'] ) ? $args['use_terms_conditions_error_text'] : __( 'You must agree to our terms & conditions','um-terms-conditions' ); ?> | |
<p class="um-notice err"> | |
<i class="um-icon-ios-close-empty" onclick="jQuery(this).parent().fadeOut();"></i><?php echo $error_message ?> | |
</p> | |
<br /> | |
<?php } ?> | |
<div class="um-clear"></div> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment