| @@ -49,39 +49,21 @@ | ||
| 49 | 49 | <button class="subscription-login-modal-close" aria-label="<?php esc_attr_e( 'Close', 'forumax' ); ?>">×</button> |
| 50 | 50 | <h3 class="frmx-inline-login-title"><?php echo esc_html( forumax_get_opt( 'forum_subscription_modal_title', __( 'Login to the community', 'forumax' ) ) ); ?></h3> |
| 51 | 51 | <p class="frmx-inline-login-subtitle"><?php echo esc_html( forumax_get_opt( 'forum_subscription_modal_subtitle', __( 'You must be logged in to subscribe to this forum.', 'forumax' ) ) ); ?></p> |
| 52 | 52 | <div class="frmx-subscription-login-form"> |
| 53 | - <?php if ( function_exists( 'forumax_get_opt' ) && forumax_get_opt( 'topic_login_shortcode' ) ) : ?> | |
| 54 | - <?php echo do_shortcode( forumax_get_opt( 'topic_login_shortcode' ) ); ?> | |
| 55 | - <?php else : ?> | |
| 56 | - <form method="post" action="<?php bbp_wp_login_action( array( 'context' => 'login_post' ) ); ?>" class="bbp-login-form"> | |
| 57 | - <fieldset class="bbp-form"> | |
| 58 | - <legend><?php esc_html_e( 'Log In', 'forumax' ); ?></legend> | |
| 59 | - | |
| 60 | - <div class="bbp-username"> | |
| 61 | - <label for="frmx-forum-sub-user-login"><?php esc_html_e( 'Username', 'forumax' ); ?>: </label> | |
| 62 | - <input type="text" name="log" value="" size="20" maxlength="100" id="frmx-forum-sub-user-login" placeholder="<?php esc_attr_e( 'Username or Email', 'forumax' ); ?>" autocomplete="off" /> | |
| 63 | - </div> | |
| 64 | - | |
| 65 | - <div class="bbp-password"> | |
| 66 | - <label for="frmx-forum-sub-user-pass"><?php esc_html_e( 'Password', 'forumax' ); ?>: </label> | |
| 67 | - <input type="password" name="pwd" value="" size="20" id="frmx-forum-sub-user-pass" placeholder="<?php esc_attr_e( 'Password', 'forumax' ); ?>" autocomplete="off" /> | |
| 68 | - </div> | |
| 69 | - | |
| 70 | - <div class="bbp-remember-me"> | |
| 71 | - <input type="checkbox" name="rememberme" value="forever" id="frmx-forum-sub-rememberme" /> | |
| 72 | - <label for="frmx-forum-sub-rememberme"><?php esc_html_e( 'Keep me signed in', 'forumax' ); ?></label> | |
| 73 | - </div> | |
| 74 | - | |
| 75 | - <?php do_action( 'login_form' ); ?> | |
| 76 | - | |
| 77 | - <div class="bbp-submit-wrapper"> | |
| 78 | - <button type="submit" name="user-submit" id="frmx-forum-sub-user-submit" class="button submit user-submit fill-brand"><?php esc_html_e( 'Log In', 'forumax' ); ?></button> | |
| 79 | - <?php bbp_user_login_fields(); ?> | |
| 80 | - </div> | |
| 81 | - </fieldset> | |
| 82 | - </form> | |
| 83 | - <?php endif; ?> | |
| 53 | + <?php | |
| 54 | + // Only render login here when the page has no inline topic login | |
| 55 | + // (e.g. forum category). Otherwise one form lives in form-topic. | |
| 56 | + if ( bbp_is_forum_category() ) : | |
| 57 | + forumax_render_topic_login_form(); | |
| 58 | + else : | |
| 59 | + ?> | |
| 60 | + <button type="button" class="button fill-brand frmx-scroll-to-login"> | |
| 61 | + <?php esc_html_e( 'Go to login form', 'forumax' ); ?> | |
| 62 | + </button> | |
| 63 | + <?php | |
| 64 | + endif; | |
| 65 | + ?> | |
| 84 | 66 | </div> |
| 85 | 67 | </div> |
| 86 | 68 | </div> |
| 87 | 69 | <?php endif; ?> |