| 1 |
<?php |
| 2 |
/** |
| 3 |
* Login page template |
| 4 |
* |
| 5 |
* @package Welcart |
| 6 |
*/ |
| 7 |
|
| 8 |
$html = '<div id="memberpages"> |
| 9 |
|
| 10 |
<div class="whitebox">'; |
| 11 |
|
| 12 |
$html .= '<div class="header_explanation">'; |
| 13 |
$header = ''; |
| 14 |
$html .= apply_filters( 'usces_filter_login_page_header', $header ); |
| 15 |
$html .= '</div>'; |
| 16 |
|
| 17 |
if ( usces_is_error_message() ) { |
| 18 |
$html .= '<div class="error_message">' . $this->error_message . '</div>'; |
| 19 |
} |
| 20 |
$html .= '<div class="loginbox"> |
| 21 |
<form name="loginform" id="loginform" action="' . apply_filters( 'usces_filter_login_form_action', esc_url( USCES_MEMBER_URL ) ) . '" method="post"> |
| 22 |
<p> |
| 23 |
<label>' . esc_html__( 'e-mail adress', 'usces' ) . '<br /> |
| 24 |
<input type="text" name="loginmail" id="loginmail" class="loginmail" value="' . esc_attr( usces_remembername( 'return' ) ) . '" size="20" /></label> |
| 25 |
</p> |
| 26 |
<p> |
| 27 |
<label>' . esc_html__( 'password', 'usces' ) . '<br /> |
| 28 |
<input class="hidden" value=" " /> |
| 29 |
<input type="password" name="loginpass" id="loginpass" class="loginpass" size="20" autocomplete="off" /></label> |
| 30 |
</p> |
| 31 |
<p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" /> ' . esc_html__( 'memorize login information', 'usces' ) . '</label></p> |
| 32 |
<p class="submit">'; |
| 33 |
$loginbutton = '<input type="submit" name="member_login" id="member_login" value="' . esc_html__( 'Log-in', 'usces' ) . '" />'; |
| 34 |
$html .= apply_filters( 'usces_filter_login_button', $loginbutton ); |
| 35 |
$html .= '</p>'; |
| 36 |
$html .= '<p class="nav"> |
| 37 |
<a href="' . esc_url( USCES_LOSTMEMBERPASSWORD_URL ) . '" title="' . esc_html__( 'Did you forget your password?', 'usces' ) . '">' . esc_html__( 'Did you forget your password?', 'usces' ) . '</a> |
| 38 |
</p>'; |
| 39 |
$html = apply_filters( 'usces_filter_login_inform', $html ); |
| 40 |
|
| 41 |
$noncekey = 'post_member' . $this->get_uscesid( false ); |
| 42 |
$html .= wp_nonce_field( $noncekey, 'wel_nonce', true, false ); |
| 43 |
$html .= '</form> |
| 44 |
|
| 45 |
<p id="nav" class="nav"> |
| 46 |
<a href="' . esc_url( USCES_NEWMEMBER_URL ) . apply_filters( 'usces_filter_newmember_urlquery', null ) . '" title="' . esc_html__( 'New enrollment for membership.', 'usces' ) . '">' . esc_html__( 'New enrollment for membership.', 'usces' ) . '</a> |
| 47 |
</p> |
| 48 |
|
| 49 |
</div>'; |
| 50 |
|
| 51 |
$html .= '<div class="footer_explanation">'; |
| 52 |
$footer = ''; |
| 53 |
$html .= apply_filters( 'usces_filter_login_page_footer', $footer ); |
| 54 |
$html .= '</div>'; |
| 55 |
|
| 56 |
$html .= '</div> |
| 57 |
|
| 58 |
</div> |
| 59 |
|
| 60 |
<script type="text/javascript">'; |
| 61 |
if ( usces_is_login() ) { |
| 62 |
$html .= 'setTimeout( function(){ try{ |
| 63 |
d = document.getElementById(\'loginpass\'); |
| 64 |
d.value = \'\'; |
| 65 |
d.focus(); |
| 66 |
} catch(e){} |
| 67 |
}, 200);'; |
| 68 |
} else { |
| 69 |
$html .= 'try{document.getElementById(\'loginmail\').focus();}catch(e){}'; |
| 70 |
} |
| 71 |
$html .= '</script>'; |
| 72 |
|