Lost password form
authorlaury <laury@gaslightmedia.com>
Fri, 3 Jun 2016 19:12:14 +0000 (15:12 -0400)
committerlaury <laury@gaslightmedia.com>
Fri, 3 Jun 2016 19:12:14 +0000 (15:12 -0400)
functions.php
glm-members-only-template.php
password-lost-form.php [new file with mode: 0644]

index dcaa7f8..4ad743f 100644 (file)
@@ -244,6 +244,6 @@ function front_end_blank_credentials( $login, $username, $password ) {
             exit;
         }
     }
-}
+}    
 
 ?>
\ No newline at end of file
index 366aff7..720cf35 100644 (file)
@@ -17,7 +17,7 @@ Template Name: GLM Members Only Template
         <?php } ?>
                 <div class="row">
                     <div id="main-content" class="small-12 columns">         
-                    <?php if (current_user_can("glm_members_login")) { ?>
+                    <?php if (current_user_can("glm_members_main_menu")) { ?>
                         <div id="glm-member-front-header" class="small-12 columns">
                             <div class='glm-member-greeting'>Hello,     <?php $current_user = wp_get_current_user();echo $current_user->user_login ?>.</div>
                             <a class='button glm-button' href="<?php echo wp_logout_url( home_url() ); ?>">Logout</a>
@@ -36,7 +36,7 @@ Template Name: GLM Members Only Template
                         <div class="wp_login_error">
                             <p id="glm-member-login-notification">
                             <?php if( isset( $_GET['login'] ) && $_GET['login'] == 'failed' ) { ?>
-                                The password you entered is incorrect, Please try again.
+                                The information you entered is incorrect. Please try again.
                             <?php } 
                             else if( isset( $_GET['login'] ) && $_GET['login'] == 'empty' ) { ?>
                                 Please enter both username and password.
@@ -51,7 +51,33 @@ Template Name: GLM Members Only Template
                                 wp_login_form(1, get_permalink()); 
                                 ?>
                         </div>
-                        <a href="<?php echo wp_lostpassword_url(); ?>" title="Lost Password">Lost Password?</a>
+                        <a id="glm-member-password-lost-link" title="Lost Password">Lost Password?</a>
+                        <div id="glm-member-password-lost-form">
+                            <?php if ( $attributes['show_title'] ) : ?>
+                                <h3><?php _e( 'Forgot Your Password?', 'personalize-login' ); ?></h3>
+                            <?php endif; ?>
+
+                            <p>
+                                <?php
+                                    _e(
+                                        "Enter your email address and we'll send you a link you can use to pick a new password.",
+                                        'personalize_login'
+                                    );
+                                ?>
+                            </p>
+
+                            <form id="lostpasswordform" action="<?php echo wp_lostpassword_url(); ?>" method="post">
+                                <p class="form-row">
+                                    <label for="user_login"><?php _e( 'Email', 'personalize-login' ); ?>
+                                    <input type="text" name="user_login" id="user_login">
+                                </p>
+
+                                <p class="lostpassword-submit">
+                                    <input type="submit" name="submit" class="lostpassword-button"
+                                           value="<?php _e( 'Reset Password', 'personalize-login' ); ?>"/>
+                                </p>
+                            </form>
+                        </div>
                     <?php } ?>
                     </div>
                 </div>
diff --git a/password-lost-form.php b/password-lost-form.php
new file mode 100644 (file)
index 0000000..193a9ff
--- /dev/null
@@ -0,0 +1,26 @@
+<div id="password-lost-form" class="widecolumn">
+    <?php if ( $attributes['show_title'] ) : ?>
+        <h3><?php _e( 'Forgot Your Password?', 'personalize-login' ); ?></h3>
+    <?php endif; ?>
+    <p>
+        <?php
+            _e(
+                "Enter your email address and we'll send you a link you can use to pick a new password.",
+                'personalize_login'
+            );
+        ?>
+    </p>
+    <form id="lostpasswordform" action="<?php echo wp_lostpassword_url(); ?>" method="post">
+        <p class="form-row">
+            <label for="user_login"><?php _e( 'Email', 'personalize-login' ); ?>
+            <input type="text" name="user_login" id="user_login">
+        </p>
+        <p class="lostpassword-submit">
+            <input type="submit" name="submit" class="lostpassword-button"
+                   value="<?php _e( 'Reset Password', 'personalize-login' ); ?>"/>
+        </p>
+    </form>
+</div>
\ No newline at end of file