PluginProbe ʕ •ᴥ•ʔ
Download Manager / trunk
Download Manager vtrunk
3.3.62 3.3.61 3.3.60 3.3.59 3.3.58 3.3.57 3.3.56 trunk 2.1.3 2.3.0 2.5.96 2.5.97 2.6.2 2.6.96 2.8.3 2.9.99 3.0.4 3.1.05 3.1.07 3.1.08 3.1.11 3.1.12 3.1.14 3.1.17 3.1.18 3.1.22 3.1.23 3.1.24 3.1.25 3.1.26 3.1.27 3.1.28 3.2.04 3.2.13 3.2.14 3.2.16 3.2.18 3.2.19 3.2.21 3.2.22 3.2.23 3.2.24 3.2.25 3.2.27 3.2.28 3.2.29 3.2.30 3.2.31 3.2.32 3.2.33 3.2.34 3.2.35 3.2.37 3.2.38 3.2.39 3.2.40 3.2.41 3.2.42 3.2.43 3.2.44 3.2.45 3.2.46 3.2.47 3.2.48 3.2.49 3.2.50 3.2.51 3.2.52 3.2.53 3.2.54 3.2.55 3.2.56 3.2.57 3.2.58 3.2.59 3.2.60 3.2.61 3.2.63 3.2.64 3.2.65 3.2.66 3.2.67 3.2.68 3.2.69 3.2.70 3.2.71 3.2.72 3.2.73 3.2.74 3.2.75 3.2.76 3.2.77 3.2.78 3.2.79 3.2.80 3.2.81 3.2.82 3.2.83 3.2.84 3.2.85 3.2.86 3.2.87 3.2.88 3.2.89 3.2.90 3.2.91 3.2.92 3.2.93 3.2.94 3.2.95 3.2.96 3.2.97 3.2.98 3.2.99 3.3.00 3.3.01 3.3.02 3.3.03 3.3.04 3.3.05 3.3.06 3.3.07 3.3.08 3.3.09 3.3.10 3.3.11 3.3.12 3.3.13 3.3.14 3.3.15 3.3.16 3.3.17 3.3.18 3.3.19 3.3.20 3.3.21 3.3.22 3.3.23 3.3.24 3.3.25 3.3.26 3.3.27 3.3.28 3.3.29 3.3.30 3.3.31 3.3.32 3.3.33 3.3.34 3.3.35 3.3.36 3.3.37 3.3.38 3.3.39 3.3.40 3.3.41 3.3.42 3.3.43 3.3.44 3.3.45 3.3.46 3.3.47 3.3.48 3.3.49 3.3.50 3.3.51 3.3.52 3.3.53 3.3.54 3.3.55
download-manager / src / User / views / reset-password-form.php
download-manager / src / User / views Last commit date
dashboard 5 months ago profile-cards 5 years ago profile-header 6 months ago already-logged-in.php 5 months ago auth-forms.css 5 months ago auth-forms.min.css 5 months ago clean.php 5 years ago login-form.php 5 months ago lost-password-form.php 5 months ago members.php 6 months ago modal-login-form.php 4 days ago public-profile.php 6 months ago reg-form.php 4 days ago reset-password-form.php 5 months ago review-user-status.php 1 week ago user-favourites.php 5 years ago
reset-password-form.php
254 lines
1 <?php
2 /**
3 * Reset Password Form Template - Split Panel Design
4 * Modern two-column layout with decorative left panel
5 * Matches login-form.php design
6 */
7
8 if(!defined('ABSPATH')) die();
9
10 use WPDM\__\__;
11 use WPDM\__\Crypt;
12
13 $login = Crypt::decrypt(__::query_var('login'));
14 $user = check_password_reset_key(__::query_var('key'), $login);
15
16 $logo = get_site_icon_url();
17 $site_name = get_bloginfo('name');
18
19 // Enqueue unified auth styles
20 wp_enqueue_style('wpdm-auth-forms', \WPDM\__\Template::locate_url('auth-forms.css', __DIR__), [], WPDM_VERSION);
21 ?>
22
23 <?php if(!is_wp_error($user)): ?>
24
25 <div class="w3eden wpdm-auth-page" id="wpdmloginpage">
26 <div class="wpdm-auth-split" id="wpdmlogin">
27 <div class="wpdm-auth-panel wpdm-auth-panel--short">
28 <!-- Left Panel - Decorative -->
29 <div class="wpdm-auth-left">
30 <div class="wpdm-auth-grid"></div>
31 <div class="wpdm-auth-circles">
32 <div class="wpdm-auth-circle"></div>
33 <div class="wpdm-auth-circle"></div>
34 <div class="wpdm-auth-circle"></div>
35 <div class="wpdm-auth-circle"></div>
36 </div>
37
38 <div class="wpdm-auth-brand">
39 <?php if($logo){ ?>
40 <img src="<?php echo esc_attr($logo); ?>" alt="<?php echo esc_attr($site_name); ?>" />
41 <?php } else { ?>
42 <div class="wpdm-auth-brand-icon">
43 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg>
44 </div>
45 <?php } ?>
46 <span><?php echo esc_html($site_name); ?></span>
47 </div>
48
49 <div class="wpdm-auth-welcome">
50 <div class="wpdm-auth-welcome-sub"><?php _e("Secure your account", "download-manager"); ?></div>
51 <div class="wpdm-auth-welcome-title"><?php _e("NEW PASSWORD", "download-manager"); ?></div>
52 <div class="wpdm-auth-welcome-line"></div>
53 <div class="wpdm-auth-welcome-text">
54 <?php _e("Create a strong password to protect your account. Use a mix of letters, numbers, and symbols.", "download-manager"); ?>
55 </div>
56 </div>
57 </div>
58
59 <!-- Right Panel - Form -->
60 <div class="wpdm-auth-right">
61 <div class="wpdm-auth-form-header">
62 <h1 class="wpdm-auth-form-title"><?php _e("Reset Password", "download-manager"); ?></h1>
63 <p class="wpdm-auth-form-desc"><?php _e("Enter your new password below. Make sure it's at least 8 characters long.", "download-manager"); ?></p>
64 </div>
65
66 <form name="updatePasswordForm" id="updatePassword" action="<?php echo admin_url('/admin-ajax.php?action=updatePassword'); ?>" method="post">
67 <?php wp_nonce_field('wpdm_password_reset_' . $user->ID, '__wpdm_update_pass'); ?>
68 <input type="hidden" name="key" value="<?php echo esc_attr(__::query_var('key')); ?>">
69 <input type="hidden" name="login" value="<?php echo esc_attr(__::query_var('login')); ?>">
70
71 <!-- New Password -->
72 <div class="wpdm-auth-field">
73 <div class="wpdm-auth-input-wrap">
74 <input type="password" name="password" id="password" class="wpdm-auth-input has-toggle" required placeholder="<?php _e('New Password', "download-manager"); ?>" autocomplete="new-password" />
75 <button type="button" class="wpdm-auth-pwd-toggle" onclick="wpdmTogglePwd('password')" aria-label="Toggle password visibility">
76 <svg class="eye-open" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>
77 <svg class="eye-closed" style="display:none" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"/><line x1="1" y1="1" x2="23" y2="23"/></svg>
78 </button>
79 </div>
80 </div>
81
82 <!-- Confirm Password -->
83 <div class="wpdm-auth-field">
84 <div class="wpdm-auth-input-wrap">
85 <input type="password" name="cpassword" id="cpassword" class="wpdm-auth-input has-toggle" required placeholder="<?php _e('Confirm Password', "download-manager"); ?>" autocomplete="new-password" />
86 <button type="button" class="wpdm-auth-pwd-toggle" onclick="wpdmTogglePwd('cpassword')" aria-label="Toggle password visibility">
87 <svg class="eye-open" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>
88 <svg class="eye-closed" style="display:none" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"/><line x1="1" y1="1" x2="23" y2="23"/></svg>
89 </button>
90 </div>
91 </div>
92
93 <!-- Submit -->
94 <button type="submit" name="wp-submit" id="updatePassword-submit" class="wpdm-auth-btn">
95 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"/></svg>
96 <span><?php _e("Update Password", "download-manager"); ?></span>
97 </button>
98
99 <!-- Login Link -->
100 <div class="wpdm-auth-link">
101 <?php _e("Remember your password?", "download-manager"); ?>
102 <a href="<?php echo wpdm_login_url(); ?>"><?php _e("Sign in", "download-manager"); ?></a>
103 </div>
104 </form>
105 </div>
106 </div>
107 </div>
108 </div>
109
110 <script>
111 function wpdmTogglePwd(fieldId) {
112 var pwd = document.getElementById(fieldId);
113 var wrap = pwd.closest('.wpdm-auth-input-wrap');
114 var eyeOpen = wrap.querySelector('.eye-open');
115 var eyeClosed = wrap.querySelector('.eye-closed');
116 if (pwd.type === 'password') {
117 pwd.type = 'text';
118 eyeOpen.style.display = 'none';
119 eyeClosed.style.display = 'block';
120 } else {
121 pwd.type = 'password';
122 eyeOpen.style.display = 'block';
123 eyeClosed.style.display = 'none';
124 }
125 }
126
127 jQuery(function ($) {
128 var $btn = $('#updatePassword-submit');
129 var btnHtml = $btn.html();
130
131 $('#updatePassword').submit(function () {
132 // Validate passwords match
133 if ($('#password').val() !== $('#cpassword').val()) {
134 showErr('<?php _e("Passwords do not match. Please try again.", "download-manager"); ?>');
135 return false;
136 }
137
138 // Validate password length
139 if ($('#password').val().length < 6) {
140 showErr('<?php _e("Password must be at least 6 characters long.", "download-manager"); ?>');
141 return false;
142 }
143
144 $btn.html('<span class="wpdm-auth-spinner"></span><span><?php _e("Updating...", "download-manager"); ?></span>').attr('disabled', 'disabled');
145
146 $(this).ajaxSubmit({
147 success: function (res) {
148 if (res.success) {
149 $('#updatePassword').html(
150 '<div class="wpdm-auth-alert success">' +
151 '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg>' +
152 '<div><strong><?php _e("Password Updated!", "download-manager"); ?></strong><br/><?php _e("Your password has been changed successfully.", "download-manager"); ?></div>' +
153 '</div>' +
154 '<a href="<?php echo wpdm_login_url(); ?>" class="wpdm-auth-btn">' +
155 '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><polyline points="10 17 15 12 10 7"/><line x1="15" y1="12" x2="3" y2="12"/></svg>' +
156 '<span><?php _e("Go to Login", "download-manager"); ?></span>' +
157 '</a>'
158 );
159 } else {
160 showErr(res.message || '<?php _e("Failed to update password. Please try again.", "download-manager"); ?>');
161 $btn.html(btnHtml).removeAttr('disabled');
162 }
163 },
164 error: function() {
165 showErr('<?php _e("An error occurred. Please try again.", "download-manager"); ?>');
166 $btn.html(btnHtml).removeAttr('disabled');
167 }
168 });
169 return false;
170 });
171
172 function showErr(msg) {
173 $('#updatePassword .wpdm-auth-alert.error').remove();
174 var html = '<div class="wpdm-auth-alert error">' +
175 '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><line x1="15" y1="9" x2="9" y2="15"/><line x1="9" y1="9" x2="15" y2="15"/></svg>' +
176 '<span>' + msg + '</span></div>';
177 $('#updatePassword').prepend(html);
178 }
179
180 $('body').on('click', '.wpdm-auth-alert.error', function(){
181 $(this).slideUp(150, function() { $(this).remove(); });
182 });
183 });
184 </script>
185
186 <?php else: ?>
187
188 <!-- Error State - Invalid/Expired Link -->
189 <div class="w3eden wpdm-auth-page" id="wpdmloginpage">
190 <div class="wpdm-auth-split" id="wpdmlogin">
191 <div class="wpdm-auth-panel wpdm-auth-panel--short">
192 <!-- Left Panel - Decorative -->
193 <div class="wpdm-auth-left">
194 <div class="wpdm-auth-grid"></div>
195 <div class="wpdm-auth-circles">
196 <div class="wpdm-auth-circle"></div>
197 <div class="wpdm-auth-circle"></div>
198 <div class="wpdm-auth-circle"></div>
199 <div class="wpdm-auth-circle"></div>
200 </div>
201
202 <div class="wpdm-auth-brand">
203 <?php if($logo){ ?>
204 <img src="<?php echo esc_attr($logo); ?>" alt="<?php echo esc_attr($site_name); ?>" />
205 <?php } else { ?>
206 <div class="wpdm-auth-brand-icon">
207 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg>
208 </div>
209 <?php } ?>
210 <span><?php echo esc_html($site_name); ?></span>
211 </div>
212
213 <div class="wpdm-auth-welcome">
214 <div class="wpdm-auth-welcome-sub"><?php _e("Something went wrong", "download-manager"); ?></div>
215 <div class="wpdm-auth-welcome-title"><?php _e("LINK EXPIRED", "download-manager"); ?></div>
216 <div class="wpdm-auth-welcome-line"></div>
217 <div class="wpdm-auth-welcome-text">
218 <?php _e("Password reset links are valid for a limited time for security reasons.", "download-manager"); ?>
219 </div>
220 </div>
221 </div>
222
223 <!-- Right Panel - Error Message -->
224 <div class="wpdm-auth-right">
225 <div class="wpdm-auth-form-header">
226 <h1 class="wpdm-auth-form-title" style="color: #dc2626;"><?php _e("Invalid Link", "download-manager"); ?></h1>
227 <p class="wpdm-auth-form-desc"><?php _e("This password reset link is invalid or has expired.", "download-manager"); ?></p>
228 </div>
229
230 <div class="wpdm-auth-alert error" style="cursor: default;">
231 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><line x1="15" y1="9" x2="9" y2="15"/><line x1="9" y1="9" x2="15" y2="15"/></svg>
232 <span><?php echo esc_html($user->get_error_message()); ?></span>
233 </div>
234
235 <p style="font-size: 13px; color: #64748b; line-height: 1.6; margin-bottom: 24px;">
236 <?php _e("Don't worry! You can request a new password reset link. Just click the button below to start over.", "download-manager"); ?>
237 </p>
238
239 <a href="<?php echo WPDM()->user->login->lostPasswordURL(); ?>" class="wpdm-auth-btn">
240 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"/></svg>
241 <span><?php _e("Request New Link", "download-manager"); ?></span>
242 </a>
243
244 <div class="wpdm-auth-link">
245 <?php _e("Remember your password?", "download-manager"); ?>
246 <a href="<?php echo wpdm_login_url(); ?>"><?php _e("Sign in", "download-manager"); ?></a>
247 </div>
248 </div>
249 </div>
250 </div>
251 </div>
252
253 <?php endif; ?>
254