PluginProbe ʕ •ᴥ•ʔ
Download Manager / 3.3.62
Download Manager v3.3.62
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 / reg-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 6 days ago public-profile.php 6 months ago reg-form.php 6 days ago reset-password-form.php 5 months ago review-user-status.php 1 week ago user-favourites.php 5 years ago
reg-form.php
231 lines
1 <?php
2 /**
3 * Registration Form Template - Split Panel Design
4 * Modern two-column layout with decorative left panel
5 */
6
7 if(!defined('ABSPATH')) die('!');
8 $logo = wpdm_valueof($params, 'logo');
9 if(!$logo) $logo = get_site_icon_url();
10 $site_name = get_bloginfo('name');
11
12 // Enqueue unified auth styles
13 wp_enqueue_style('wpdm-auth-forms', \WPDM\__\Template::locate_url('auth-forms.css', __DIR__), [], WPDM_VERSION);
14 ?>
15
16 <div class="w3eden wpdm-auth-page" id="wpdmregpage">
17 <div class="wpdm-auth-split" id="wpdmreg">
18 <?php if(get_option('users_can_register')): ?>
19 <div class="wpdm-auth-panel">
20 <!-- Left Panel - Decorative -->
21 <div class="wpdm-auth-left">
22 <div class="wpdm-auth-grid"></div>
23 <div class="wpdm-auth-circles">
24 <div class="wpdm-auth-circle"></div>
25 <div class="wpdm-auth-circle"></div>
26 <div class="wpdm-auth-circle"></div>
27 <div class="wpdm-auth-circle"></div>
28 </div>
29
30 <div class="wpdm-auth-brand">
31 <a href="<?php echo home_url(); ?>">
32 <?php if($logo){ ?>
33 <img src="<?php echo esc_attr($logo); ?>" alt="<?php echo esc_attr($site_name); ?>" />
34 <?php } else { ?>
35 <div class="wpdm-auth-brand-icon">
36 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg>
37 </div>
38 <?php } ?>
39 <span><?php echo esc_html($site_name); ?></span>
40 </a>
41 </div>
42
43 <div class="wpdm-auth-welcome">
44 <div class="wpdm-auth-welcome-sub"><?php _e("Start your journey", "download-manager"); ?></div>
45 <div class="wpdm-auth-welcome-title"><?php _e("JOIN US", "download-manager"); ?></div>
46 <div class="wpdm-auth-welcome-line"></div>
47 <div class="wpdm-auth-welcome-text">
48 <?php _e("Create your free account today to access exclusive downloads, manage your files, and unlock all features.", "download-manager"); ?>
49 </div>
50 </div>
51 </div>
52
53 <!-- Right Panel - Form -->
54 <div class="wpdm-auth-right wpdm-auth-right--scroll">
55 <div class="wpdm-auth-form-header wpdm-auth-form-header--compact">
56 <h1 class="wpdm-auth-form-title"><?php _e("Create Account", "download-manager"); ?></h1>
57 <p class="wpdm-auth-form-desc"><?php _e("Fill in your details below to get started with your free account.", "download-manager"); ?></p>
58 </div>
59
60 <form method="post" action="" id="registerform" name="registerform">
61 <?php wp_nonce_field(WPDM_PUB_NONCE, 'wdpmregnonce'); ?>
62
63 <div id="__signup_msg"></div>
64
65 <?php if(!$_social_only): ?>
66 <?php if(isset($params['note_before']) && trim($params['note_before']) != ''): ?>
67 <div class="wpdm-auth-alert info">
68 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg>
69 <span><?php echo esc_html($params['note_before']); ?></span>
70 </div>
71 <?php endif; ?>
72
73 <?= $form_html; ?>
74
75 <?php if(isset($params['note_after']) && trim($params['note_after']) != ''): ?>
76 <div class="wpdm-auth-alert info">
77 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg>
78 <span><?php echo esc_html($params['note_after']); ?></span>
79 </div>
80 <?php endif; ?>
81
82 <?php do_action("wpdm_register_form"); ?>
83 <?php do_action("register_form"); ?>
84
85 <button type="submit" class="wpdm-auth-btn wpdm-auth-btn--margin-top" id="registerform-submit" name="wp-submit">
86 <span><?php _e("Create Account", "download-manager"); ?></span>
87 </button>
88 <?php endif; ?>
89
90 <!-- Social Login -->
91 <?php if(count($__wpdm_social_login) > 1): ?>
92 <div class="wpdm-auth-divider"><?php echo isset($params['social_title']) ? esc_html($params['social_title']) : __("or sign up with", "download-manager"); ?></div>
93 <div class="wpdm-auth-social">
94 <?php if(isset($__wpdm_social_login['google'])): ?>
95 <button type="button" class="wpdm-auth-social-btn google" onclick="return _PopupCenter('<?php echo home_url('/?sociallogin=google'); ?>', 'Google', 400, 400);" title="Google">
96 <svg viewBox="0 0 24 24" fill="currentColor"><path d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"/><path d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"/><path d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"/><path d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"/></svg>
97 </button>
98 <?php endif; ?>
99 <?php if(isset($__wpdm_social_login['facebook'])): ?>
100 <button type="button" class="wpdm-auth-social-btn facebook" onclick="return _PopupCenter('<?php echo home_url('/?sociallogin=facebook'); ?>', 'Facebook', 400, 400);" title="Facebook">
101 <svg viewBox="0 0 24 24" fill="currentColor"><path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"/></svg>
102 </button>
103 <?php endif; ?>
104 <?php if(isset($__wpdm_social_login['twitter'])): ?>
105 <button type="button" class="wpdm-auth-social-btn twitter" onclick="return _PopupCenter('<?php echo home_url('/?sociallogin=twitter'); ?>', 'Twitter', 400, 400);" title="X">
106 <svg viewBox="0 0 24 24" fill="currentColor"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg>
107 </button>
108 <?php endif; ?>
109 <?php if(isset($__wpdm_social_login['linkedin'])): ?>
110 <button type="button" class="wpdm-auth-social-btn linkedin" onclick="return _PopupCenter('<?php echo home_url('/?sociallogin=linkedin'); ?>', 'LinkedIn', 400, 400);" title="LinkedIn">
111 <svg viewBox="0 0 24 24" fill="currentColor"><path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/></svg>
112 </button>
113 <?php endif; ?>
114 </div>
115 <?php endif; ?>
116
117 <!-- Login Link -->
118 <?php if($loginurl != ''): ?>
119 <div class="wpdm-auth-link">
120 <?php _e("Already have an account?", "download-manager"); ?>
121 <a href="<?php echo esc_attr($loginurl); ?>"><?php _e("Sign in", "download-manager"); ?></a>
122 </div>
123 <?php endif; ?>
124 </form>
125 </div>
126 </div>
127 <?php else: ?>
128 <div class="wpdm-auth-panel">
129 <div class="wpdm-auth-left">
130 <div class="wpdm-auth-grid"></div>
131 <div class="wpdm-auth-circles">
132 <div class="wpdm-auth-circle"></div>
133 <div class="wpdm-auth-circle"></div>
134 <div class="wpdm-auth-circle"></div>
135 <div class="wpdm-auth-circle"></div>
136 </div>
137 <div class="wpdm-auth-brand">
138 <?php if($logo){ ?>
139 <img src="<?php echo esc_attr($logo); ?>" alt="<?php echo esc_attr($site_name); ?>" />
140 <?php } ?>
141 <span><?php echo esc_html($site_name); ?></span>
142 </div>
143 <div class="wpdm-auth-welcome">
144 <div class="wpdm-auth-welcome-title"><?php _e("REGISTRATION", "download-manager"); ?></div>
145 <div class="wpdm-auth-welcome-line"></div>
146 </div>
147 </div>
148 <div class="wpdm-auth-right">
149 <div class="wpdm-auth-disabled">
150 <div class="wpdm-auth-disabled-icon">
151 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><line x1="4.93" y1="4.93" x2="19.07" y2="19.07"/></svg>
152 </div>
153 <p><?php _e("Registration is currently disabled.", "download-manager"); ?></p>
154 </div>
155 </div>
156 </div>
157 <?php endif; ?>
158 </div>
159 </div>
160
161 <script>
162 jQuery(function ($) {
163 $('#__reg_nonce').val('<?php echo wp_create_nonce(NONCE_KEY); ?>');
164
165 <?php if(!isset($params['form_submit_handler']) || $params['form_submit_handler'] !== false): ?>
166 var $btn = $('#registerform-submit');
167 var btnHtml = $btn.html();
168
169 $('#registerform').submit(function (e) {
170 e.preventDefault();
171
172 if ($('#reg_password').val() !== $('#reg_confirm_pass').val()) {
173 $('#reg_confirm_pass').parent('.input-wrapper').addClass('input-error');
174 showErr('<?php echo esc_js(__("Passwords do not match.", "download-manager")); ?>');
175 return false;
176 } else {
177 $('#reg_confirm_pass').parent('.input-wrapper').removeClass('input-error');
178 }
179
180 $btn.html('<span class="wpdm-auth-spinner"></span><span><?php _e("Creating...", "download-manager"); ?></span>').attr('disabled', 'disabled');
181
182 var form_data = $(this).serializeArray();
183
184 $(this).ajaxSubmit({
185 success: function (res) {
186 if (res.success == false) {
187 showErr(res.message);
188 $btn.html(btnHtml).removeAttr('disabled');
189 } else if (res.success == true) {
190 WPDM.doAction("wpdm_new_signup", form_data);
191 $btn.html('<svg viewBox="0 0 24 24" width="16" height="16" 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><span><?php _e("Success!", "download-manager"); ?></span>');
192 setTimeout(function () {
193 location.href = res.redirect_to;
194 }, 1500);
195 } else {
196 alert(res);
197 }
198 },
199 error: function() {
200 showErr('<?php echo esc_js(__("Something went wrong. Try again.", "download-manager")); ?>');
201 $btn.html(btnHtml).removeAttr('disabled');
202 }
203 });
204
205 return false;
206 });
207 <?php endif; ?>
208
209 function showErr(msg) {
210 $('#registerform .wpdm-auth-alert.error').remove();
211 var html = '<div class="wpdm-auth-alert error">' +
212 '<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>' +
213 '<span>' + msg + '</span></div>';
214 $('#__signup_msg').html(html);
215 }
216
217 $('body').on('click', '.wpdm-auth-alert.error', function() {
218 $(this).slideUp(150, function() { $(this).remove(); });
219 });
220
221 <?php
222 if($error = \WPDM\__\Session::get('wpdm_signup_error')):
223 ?>
224 showErr('<?php echo esc_js($error); ?>');
225 <?php
226 \WPDM\__\Session::clear('wpdm_signup_error');
227 endif;
228 ?>
229 });
230 </script>
231