Version Description
- 31/05/2021
- Feature - Edit profile form shortcode.
- Enhance - Valid file type in my account profile picture.
- Enhance - Reset Button in UR Form.
- Enhance - Payment slider in range field.
- Tweak - Email exists check in edit profile.
- Tweak - Redirection filter in ajax login.
- Fix - My Account slug not translate via polylang plugin.
- Fix - UR not working if dashboard language changed.
- Fix - Recaptcha issue on login and registration shortcode page.
Download this release
Release Info
Developer | wpeverestdev |
Plugin | User Registration – Custom Registration Form, Login Form And User Profile For WordPress |
Version | 1.9.8 |
Comparing to | |
See all releases |
Code changes from version 1.9.7 to 1.9.8
- assets/css/my-account-layout-rtl.css +1 -1
- assets/css/my-account-layout.css +1 -1
- assets/css/my-account-layout.scss +4 -2
- assets/js/frontend/my-account.js +40 -27
- assets/js/frontend/my-account.min.js +1 -1
- assets/js/frontend/ur-login.js +74 -63
- assets/js/frontend/ur-login.min.js +1 -1
- assets/js/frontend/user-registration.js +111 -114
- assets/js/frontend/user-registration.min.js +1 -1
- includes/abstracts/abstract-ur-form-field.php +1 -2
- includes/admin/class-ur-admin-menus.php +2 -2
- includes/admin/functions-ur-admin.php +1 -2
- includes/class-ur-ajax.php +24 -2
- includes/class-ur-form-handler.php +3 -2
- includes/class-ur-shortcodes.php +46 -1
- includes/functions-ur-core.php +1 -1
- includes/functions-ur-page.php +5 -0
- includes/functions-ur-template.php +1 -1
- includes/shortcodes/class-ur-shortcode-my-account.php +4 -0
- languages/user-registration.pot +76 -75
- readme.txt +13 -2
- templates/form-registration.php +2 -3
- templates/myaccount/form-edit-profile.php +22 -4
- user-registration.php +2 -2
assets/css/my-account-layout-rtl.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#user-registration.vertical{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}#user-registration.vertical .user-registration-error,#user-registration.vertical .user-registration-message{float:none;width:100%}#user-registration.vertical .user-registration-MyAccount-navigation{background:#f0f1f5;width:20%}#user-registration.vertical .user-registration-MyAccount-navigation ul{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link.is-active a{background:#dee0e9;border-color:#475bb2}#user-registration.vertical .user-registration-MyAccount-content{width:80%}#user-registration.vertical .user-registration-MyAccount-content .user-registration-profile-header{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-webkit-align-items:center;align-items:center}#user-registration.vertical .user-registration-MyAccount-content .user-registration-profile-header .user-registration-img-container{margin-left:20px}#user-registration.horizontal{box-shadow:0 2px 20px rgba(45,53,89,.1)}#user-registration.horizontal .user-registration-error,#user-registration.horizontal .user-registration-info,#user-registration.horizontal .user-registration-message{margin-bottom:0}#user-registration.horizontal .user-registration-MyAccount-navigation{border-bottom:1px solid #dee0e9}#user-registration.horizontal .user-registration-MyAccount-navigation ul{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}#user-registration.horizontal .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link a{padding:15px 20px}#user-registration.horizontal .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link.is-active a{background-color:#dee0e9}#user-registration.horizontal .user-registration-MyAccount-content{text-align:center}#user-registration.horizontal .user-registration-MyAccount-content .user-registration-profile-header .user-registration-img-container{margin:0 auto;margin-bottom:15px}#user-registration.horizontal .user-registration-MyAccount-content .user-registration-profile-header .user-registration-img-container img{border-radius:50%;margin:0 auto}#user-registration.horizontal .user-registration-MyAccount-content .edit-password,#user-registration.horizontal .user-registration-MyAccount-content .edit-profile{text-align:right}#user-registration.horizontal .user-registration-MyAccount-content .edit-profile .user-registration-profile-header,#user-registration.horizontal .user-registration-MyAccount-content .edit-profile h2{text-align:center}@media screen and (max-width:980px){#user-registration.vertical .user-registration-MyAccount-navigation{width:30%}#user-registration.vertical .user-registration-MyAccount-content{width:70%}}@media screen and (max-width:600px){#user-registration.vertical .user-registration-MyAccount-navigation{width:100%}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link a{padding:15px 20px}#user-registration.vertical .user-registration-MyAccount-content{width:100%}#user-registration .user-registration-MyAccount-content{padding:15px}}
|
1 |
+
#user-registration.vertical{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}#user-registration.vertical .user-registration-error,#user-registration.vertical .user-registration-message{float:none;width:100%}#user-registration.vertical .user-registration-MyAccount-navigation{background:#f0f1f5;width:20%}#user-registration.vertical .user-registration-MyAccount-navigation ul{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link.is-active a{background:#dee0e9;border-color:#475bb2}#user-registration.vertical .user-registration-MyAccount-content{width:80%}#user-registration.vertical .user-registration-MyAccount-content .user-registration-profile-header{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-webkit-align-items:center;align-items:center}#user-registration.vertical .user-registration-MyAccount-content .user-registration-profile-header .user-registration-img-container{margin-left:20px}#user-registration,#user-registration.horizontal{box-shadow:0 2px 20px rgba(45,53,89,.1)}#user-registration .user-registration-error,#user-registration .user-registration-info,#user-registration .user-registration-message,#user-registration.horizontal .user-registration-error,#user-registration.horizontal .user-registration-info,#user-registration.horizontal .user-registration-message{margin-bottom:0}#user-registration .user-registration-MyAccount-navigation,#user-registration.horizontal .user-registration-MyAccount-navigation{border-bottom:1px solid #dee0e9}#user-registration .user-registration-MyAccount-navigation ul,#user-registration.horizontal .user-registration-MyAccount-navigation ul{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}#user-registration .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link a,#user-registration.horizontal .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link a{padding:15px 20px}#user-registration .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link.is-active a,#user-registration.horizontal .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link.is-active a{background-color:#dee0e9}#user-registration .ur-edit-profile,#user-registration .user-registration-MyAccount-content,#user-registration.horizontal .ur-edit-profile,#user-registration.horizontal .user-registration-MyAccount-content{text-align:center}#user-registration .ur-edit-profile .user-registration-profile-header .user-registration-img-container,#user-registration .user-registration-MyAccount-content .user-registration-profile-header .user-registration-img-container,#user-registration.horizontal .ur-edit-profile .user-registration-profile-header .user-registration-img-container,#user-registration.horizontal .user-registration-MyAccount-content .user-registration-profile-header .user-registration-img-container{margin:0 auto;margin-bottom:15px}#user-registration .ur-edit-profile .user-registration-profile-header .user-registration-img-container img,#user-registration .user-registration-MyAccount-content .user-registration-profile-header .user-registration-img-container img,#user-registration.horizontal .ur-edit-profile .user-registration-profile-header .user-registration-img-container img,#user-registration.horizontal .user-registration-MyAccount-content .user-registration-profile-header .user-registration-img-container img{border-radius:50%;margin:0 auto}#user-registration .ur-edit-profile .edit-password,#user-registration .ur-edit-profile .edit-profile,#user-registration .user-registration-MyAccount-content .edit-password,#user-registration .user-registration-MyAccount-content .edit-profile,#user-registration.horizontal .ur-edit-profile .edit-password,#user-registration.horizontal .ur-edit-profile .edit-profile,#user-registration.horizontal .user-registration-MyAccount-content .edit-password,#user-registration.horizontal .user-registration-MyAccount-content .edit-profile{text-align:right}#user-registration .ur-edit-profile .edit-profile .user-registration-profile-header,#user-registration .ur-edit-profile .edit-profile h2,#user-registration .user-registration-MyAccount-content .edit-profile .user-registration-profile-header,#user-registration .user-registration-MyAccount-content .edit-profile h2,#user-registration.horizontal .ur-edit-profile .edit-profile .user-registration-profile-header,#user-registration.horizontal .ur-edit-profile .edit-profile h2,#user-registration.horizontal .user-registration-MyAccount-content .edit-profile .user-registration-profile-header,#user-registration.horizontal .user-registration-MyAccount-content .edit-profile h2{text-align:center}@media screen and (max-width:980px){#user-registration.vertical .user-registration-MyAccount-navigation{width:30%}#user-registration.vertical .user-registration-MyAccount-content{width:70%}}@media screen and (max-width:600px){#user-registration.vertical .user-registration-MyAccount-navigation{width:100%}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link a{padding:15px 20px}#user-registration.vertical .user-registration-MyAccount-content{width:100%}#user-registration .user-registration-MyAccount-content{padding:15px}}
|
assets/css/my-account-layout.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#user-registration.vertical{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}#user-registration.vertical .user-registration-error,#user-registration.vertical .user-registration-message{float:none;width:100%}#user-registration.vertical .user-registration-MyAccount-navigation{background:#f0f1f5;width:20%}#user-registration.vertical .user-registration-MyAccount-navigation ul{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link.is-active a{background:#dee0e9;border-color:#475bb2}#user-registration.vertical .user-registration-MyAccount-content{width:80%}#user-registration.vertical .user-registration-MyAccount-content .user-registration-profile-header{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-webkit-align-items:center;align-items:center}#user-registration.vertical .user-registration-MyAccount-content .user-registration-profile-header .user-registration-img-container{margin-right:20px}#user-registration.horizontal{box-shadow:0 2px 20px rgba(45,53,89,.1)}#user-registration.horizontal .user-registration-error,#user-registration.horizontal .user-registration-info,#user-registration.horizontal .user-registration-message{margin-bottom:0}#user-registration.horizontal .user-registration-MyAccount-navigation{border-bottom:1px solid #dee0e9}#user-registration.horizontal .user-registration-MyAccount-navigation ul{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}#user-registration.horizontal .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link a{padding:15px 20px}#user-registration.horizontal .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link.is-active a{background-color:#dee0e9}#user-registration.horizontal .user-registration-MyAccount-content{text-align:center}#user-registration.horizontal .user-registration-MyAccount-content .user-registration-profile-header .user-registration-img-container{margin:0 auto;margin-bottom:15px}#user-registration.horizontal .user-registration-MyAccount-content .user-registration-profile-header .user-registration-img-container img{border-radius:50%;margin:0 auto}#user-registration.horizontal .user-registration-MyAccount-content .edit-password,#user-registration.horizontal .user-registration-MyAccount-content .edit-profile{text-align:left}#user-registration.horizontal .user-registration-MyAccount-content .edit-profile .user-registration-profile-header,#user-registration.horizontal .user-registration-MyAccount-content .edit-profile h2{text-align:center}@media screen and (max-width:980px){#user-registration.vertical .user-registration-MyAccount-navigation{width:30%}#user-registration.vertical .user-registration-MyAccount-content{width:70%}}@media screen and (max-width:600px){#user-registration.vertical .user-registration-MyAccount-navigation{width:100%}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link a{padding:15px 20px}#user-registration.vertical .user-registration-MyAccount-content{width:100%}#user-registration .user-registration-MyAccount-content{padding:15px}}
|
1 |
+
#user-registration.vertical{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap}#user-registration.vertical .user-registration-error,#user-registration.vertical .user-registration-message{float:none;width:100%}#user-registration.vertical .user-registration-MyAccount-navigation{background:#f0f1f5;width:20%}#user-registration.vertical .user-registration-MyAccount-navigation ul{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link.is-active a{background:#dee0e9;border-color:#475bb2}#user-registration.vertical .user-registration-MyAccount-content{width:80%}#user-registration.vertical .user-registration-MyAccount-content .user-registration-profile-header{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-webkit-align-items:center;align-items:center}#user-registration.vertical .user-registration-MyAccount-content .user-registration-profile-header .user-registration-img-container{margin-right:20px}#user-registration,#user-registration.horizontal{box-shadow:0 2px 20px rgba(45,53,89,.1)}#user-registration .user-registration-error,#user-registration .user-registration-info,#user-registration .user-registration-message,#user-registration.horizontal .user-registration-error,#user-registration.horizontal .user-registration-info,#user-registration.horizontal .user-registration-message{margin-bottom:0}#user-registration .user-registration-MyAccount-navigation,#user-registration.horizontal .user-registration-MyAccount-navigation{border-bottom:1px solid #dee0e9}#user-registration .user-registration-MyAccount-navigation ul,#user-registration.horizontal .user-registration-MyAccount-navigation ul{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}#user-registration .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link a,#user-registration.horizontal .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link a{padding:15px 20px}#user-registration .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link.is-active a,#user-registration.horizontal .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link.is-active a{background-color:#dee0e9}#user-registration .ur-edit-profile,#user-registration .user-registration-MyAccount-content,#user-registration.horizontal .ur-edit-profile,#user-registration.horizontal .user-registration-MyAccount-content{text-align:center}#user-registration .ur-edit-profile .user-registration-profile-header .user-registration-img-container,#user-registration .user-registration-MyAccount-content .user-registration-profile-header .user-registration-img-container,#user-registration.horizontal .ur-edit-profile .user-registration-profile-header .user-registration-img-container,#user-registration.horizontal .user-registration-MyAccount-content .user-registration-profile-header .user-registration-img-container{margin:0 auto;margin-bottom:15px}#user-registration .ur-edit-profile .user-registration-profile-header .user-registration-img-container img,#user-registration .user-registration-MyAccount-content .user-registration-profile-header .user-registration-img-container img,#user-registration.horizontal .ur-edit-profile .user-registration-profile-header .user-registration-img-container img,#user-registration.horizontal .user-registration-MyAccount-content .user-registration-profile-header .user-registration-img-container img{border-radius:50%;margin:0 auto}#user-registration .ur-edit-profile .edit-password,#user-registration .ur-edit-profile .edit-profile,#user-registration .user-registration-MyAccount-content .edit-password,#user-registration .user-registration-MyAccount-content .edit-profile,#user-registration.horizontal .ur-edit-profile .edit-password,#user-registration.horizontal .ur-edit-profile .edit-profile,#user-registration.horizontal .user-registration-MyAccount-content .edit-password,#user-registration.horizontal .user-registration-MyAccount-content .edit-profile{text-align:left}#user-registration .ur-edit-profile .edit-profile .user-registration-profile-header,#user-registration .ur-edit-profile .edit-profile h2,#user-registration .user-registration-MyAccount-content .edit-profile .user-registration-profile-header,#user-registration .user-registration-MyAccount-content .edit-profile h2,#user-registration.horizontal .ur-edit-profile .edit-profile .user-registration-profile-header,#user-registration.horizontal .ur-edit-profile .edit-profile h2,#user-registration.horizontal .user-registration-MyAccount-content .edit-profile .user-registration-profile-header,#user-registration.horizontal .user-registration-MyAccount-content .edit-profile h2{text-align:center}@media screen and (max-width:980px){#user-registration.vertical .user-registration-MyAccount-navigation{width:30%}#user-registration.vertical .user-registration-MyAccount-content{width:70%}}@media screen and (max-width:600px){#user-registration.vertical .user-registration-MyAccount-navigation{width:100%}#user-registration.vertical .user-registration-MyAccount-navigation ul .user-registration-MyAccount-navigation-link a{padding:15px 20px}#user-registration.vertical .user-registration-MyAccount-content{width:100%}#user-registration .user-registration-MyAccount-content{padding:15px}}
|
assets/css/my-account-layout.scss
CHANGED
@@ -44,7 +44,8 @@
|
|
44 |
}
|
45 |
}
|
46 |
|
47 |
-
&.horizontal
|
|
|
48 |
box-shadow: 0 2px 20px transparentize($gray-base, 0.9);
|
49 |
|
50 |
.user-registration-message,
|
@@ -73,7 +74,8 @@
|
|
73 |
}
|
74 |
}
|
75 |
|
76 |
-
.user-registration-MyAccount-content
|
|
|
77 |
text-align: center;
|
78 |
|
79 |
.user-registration-profile-header {
|
44 |
}
|
45 |
}
|
46 |
|
47 |
+
&.horizontal,
|
48 |
+
& {
|
49 |
box-shadow: 0 2px 20px transparentize($gray-base, 0.9);
|
50 |
|
51 |
.user-registration-message,
|
74 |
}
|
75 |
}
|
76 |
|
77 |
+
.user-registration-MyAccount-content,
|
78 |
+
.ur-edit-profile {
|
79 |
text-align: center;
|
80 |
|
81 |
.user-registration-profile-header {
|
assets/js/frontend/my-account.js
CHANGED
@@ -4,6 +4,7 @@ jQuery(function ($) {
|
|
4 |
init: function () {
|
5 |
this.init_event();
|
6 |
},
|
|
|
7 |
/**
|
8 |
* Sends the picture, the user is willing to upload as an ajax request
|
9 |
* and receives output in order to process any errors occured during profile picture upload
|
@@ -21,6 +22,10 @@ jQuery(function ($) {
|
|
21 |
var formData = new FormData();
|
22 |
var $this = $node;
|
23 |
formData.append("file", $this[0].files[0]);
|
|
|
|
|
|
|
|
|
24 |
|
25 |
var upload_node = $this
|
26 |
.closest(".button-group")
|
@@ -160,34 +165,42 @@ jQuery(function ($) {
|
|
160 |
|
161 |
// Check if the form is edit-profile form and check if ajax submission on edit profile is enabled.
|
162 |
if (
|
163 |
-
|
164 |
-
.find("
|
165 |
-
.
|
166 |
-
"yes" === user_registration_params.ajax_submission_on_edit_profile
|
167 |
) {
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
var
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
$el.data("id") +
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
}
|
192 |
|
193 |
// Fix - Date field is required error even when the "value" attribute is present in Chrome.
|
4 |
init: function () {
|
5 |
this.init_event();
|
6 |
},
|
7 |
+
|
8 |
/**
|
9 |
* Sends the picture, the user is willing to upload as an ajax request
|
10 |
* and receives output in order to process any errors occured during profile picture upload
|
22 |
var formData = new FormData();
|
23 |
var $this = $node;
|
24 |
formData.append("file", $this[0].files[0]);
|
25 |
+
formData.append(
|
26 |
+
"valid_extension",
|
27 |
+
$('input[name="profile-pic"]').attr("accept")
|
28 |
+
);
|
29 |
|
30 |
var upload_node = $this
|
31 |
.closest(".button-group")
|
165 |
|
166 |
// Check if the form is edit-profile form and check if ajax submission on edit profile is enabled.
|
167 |
if (
|
168 |
+
!$(".ur-frontend-form")
|
169 |
+
.find(".user-registration-profile-header")
|
170 |
+
.find(".uraf-profile-picture-upload").length
|
|
|
171 |
) {
|
172 |
+
if (
|
173 |
+
$(".ur-frontend-form")
|
174 |
+
.find("form.edit-profile")
|
175 |
+
.hasClass("user-registration-EditProfileForm") &&
|
176 |
+
"yes" === user_registration_params.ajax_submission_on_edit_profile
|
177 |
+
) {
|
178 |
+
user_registration_profile_picture_upload.init();
|
179 |
+
} else {
|
180 |
+
$(".edit-profile").on("submit", function (evt) {
|
181 |
+
var $el = $(".ur-smart-phone-field");
|
182 |
+
|
183 |
+
if ("true" === $el.attr("aria-invalid")) {
|
184 |
+
evt.preventDefault();
|
185 |
+
var wrapper = $el.closest("p.form-row");
|
186 |
+
wrapper.find("#" + $el.data("id") + "-error").remove();
|
187 |
+
var phone_error_msg_dom =
|
188 |
+
'<label id="' +
|
189 |
+
$el.data("id") +
|
190 |
+
"-error" +
|
191 |
+
'" class="user-registration-error" for="' +
|
192 |
+
$el.data("id") +
|
193 |
+
'">' +
|
194 |
+
user_registration_params.message_validate_phone_number +
|
195 |
+
"</label>";
|
196 |
+
wrapper.append(phone_error_msg_dom);
|
197 |
+
wrapper
|
198 |
+
.find("#" + $el.data("id"))
|
199 |
+
.attr("aria-invalid", true);
|
200 |
+
return true;
|
201 |
+
}
|
202 |
+
});
|
203 |
+
}
|
204 |
}
|
205 |
|
206 |
// Fix - Date field is required error even when the "value" attribute is present in Chrome.
|
assets/js/frontend/my-account.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(e){var r={init:function(){this.init_event()},profile_picture_upload:function(r){var i=user_registration_params.ajax_url+"?action=user_registration_profile_pic_upload&security="+user_registration_params.user_registration_profile_picture_upload_nonce,t=new FormData,o=r;t.append("file",o[0].files[0]);var
|
1 |
+
jQuery(function(e){var r={init:function(){this.init_event()},profile_picture_upload:function(r){var i=user_registration_params.ajax_url+"?action=user_registration_profile_pic_upload&security="+user_registration_params.user_registration_profile_picture_upload_nonce,t=new FormData,o=r;t.append("file",o[0].files[0]),t.append("valid_extension",e('input[name="profile-pic"]').attr("accept"));var a=o.closest(".button-group").find(".user_registration_profile_picture_upload"),n=a.text();e.ajax({url:i,data:t,type:"POST",processData:!1,contentType:!1,beforeSend:function(){a.text(user_registration_params.user_registration_profile_picture_uploading)},complete:function(e){var r="",i="";o.val("");var t=JSON.parse(e.responseText);r=t.data.message,t.success||(r='<p class="uraf-profile-picture-error user-registration-error">'+r+"</p>"),t.success&&(r="",i=t.data.url,o.closest(".button-group").find("#profile_pic_url").val(i),o.closest(".user-registration-profile-header").find(".profile-preview").attr("src",i)),o.closest(".button-group").find(".profile-pic-remove").prop("style",!1),o.closest(".button-group").find(".user_registration_profile_picture_upload").attr("style","display:none"),o.closest(".user-registration-profile-header").find(".user-registration-profile-picture-error").remove(),o.closest(".button-group").after('<span class="user-registration-profile-picture-error">'+r+"</span>"),a.text(n)}})},init_event:function(){e(".user_registration_profile_picture_upload").on("click",function(){e(this).closest(".button-group").find('input[type="file"]').trigger("click")}),e(document).on("change",'.button-group input[type="file"]',function(){r.profile_picture_upload(e('.button-group input[type="file"]'))})}};e(".profile-pic-remove").on("click",function(r){r.preventDefault();var i=e(this).closest("form").find('input[name="profile-pic"]');input_hidden=e(this).closest("form").find('input[name="profile-pic-url"]'),profile_default_input_hidden=e(this).closest("form").find('input[name="profile-default-image"]'),preview=e(this).closest("form").find("img.profile-preview"),input_hidden.val(""),preview.attr("src",profile_default_input_hidden.val()),e(this).hide(),"yes"===user_registration_params.ajax_submission_on_edit_profile?(e(this).closest(".button-group").find(".user_registration_profile_picture_upload").show(),e(this).closest(".user-registration-profile-header").find(".user-registration-profile-picture-error").remove()):i.val("").show()}),e(".ur-frontend-form").find(".user-registration-profile-header").find(".uraf-profile-picture-upload").length||(e(".ur-frontend-form").find("form.edit-profile").hasClass("user-registration-EditProfileForm")&&"yes"===user_registration_params.ajax_submission_on_edit_profile?r.init():e(".edit-profile").on("submit",function(r){var i=e(".ur-smart-phone-field");if("true"===i.attr("aria-invalid")){r.preventDefault();var t=i.closest("p.form-row");t.find("#"+i.data("id")+"-error").remove();var o='<label id="'+i.data("id")+'-error" class="user-registration-error" for="'+i.data("id")+'">'+user_registration_params.message_validate_phone_number+"</label>";return t.append(o),t.find("#"+i.data("id")).attr("aria-invalid",!0),!0}})),e("input.flatpickr-input").each(function(){e(this).val(e(this).attr("value"))})});
|
assets/js/frontend/ur-login.js
CHANGED
@@ -1,74 +1,85 @@
|
|
1 |
jQuery(function ($) {
|
2 |
-
$(".ur-frontend-form")
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
.val();
|
13 |
-
var password = $this
|
14 |
-
.closest("form")
|
15 |
-
.find('input[name="password"]')
|
16 |
-
.val();
|
17 |
-
var rememberme = $this
|
18 |
.closest("form")
|
19 |
-
.find('input[name="
|
20 |
-
.val()
|
21 |
-
|
22 |
.closest("form")
|
23 |
-
.find("
|
24 |
.val();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
$this
|
32 |
-
.closest("form")
|
33 |
-
.find(".ur-submit-button")
|
34 |
-
.siblings("span")
|
35 |
-
.addClass("ur-front-spinner");
|
36 |
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
password: password,
|
43 |
-
rememberme: rememberme,
|
44 |
-
CaptchaResponse: CaptchaResponse,
|
45 |
-
},
|
46 |
-
success: function (res) {
|
47 |
-
$this
|
48 |
-
.closest("form")
|
49 |
-
.find(".ur-submit-button")
|
50 |
-
.siblings("span")
|
51 |
-
.removeClass("ur-front-spinner");
|
52 |
|
53 |
-
|
54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
$this
|
56 |
-
.closest("
|
57 |
-
.find(".
|
58 |
-
.
|
|
|
59 |
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
"
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
});
|
72 |
-
|
73 |
-
});
|
74 |
});
|
1 |
jQuery(function ($) {
|
2 |
+
$(".ur-frontend-form")
|
3 |
+
.find("form.login")
|
4 |
+
.each(function () {
|
5 |
+
var $ur_login_ajax_form = $(this);
|
6 |
+
$ur_login_ajax_form
|
7 |
+
.find("#user_registration_ajax_login_submit")
|
8 |
+
.on("click", function (e) {
|
9 |
+
e.preventDefault();
|
10 |
+
var $this = $(this);
|
11 |
+
var username = $this
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
.closest("form")
|
13 |
+
.find('input[name="username"]')
|
14 |
+
.val();
|
15 |
+
var password = $this
|
16 |
.closest("form")
|
17 |
+
.find('input[name="password"]')
|
18 |
.val();
|
19 |
+
var rememberme = $this
|
20 |
+
.closest("form")
|
21 |
+
.find('input[name="rememberme"]')
|
22 |
+
.val(),
|
23 |
+
CaptchaResponse = $this
|
24 |
+
.closest("form")
|
25 |
+
.find('[name="g-recaptcha-response"]')
|
26 |
+
.val();
|
27 |
|
28 |
+
var url =
|
29 |
+
ur_login_params.ajax_url +
|
30 |
+
"?action=user_registration_ajax_login_submit&security=" +
|
31 |
+
ur_login_params.ur_login_form_save_nonce;
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
+
$this
|
34 |
+
.closest("form")
|
35 |
+
.find(".ur-submit-button")
|
36 |
+
.siblings("span")
|
37 |
+
.addClass("ur-front-spinner");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
+
$.ajax({
|
40 |
+
type: "POST",
|
41 |
+
url: url,
|
42 |
+
data: {
|
43 |
+
username: username,
|
44 |
+
password: password,
|
45 |
+
rememberme: rememberme,
|
46 |
+
CaptchaResponse: CaptchaResponse,
|
47 |
+
},
|
48 |
+
success: function (res) {
|
49 |
$this
|
50 |
+
.closest("form")
|
51 |
+
.find(".ur-submit-button")
|
52 |
+
.siblings("span")
|
53 |
+
.removeClass("ur-front-spinner");
|
54 |
|
55 |
+
// custom error message
|
56 |
+
if (res.success == false) {
|
57 |
+
var ur_recaptcha_node = $this
|
58 |
+
.closest("form")
|
59 |
+
.find(
|
60 |
+
"#ur-recaptcha-node #node_recaptcha_login.g-recaptcha"
|
61 |
+
).length;
|
62 |
+
if (ur_recaptcha_node !== 0) {
|
63 |
+
grecaptcha.reset();
|
64 |
+
}
|
65 |
+
|
66 |
+
$this
|
67 |
+
.closest("#user-registration")
|
68 |
+
.find(".user-registration-error")
|
69 |
+
.remove();
|
70 |
+
|
71 |
+
$this
|
72 |
+
.closest("#user-registration")
|
73 |
+
.prepend(
|
74 |
+
'<ul class="user-registration-error">' +
|
75 |
+
res.data.message +
|
76 |
+
"</ul>"
|
77 |
+
);
|
78 |
+
} else {
|
79 |
+
window.location.href = res.data.message;
|
80 |
+
}
|
81 |
+
},
|
82 |
+
});
|
83 |
});
|
84 |
+
});
|
|
|
85 |
});
|
assets/js/frontend/ur-login.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(
|
1 |
+
jQuery(function(e){e(".ur-frontend-form").find("form.login").each(function(){e(this).find("#user_registration_ajax_login_submit").on("click",function(s){s.preventDefault();var r=e(this),n=r.closest("form").find('input[name="username"]').val(),a=r.closest("form").find('input[name="password"]').val(),t=r.closest("form").find('input[name="rememberme"]').val(),o=r.closest("form").find('[name="g-recaptcha-response"]').val(),i=ur_login_params.ajax_url+"?action=user_registration_ajax_login_submit&security="+ur_login_params.ur_login_form_save_nonce;r.closest("form").find(".ur-submit-button").siblings("span").addClass("ur-front-spinner"),e.ajax({type:"POST",url:i,data:{username:n,password:a,rememberme:t,CaptchaResponse:o},success:function(e){if(r.closest("form").find(".ur-submit-button").siblings("span").removeClass("ur-front-spinner"),0==e.success){0!==r.closest("form").find("#ur-recaptcha-node #node_recaptcha_login.g-recaptcha").length&&grecaptcha.reset(),r.closest("#user-registration").find(".user-registration-error").remove(),r.closest("#user-registration").prepend('<ul class="user-registration-error">'+e.data.message+"</ul>")}else window.location.href=e.data.message}})})})});
|
assets/js/frontend/user-registration.js
CHANGED
@@ -36,12 +36,14 @@
|
|
36 |
);
|
37 |
|
38 |
if (single_field.length < 2) {
|
39 |
-
var single_data =
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
|
|
|
|
45 |
|
46 |
if (
|
47 |
"invite_code" === single_data.field_name
|
@@ -97,14 +99,16 @@
|
|
97 |
switch (field_type) {
|
98 |
case "checkbox":
|
99 |
case "radio":
|
100 |
-
this_field_value =
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
|
|
105 |
break;
|
106 |
default:
|
107 |
-
this_field_value =
|
|
|
108 |
}
|
109 |
break;
|
110 |
case "select":
|
@@ -121,9 +125,8 @@
|
|
121 |
});
|
122 |
|
123 |
if (field_type == "checkbox") {
|
124 |
-
var field_value_json =
|
125 |
-
field_value
|
126 |
-
);
|
127 |
} else if (field_type == "radio") {
|
128 |
var field_value_json = field_value[0];
|
129 |
} else {
|
@@ -132,10 +135,8 @@
|
|
132 |
|
133 |
var single_form_field_name =
|
134 |
multi_value_field[multi_start];
|
135 |
-
single_form_field_name =
|
136 |
-
"[]",
|
137 |
-
""
|
138 |
-
);
|
139 |
|
140 |
var field_data = {
|
141 |
value: field_value_json,
|
@@ -147,9 +148,7 @@
|
|
147 |
form_data.push(field_data);
|
148 |
}
|
149 |
|
150 |
-
$(
|
151 |
-
document
|
152 |
-
).trigger(
|
153 |
"user_registration_frontend_form_data_filter",
|
154 |
[form_data]
|
155 |
);
|
@@ -226,9 +225,7 @@
|
|
226 |
default:
|
227 |
}
|
228 |
|
229 |
-
$(
|
230 |
-
document
|
231 |
-
).trigger(
|
232 |
"user_registration_frontend_form_data_render",
|
233 |
[field, formwise_data]
|
234 |
);
|
@@ -252,10 +249,8 @@
|
|
252 |
field.attr("name") !== ""
|
253 |
) {
|
254 |
formwise_data.field_name = field.attr("name");
|
255 |
-
formwise_data.field_name =
|
256 |
-
"[]",
|
257 |
-
""
|
258 |
-
);
|
259 |
} else {
|
260 |
formwise_data.field_name = "";
|
261 |
}
|
@@ -275,7 +270,7 @@
|
|
275 |
$submit_node,
|
276 |
position
|
277 |
) {
|
278 |
-
$submit_node.find(".ur-message").remove();
|
279 |
|
280 |
// Check if the form is edit-profile form.
|
281 |
if (
|
@@ -287,9 +282,14 @@
|
|
287 |
'<div class="user-registration-' + type + '"/>'
|
288 |
);
|
289 |
wrapper.append(message);
|
290 |
-
|
291 |
-
|
292 |
-
|
|
|
|
|
|
|
|
|
|
|
293 |
} else {
|
294 |
var wrapper = $(
|
295 |
'<div class="ur-message user-registration-' +
|
@@ -407,12 +407,9 @@
|
|
407 |
$.extend($.validator.messages, {
|
408 |
required:
|
409 |
user_registration_params.message_required_fields,
|
410 |
-
url:
|
411 |
-
|
412 |
-
|
413 |
-
user_registration_params.message_email_fields,
|
414 |
-
number:
|
415 |
-
user_registration_params.message_number_fields,
|
416 |
confirmpassword:
|
417 |
user_registration_params.message_confirm_password_fields,
|
418 |
});
|
@@ -495,9 +492,8 @@
|
|
495 |
}
|
496 |
|
497 |
// Remove word added by form filler in file upload field during submission
|
498 |
-
var file_upload =
|
499 |
-
".urfu-file-input"
|
500 |
-
);
|
501 |
|
502 |
form.missing_attachment_handler(
|
503 |
file_upload
|
@@ -505,8 +501,9 @@
|
|
505 |
|
506 |
var exist_detail = $this
|
507 |
.find(".uraf-profile-picture-upload")
|
508 |
-
.find(
|
509 |
-
|
|
|
510 |
|
511 |
if (1 === exist_detail) {
|
512 |
var profile = $this
|
@@ -606,8 +603,7 @@
|
|
606 |
}
|
607 |
|
608 |
var data = {
|
609 |
-
action:
|
610 |
-
"user_registration_user_form_submit",
|
611 |
security:
|
612 |
user_registration_params.user_registration_form_data_save,
|
613 |
form_data: form_data,
|
@@ -616,9 +612,7 @@
|
|
616 |
ur_frontend_form_nonce: form_nonce,
|
617 |
};
|
618 |
|
619 |
-
$(
|
620 |
-
document
|
621 |
-
).trigger(
|
622 |
"user_registration_frontend_before_form_submit",
|
623 |
[data, $this]
|
624 |
);
|
@@ -629,7 +623,9 @@
|
|
629 |
) {
|
630 |
if (
|
631 |
"1" ===
|
632 |
-
|
|
|
|
|
633 |
) {
|
634 |
var captchaResponse = $this
|
635 |
.find(
|
@@ -683,9 +679,7 @@
|
|
683 |
complete: function (ajax_response) {
|
684 |
var ajaxFlag = [];
|
685 |
ajaxFlag["status"] = false;
|
686 |
-
$(
|
687 |
-
document
|
688 |
-
).trigger(
|
689 |
"user_registration_frontend_before_ajax_complete_success_message",
|
690 |
[ajax_response, ajaxFlag]
|
691 |
);
|
@@ -702,9 +696,8 @@
|
|
702 |
)
|
703 |
.val();
|
704 |
|
705 |
-
var message =
|
706 |
-
'<ul class=""/>'
|
707 |
-
);
|
708 |
var type = "error";
|
709 |
|
710 |
try {
|
@@ -822,7 +815,8 @@
|
|
822 |
) {
|
823 |
window.setTimeout(
|
824 |
function () {
|
825 |
-
window.location =
|
|
|
826 |
},
|
827 |
1000
|
828 |
);
|
@@ -878,9 +872,11 @@
|
|
878 |
);
|
879 |
}
|
880 |
|
881 |
-
var success_message_position =
|
882 |
-
|
883 |
-
|
|
|
|
|
884 |
|
885 |
form.show_message(
|
886 |
message,
|
@@ -913,9 +909,7 @@
|
|
913 |
);
|
914 |
}
|
915 |
|
916 |
-
$(
|
917 |
-
document
|
918 |
-
).trigger(
|
919 |
"user_registration_frontend_after_ajax_complete",
|
920 |
[
|
921 |
ajax_response.responseText,
|
@@ -947,12 +941,9 @@
|
|
947 |
$.extend($.validator.messages, {
|
948 |
required:
|
949 |
user_registration_params.message_required_fields,
|
950 |
-
url:
|
951 |
-
|
952 |
-
|
953 |
-
user_registration_params.message_email_fields,
|
954 |
-
number:
|
955 |
-
user_registration_params.message_number_fields,
|
956 |
});
|
957 |
|
958 |
var $el = $this.find(".ur-smart-phone-field");
|
@@ -1027,9 +1018,8 @@
|
|
1027 |
.prop("disabled", true);
|
1028 |
|
1029 |
// Remove word added by form filler in file upload field during submission
|
1030 |
-
var file_upload =
|
1031 |
-
".urfu-file-input"
|
1032 |
-
);
|
1033 |
|
1034 |
form.missing_attachment_handler(file_upload);
|
1035 |
|
@@ -1040,9 +1030,8 @@
|
|
1040 |
form_data = form.get_form_data();
|
1041 |
|
1042 |
// Handle profile picture
|
1043 |
-
var profile_picture_url =
|
1044 |
-
"#profile_pic_url"
|
1045 |
-
).val();
|
1046 |
|
1047 |
form_data.push({
|
1048 |
value: profile_picture_url,
|
@@ -1056,8 +1045,7 @@
|
|
1056 |
}
|
1057 |
|
1058 |
var data = {
|
1059 |
-
action:
|
1060 |
-
"user_registration_update_profile_details",
|
1061 |
security:
|
1062 |
user_registration_params.user_registration_profile_details_save,
|
1063 |
form_data: form_data,
|
@@ -1145,7 +1133,7 @@
|
|
1145 |
// Scroll yo the top on ajax submission complete.
|
1146 |
$(window).scrollTop(
|
1147 |
$(
|
1148 |
-
".user-registration
|
1149 |
).position()
|
1150 |
);
|
1151 |
},
|
@@ -1266,9 +1254,11 @@
|
|
1266 |
typeof wp.passwordStrength
|
1267 |
.userInputDisallowedList
|
1268 |
) {
|
1269 |
-
disallowedListArray =
|
|
|
1270 |
} else {
|
1271 |
-
disallowedListArray =
|
|
|
1272 |
}
|
1273 |
|
1274 |
disallowedListArray.push(
|
@@ -1371,41 +1361,48 @@
|
|
1371 |
|
1372 |
var google_recaptcha_user_registration;
|
1373 |
var onloadURCallback = function () {
|
1374 |
-
jQuery(".ur-frontend-form")
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
"
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
).length;
|
1399 |
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1409 |
};
|
1410 |
|
1411 |
function request_recaptcha_token() {
|
36 |
);
|
37 |
|
38 |
if (single_field.length < 2) {
|
39 |
+
var single_data =
|
40 |
+
this_instance.get_fieldwise_data(
|
41 |
+
$(this)
|
42 |
+
);
|
43 |
+
var invite_code =
|
44 |
+
document.querySelector(
|
45 |
+
".field-invite_code"
|
46 |
+
);
|
47 |
|
48 |
if (
|
49 |
"invite_code" === single_data.field_name
|
99 |
switch (field_type) {
|
100 |
case "checkbox":
|
101 |
case "radio":
|
102 |
+
this_field_value =
|
103 |
+
this_field.prop(
|
104 |
+
"checked"
|
105 |
+
)
|
106 |
+
? this_field.val()
|
107 |
+
: "";
|
108 |
break;
|
109 |
default:
|
110 |
+
this_field_value =
|
111 |
+
this_field.val();
|
112 |
}
|
113 |
break;
|
114 |
case "select":
|
125 |
});
|
126 |
|
127 |
if (field_type == "checkbox") {
|
128 |
+
var field_value_json =
|
129 |
+
JSON.stringify(field_value);
|
|
|
130 |
} else if (field_type == "radio") {
|
131 |
var field_value_json = field_value[0];
|
132 |
} else {
|
135 |
|
136 |
var single_form_field_name =
|
137 |
multi_value_field[multi_start];
|
138 |
+
single_form_field_name =
|
139 |
+
single_form_field_name.replace("[]", "");
|
|
|
|
|
140 |
|
141 |
var field_data = {
|
142 |
value: field_value_json,
|
148 |
form_data.push(field_data);
|
149 |
}
|
150 |
|
151 |
+
$(document).trigger(
|
|
|
|
|
152 |
"user_registration_frontend_form_data_filter",
|
153 |
[form_data]
|
154 |
);
|
225 |
default:
|
226 |
}
|
227 |
|
228 |
+
$(document).trigger(
|
|
|
|
|
229 |
"user_registration_frontend_form_data_render",
|
230 |
[field, formwise_data]
|
231 |
);
|
249 |
field.attr("name") !== ""
|
250 |
) {
|
251 |
formwise_data.field_name = field.attr("name");
|
252 |
+
formwise_data.field_name =
|
253 |
+
formwise_data.field_name.replace("[]", "");
|
|
|
|
|
254 |
} else {
|
255 |
formwise_data.field_name = "";
|
256 |
}
|
270 |
$submit_node,
|
271 |
position
|
272 |
) {
|
273 |
+
$submit_node.closest(".user-registration").find(".ur-message").remove();
|
274 |
|
275 |
// Check if the form is edit-profile form.
|
276 |
if (
|
282 |
'<div class="user-registration-' + type + '"/>'
|
283 |
);
|
284 |
wrapper.append(message);
|
285 |
+
var my_account_selector = $(".user-registration").find(".user-registration-MyAccount-navigation");
|
286 |
+
if ( my_account_selector.length ) {
|
287 |
+
wrapper.insertBefore(
|
288 |
+
".user-registration-MyAccount-navigation"
|
289 |
+
);
|
290 |
+
} else {
|
291 |
+
wrapper.insertBefore(".ur-frontend-form");
|
292 |
+
}
|
293 |
} else {
|
294 |
var wrapper = $(
|
295 |
'<div class="ur-message user-registration-' +
|
407 |
$.extend($.validator.messages, {
|
408 |
required:
|
409 |
user_registration_params.message_required_fields,
|
410 |
+
url: user_registration_params.message_url_fields,
|
411 |
+
email: user_registration_params.message_email_fields,
|
412 |
+
number: user_registration_params.message_number_fields,
|
|
|
|
|
|
|
413 |
confirmpassword:
|
414 |
user_registration_params.message_confirm_password_fields,
|
415 |
});
|
492 |
}
|
493 |
|
494 |
// Remove word added by form filler in file upload field during submission
|
495 |
+
var file_upload =
|
496 |
+
$this.find(".urfu-file-input");
|
|
|
497 |
|
498 |
form.missing_attachment_handler(
|
499 |
file_upload
|
501 |
|
502 |
var exist_detail = $this
|
503 |
.find(".uraf-profile-picture-upload")
|
504 |
+
.find(
|
505 |
+
".user-registration-error"
|
506 |
+
).length;
|
507 |
|
508 |
if (1 === exist_detail) {
|
509 |
var profile = $this
|
603 |
}
|
604 |
|
605 |
var data = {
|
606 |
+
action: "user_registration_user_form_submit",
|
|
|
607 |
security:
|
608 |
user_registration_params.user_registration_form_data_save,
|
609 |
form_data: form_data,
|
612 |
ur_frontend_form_nonce: form_nonce,
|
613 |
};
|
614 |
|
615 |
+
$(document).trigger(
|
|
|
|
|
616 |
"user_registration_frontend_before_form_submit",
|
617 |
[data, $this]
|
618 |
);
|
623 |
) {
|
624 |
if (
|
625 |
"1" ===
|
626 |
+
$registration_form
|
627 |
+
.find("form.register")
|
628 |
+
.data("captcha-enabled")
|
629 |
) {
|
630 |
var captchaResponse = $this
|
631 |
.find(
|
679 |
complete: function (ajax_response) {
|
680 |
var ajaxFlag = [];
|
681 |
ajaxFlag["status"] = false;
|
682 |
+
$(document).trigger(
|
|
|
|
|
683 |
"user_registration_frontend_before_ajax_complete_success_message",
|
684 |
[ajax_response, ajaxFlag]
|
685 |
);
|
696 |
)
|
697 |
.val();
|
698 |
|
699 |
+
var message =
|
700 |
+
$('<ul class=""/>');
|
|
|
701 |
var type = "error";
|
702 |
|
703 |
try {
|
815 |
) {
|
816 |
window.setTimeout(
|
817 |
function () {
|
818 |
+
window.location =
|
819 |
+
redirect_url;
|
820 |
},
|
821 |
1000
|
822 |
);
|
872 |
);
|
873 |
}
|
874 |
|
875 |
+
var success_message_position =
|
876 |
+
JSON.parse(
|
877 |
+
ajax_response.responseText
|
878 |
+
).data
|
879 |
+
.success_message_positon;
|
880 |
|
881 |
form.show_message(
|
882 |
message,
|
909 |
);
|
910 |
}
|
911 |
|
912 |
+
$(document).trigger(
|
|
|
|
|
913 |
"user_registration_frontend_after_ajax_complete",
|
914 |
[
|
915 |
ajax_response.responseText,
|
941 |
$.extend($.validator.messages, {
|
942 |
required:
|
943 |
user_registration_params.message_required_fields,
|
944 |
+
url: user_registration_params.message_url_fields,
|
945 |
+
email: user_registration_params.message_email_fields,
|
946 |
+
number: user_registration_params.message_number_fields,
|
|
|
|
|
|
|
947 |
});
|
948 |
|
949 |
var $el = $this.find(".ur-smart-phone-field");
|
1018 |
.prop("disabled", true);
|
1019 |
|
1020 |
// Remove word added by form filler in file upload field during submission
|
1021 |
+
var file_upload =
|
1022 |
+
$this.find(".urfu-file-input");
|
|
|
1023 |
|
1024 |
form.missing_attachment_handler(file_upload);
|
1025 |
|
1030 |
form_data = form.get_form_data();
|
1031 |
|
1032 |
// Handle profile picture
|
1033 |
+
var profile_picture_url =
|
1034 |
+
$("#profile_pic_url").val();
|
|
|
1035 |
|
1036 |
form_data.push({
|
1037 |
value: profile_picture_url,
|
1045 |
}
|
1046 |
|
1047 |
var data = {
|
1048 |
+
action: "user_registration_update_profile_details",
|
|
|
1049 |
security:
|
1050 |
user_registration_params.user_registration_profile_details_save,
|
1051 |
form_data: form_data,
|
1133 |
// Scroll yo the top on ajax submission complete.
|
1134 |
$(window).scrollTop(
|
1135 |
$(
|
1136 |
+
".user-registration"
|
1137 |
).position()
|
1138 |
);
|
1139 |
},
|
1254 |
typeof wp.passwordStrength
|
1255 |
.userInputDisallowedList
|
1256 |
) {
|
1257 |
+
disallowedListArray =
|
1258 |
+
wp.passwordStrength.userInputDisallowedList();
|
1259 |
} else {
|
1260 |
+
disallowedListArray =
|
1261 |
+
wp.passwordStrength.userInputBlacklist();
|
1262 |
}
|
1263 |
|
1264 |
disallowedListArray.push(
|
1361 |
|
1362 |
var google_recaptcha_user_registration;
|
1363 |
var onloadURCallback = function () {
|
1364 |
+
jQuery(".ur-frontend-form")
|
1365 |
+
.find("form.register")
|
1366 |
+
.each(function (i) {
|
1367 |
+
$this = jQuery(this);
|
1368 |
+
var form_id = $this.closest(".ur-frontend-form").attr("id");
|
1369 |
+
|
1370 |
+
var node_recaptcha_register = $this.find(
|
1371 |
+
"#ur-recaptcha-node #node_recaptcha_register"
|
1372 |
+
).length;
|
1373 |
+
|
1374 |
+
if (node_recaptcha_register !== 0) {
|
1375 |
+
$this
|
1376 |
+
.find("#ur-recaptcha-node .g-recaptcha")
|
1377 |
+
.attr("id", "node_recaptcha_register_" + form_id);
|
1378 |
+
google_recaptcha_user_registration = grecaptcha.render(
|
1379 |
+
"node_recaptcha_register_" + form_id,
|
1380 |
+
{
|
1381 |
+
sitekey: ur_google_recaptcha_code.site_key,
|
1382 |
+
theme: "light",
|
1383 |
+
style: "transform:scale(0.77);-webkit-transform:scale(0.77);transform-origin:0 0;-webkit-transform-origin:0 0;",
|
1384 |
+
}
|
1385 |
+
);
|
1386 |
+
}
|
1387 |
+
});
|
|
|
1388 |
|
1389 |
+
jQuery(".ur-frontend-form")
|
1390 |
+
.find("form.login")
|
1391 |
+
.each(function (i) {
|
1392 |
+
$this = jQuery(this);
|
1393 |
+
var ur_recaptcha_node = $this.find("#ur-recaptcha-node");
|
1394 |
+
|
1395 |
+
if (ur_recaptcha_node.length !== 0) {
|
1396 |
+
grecaptcha.render(
|
1397 |
+
ur_recaptcha_node.find(".g-recaptcha").attr("id"),
|
1398 |
+
{
|
1399 |
+
sitekey: ur_google_recaptcha_code.site_key,
|
1400 |
+
theme: "light",
|
1401 |
+
style: "transform:scale(0.77);-webkit-transform:scale(0.77);transform-origin:0 0;-webkit-transform-origin:0 0;",
|
1402 |
+
}
|
1403 |
+
);
|
1404 |
+
}
|
1405 |
+
});
|
1406 |
};
|
1407 |
|
1408 |
function request_recaptcha_token() {
|
assets/js/frontend/user-registration.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function request_recaptcha_token(){0!==jQuery(".ur-frontend-form").find("form.register #ur-recaptcha-node #node_recaptcha_register.g-recaptcha-v3").length&&grecaptcha.ready(function(){grecaptcha.execute(ur_google_recaptcha_code.site_key,{action:"register"}).then(function(e){jQuery("form.register").find("#g-recaptcha-response").text(e)})});0!==jQuery(".ur-frontend-form").find("form.login .ur-form-row .ur-form-grid #ur-recaptcha-node #node_recaptcha_login.g-recaptcha-v3").length&&grecaptcha.ready(function(){grecaptcha.execute(ur_google_recaptcha_code.site_key,{action:"login"}).then(function(e){jQuery("form.login").find("#g-recaptcha-response").text(e)})})}function ur_includes(e,r){if(Array.isArray(e))for(var t=0;t<e.length;t+=1)if(e[t]===r)return!0;return!1}!function(e){var r=function(){var r=user_registration_params.ursL10n;e.fn.ur_form_submission=function(){return this.each(function(){var t=e(this),a=[],i=user_registration_params.form_required_fields,s={init:function(){},get_form_data:function(r){if(r===t.closest(".ur-frontend-form").attr("id")||e(".ur-frontend-form").find("form.edit-profile").hasClass("user-registration-EditProfileForm")){var a=this,i=[],n=s.separate_form_handler(""),o=new Array;e.each(n,function(){var r=e(this).attr("name");if(s.separate_form_handler('[name="'+r+'"]').length<2){var t=a.get_fieldwise_data(e(this)),n=document.querySelector(".field-invite_code");"invite_code"===t.field_name?"none"!==n.style.display&&i.push(t):i.push(t)}else e.inArray(r,o)<0&&o.push(r)});for(var d=0;d<o.length;d++){var u=s.separate_form_handler('[name="'+o[d]+'"]'),f=(u.get(0).tagName.toLowerCase(),"undefined"!==u.eq(0).attr("type")?u.eq(0).attr("type"):"null"),l=new Array;if(e.each(u,function(){var r=e(this),t="";switch(r.get(0).tagName.toLowerCase()){case"input":switch(f){case"checkbox":case"radio":t=r.prop("checked")?r.val():"";break;default:t=r.val()}break;case"select":case"textarea":t=r.val()}""!==t&&l.push(t)}),"checkbox"==f)var c=JSON.stringify(l);else if("radio"==f)c=l[0];else c=u.val();var p=o[d];p=p.replace("[]","");var _={value:c,field_type:f,label:u.eq(0).attr("data-label"),field_name:p};i.push(_)}return e(document).trigger("user_registration_frontend_form_data_filter",[i]),i}},get_fieldwise_data:function(r){var t={},s=r.get(0).tagName.toLowerCase(),n="undefined"!==r.attr("name")?r.attr("name"):"null",o=[];e(".field-phone").each(function(){var r=e(this).find(".form-row").attr("id");e(this).find(".form-row").find("#"+r).hasClass("ur-smart-phone-field")&&o.push(e(this).find(".form-row").attr("id"))});var d="undefined"!==r.attr("type")?r.attr("type"):"null",u=r.get(0).className.split(" ")[0];switch(t.value="",s){case"input":switch(d){case"checkbox":case"radio":t.value=r.prop("checked")?r.val():"";break;default:t.value=r.val()}ur_includes(o,n)&&(t.value=r.siblings('input[type="hidden"]').val());break;case"select":t.value=r.val();break;case"textarea":switch(u){case"wysiwyg":tinyMCE.triggerSave(),t.value=r.val();break;default:t.value=r.val()}}return e(document).trigger("user_registration_frontend_form_data_render",[r,t]),t.field_type="undefined"!==r.eq(0).attr("type")?r.eq(0).attr("type"):"null",r.attr("data-label")!==undefined?t.label=r.attr("data-label"):r.prev().length&&"label"===r.prev().get(0).tagName.toLowerCase()?t.label=r.prev().text():t.label=t.field_type,r.attr("name")!==undefined&&""!==r.attr("name")?(t.field_name=r.attr("name"),t.field_name=t.field_name.replace("[]","")):t.field_name="",e.inArray(t.field_name,i.join(",").trim())>=0&&a.push(t.field_name),t},show_message:function(r,t,a,i){if(a.find(".ur-message").remove(),e(".ur-frontend-form").find("form.edit-profile").hasClass("user-registration-EditProfileForm")){(s=e('<div class="user-registration-'+t+'"/>')).append(r),s.insertBefore(".user-registration-MyAccount-navigation")}else{var s;(s=e('<div class="ur-message user-registration-'+t+'" id="ur-submit-message-node"/>')).append(r),"1"===i?a.append(s):a.prepend(s)}},separate_form_handler:function(r){return e(".ur-frontend-form").find("form.edit-profile").hasClass("user-registration-EditProfileForm")?t.find(".user-registration-profile-fields").find(".ur-edit-profile-field"+r):t.closest(".ur-frontend-form").find(".ur-form-grid").find(".ur-frontend-field"+r)},missing_attachment_handler:function(r){var t=[];if(1<=r.length){r.each(function(){var r=e(this).attr("id");-1===e.inArray(r,t)&&t.push(r)});for(var a=0;a<t.length;a++){for(var i=e("#"+t[a]).val().split(","),s=i.length;s>=0;s--)e.isNumeric(i[s])||i.splice(s,1);e("#"+t[a]).val(i)}}}},n={init:function(){this.form_submit_event(),this.edit_profile_event()},form_submit_event:function(){e(".ur-frontend-form").each(function(){e(this).find("form.register").off("submit").on("submit",function(t){t.preventDefault();var a=e(this);if(e.extend(e.validator.messages,{required:user_registration_params.message_required_fields,url:user_registration_params.message_url_fields,email:user_registration_params.message_email_fields,number:user_registration_params.message_number_fields,confirmpassword:user_registration_params.message_confirm_password_fields}),a.find(".user-registration-password-strength").length>0){var i=a.find(".user-registration-password-strength").attr("data-current-strength"),n=a.find(".user-registration-password-strength").attr("data-min-strength");if(parseInt(i,0)<parseInt(n,0)){if(""!=a.find("#user_pass").val()){a.find("#user_pass_error").remove();var o='<label id="user_pass_error" class="user-registration-error" for="user_pass">'+r.password_strength_error+".</label>";a.find(".user-registration-password-hint").after(o),a.find("#user_pass").attr("aria-invalid",!0),a.find("#user_pass").trigger("focus")}return!1}}var d=a.find(".ur-smart-phone-field");if("true"===d.attr("aria-invalid")){(l=d.closest("p.form-row")).find("#"+d.data("id")+"-error").remove();var u='<label id="'+d.data("id")+'-error" class="user-registration-error" for="'+d.data("id")+'">'+user_registration_params.message_validate_phone_number+"</label>";return l.append(u),l.find("#"+d.data("id")).attr("aria-invalid",!0),!0}var f=a.find(".urfu-file-input");s.missing_attachment_handler(f);if(1===a.find(".uraf-profile-picture-upload").find(".user-registration-error").length){var l,c=a.find(".uraf-profile-picture-upload").find(".uraf-profile-picture-input");(l=a.find(".uraf-profile-picture-upload")).find("#"+c.attr("name")+"-error").remove(),l.find(".uraf-profile-picture-file-error").remove();var p='<label id="'+c.attr("name")+'-error" class="user-registration-error" for="'+c.attr("name")+'">'+user_registration_params.message_required_fields+"</label>";l.find("button.wp_uraf_profile_picture_upload").after(p)}if(a.valid()){a.find(".ur-submit-button").prop("disabled",!0);var _,m=0,g="0",h=a.find('[name="g-recaptcha-response"]').val();try{_=JSON.stringify(s.get_form_data(a.closest(".ur-frontend-form").attr("id")))}catch(b){_=""}1===e(this).closest("form").find('input[name="ur-user-form-id"]').length&&(m=e(this).closest("form").find('input[name="ur-user-form-id"]').val()),1===e(this).closest("form").find('input[name="ur_frontend_form_nonce"]').length&&(g=e(this).closest("form").find('input[name="ur_frontend_form_nonce"]').val());var v={action:"user_registration_user_form_submit",security:user_registration_params.user_registration_form_data_save,form_data:_,captchaResponse:h,form_id:m,ur_frontend_form_nonce:g};if(e(document).trigger("user_registration_frontend_before_form_submit",[v,a]),"undefined"!=typeof ur_google_recaptcha_code&&"1"===ur_google_recaptcha_code.is_captcha_enable){if(0===(h=a.find('[name="g-recaptcha-response"]').val()).length)return s.show_message("<p>"+r.captcha_error+"</p>","error",a,"1"),void a.find(".ur-submit-button").prop("disabled",!1);if("v3"==ur_google_recaptcha_code.version)request_recaptcha_token();else for(var w=0;w<=google_recaptcha_user_registration;w++)grecaptcha.reset(w)}a.find(".ur-submit-button").find("span").addClass("ur-front-spinner"),e.ajax({url:user_registration_params.ajax_url,data:v,type:"POST",async:!0,complete:function(t){var i=[];if(i.status=!1,e(document).trigger("user_registration_frontend_before_ajax_complete_success_message",[t,i]),!i.status){a.find(".ur-submit-button").find("span").removeClass("ur-front-spinner");var n=a.find('input[name="ur-redirect-url"]').val(),o=e('<ul class=""/>'),d="error";try{var u=JSON.parse(t.responseText);"undefined"!=typeof u.success&&!0===u.success&&"undefined"!=typeof u.data.paypal_redirect&&(window.location=u.data.paypal_redirect),"undefined"!=typeof u.success&&!0===u.success&&(d="message"),"message"===d?(a.find(".user-registration-password-hint").remove(),a.find(".user-registration-password-strength").remove(),"admin_approval"==u.data.form_login_option?o.append("<li>"+r.user_under_approval+"</li>"):"email_confirmation"==u.data.form_login_option?o.append("<li>"+r.user_email_pending+"</li>"):"payment"==u.data.form_login_option?o.append("<li>"+u.data.message+"</li>"):o.append((u.data.message,r.user_successfully_saved)),"undefined"!=typeof u.data.auto_password_generation_success_message&&o.append("<li>"+u.data.auto_password_generation_success_message+"</li>"),a[0].reset(),jQuery("#billing_country").trigger("change"),jQuery("#shipping_country").trigger("change"),void 0!==n&&""!==n?window.setTimeout(function(){window.location=n},1e3):"undefined"!=typeof u.data.auto_login&&u.data.auto_login&&location.reload()):"error"===d&&("object"==typeof u.data.message?e.each(u.data.message,function(e,r){o.append("<li>"+r+"</li>")}):o.append("<li>"+u.data.message+"</li>"))}catch(l){o.append("<li>"+l.message+"</li>")}var f=JSON.parse(t.responseText).data.success_message_positon;s.show_message(o,d,a,f),"1"===f?e(window).scrollTop(a.find(".ur-button-container").offset().top):e(window).scrollTop(a.closest(".ur-frontend-form").offset().top),e(document).trigger("user_registration_frontend_after_ajax_complete",[t.responseText,d,a]),a.find(".ur-submit-button").prop("disabled",!1)}}})}})})},edit_profile_event:function(){e("form.user-registration-EditProfileForm").on("submit",function(r){var t=e(this);e.extend(e.validator.messages,{required:user_registration_params.message_required_fields,url:user_registration_params.message_url_fields,email:user_registration_params.message_email_fields,number:user_registration_params.message_number_fields});var a=t.find(".ur-smart-phone-field");if("true"===a.attr("aria-invalid")){(n=a.closest("p.form-row")).find("#"+a.data("id")+"-error").remove();var i='<label id="'+a.data("id")+'-error" class="user-registration-error" for="'+a.data("id")+'">'+user_registration_params.message_validate_phone_number+"</label>";return n.append(i),n.find("#"+a.data("id")).attr("aria-invalid",!0),!0}if(1===t.find(".uraf-profile-picture-upload").find(".user-registration-error").length){var n,o=t.find(".uraf-profile-picture-upload").find(".uraf-profile-picture-input");(n=t.find(".uraf-profile-picture-upload")).find("#"+o.attr("name")+"-error").remove(),n.find(".uraf-profile-picture-file-error").remove();var d='<label id="'+o.attr("name")+'-error" class="user-registration-error" for="'+o.attr("name")+'">'+user_registration_params.message_required_fields+"</label>";n.find("button.wp_uraf_profile_picture_upload").after(d)}if(t.valid()){r.preventDefault(),t.find(".user-registration-submit-Button").prop("disabled",!0);var u=t.find(".urfu-file-input");s.missing_attachment_handler(u);var f;try{f=s.get_form_data();var l=e("#profile_pic_url").val();f.push({value:l,field_name:"user_registration_profile_pic_url"}),f=JSON.stringify(f)}catch(p){f=""}var c={action:"user_registration_update_profile_details",security:user_registration_params.user_registration_profile_details_save,form_data:f};t.find(".user-registration-submit-Button").find("span").addClass("ur-front-spinner"),e.ajax({type:"POST",url:user_registration_params.ajax_url,dataType:"JSON",data:c,complete:function(r){t.find("span.ur-front-spinner").removeClass("ur-front-spinner"),t.closest(".user-registration").find(".user-registration-error").remove(),t.closest(".user-registration").find(".user-registration-message").remove();var a=e('<ul class=""/>'),i="error";try{var n=JSON.parse(r.responseText);"undefined"!=typeof n.success&&!0===n.success&&(i="message"),"object"==typeof n.data.message?e.each(n.data.message,function(e,r){a.append("<li>"+r+"</li>")}):a.append("<li>"+n.data.message+"</li>")}catch(o){a.append("<li>"+o.message+"</li>")}s.show_message(a,i,t,"0"),t.find(".user-registration-submit-Button").prop("disabled",!1),e(window).scrollTop(e(".user-registration-MyAccount-navigation").position())}})}})}};s.init(),n.init()})},e(function(){e(".ur-submit-button").on("click",function(){e(this).closest("form.register").ur_form_submission()}),e(".user-registration-submit-Button").on("click",function(){e(".ur-frontend-form").find("form.edit-profile").hasClass("user-registration-EditProfileForm")&&"yes"===user_registration_params.ajax_submission_on_edit_profile&&e("form.user-registration-EditProfileForm").ur_form_submission()});var t={};e(document.body).on("click","#load_flatpickr",function(){var r=e(this).data("id"),a=t[r];if(!a){var i=e(this).closest(".ur-field-item").find("#formated_date").val();if(0<e(".ur-frontend-form").length)var s=e(".ur-frontend-form #"+r).attr("type","text").val(i);else s=e(".woocommerce-MyAccount-content #"+r).attr("type","text").val(i);e(this).attr("data-date-format",s.data("date-format")),e(this).attr("data-mode",s.data("mode")),e(this).attr("data-min-date",s.data("min-date")),e(this).attr("data-max-date",s.data("max-date")),e(this).attr("data-default-date",i),a=e(this).flatpickr({disableMobile:!0,onChange:function(t,a,i){e("#"+r).val(a)}}),t[r]=a}a&&a.open()}),e(".ur-frontend-form").each(function(){e(this).find("form.register").on("focusout","#user_pass, #password_1",function(){$this=e(this);var t=e(this).attr("name"),a=e(this).data("id"),i=$this.closest("form").attr("data-enable-strength-password");if("yes"===i||"1"===i){var s=$this.closest("form"),n=s.attr("data-minimum-password-strength"),o=[];(o="function"==typeof wp.passwordStrength.userInputDisallowedList?wp.passwordStrength.userInputDisallowedList():wp.passwordStrength.userInputBlacklist()).push(s.find('input[data-id="user_email"]').val()),o.push(s.find('input[data-id="user_login"]').val());if(wp.passwordStrength.meter($this.val(),o)<n&&""!==$this.val()){s.find("#"+a+"_error").remove();var d='<label id="'+a+'_error" class="user-registration-error" for="'+t+'">'+r.password_strength_error+".</label>";s.find(".user-registration-password-hint").after(d)}}})})}),e(function(){request_recaptcha_token()}),e(function(){e(".user-registration-EditProfileForm.edit-profile .field-country").length>0&&e(".field-country").each(function(){var r=e(this).find(".ur-data-holder").data("option-value"),t=e(this).find(".ur-data-holder").data("option-html"),a=e(this).find("select");r&&t&&(0===a.find('option[value="'+r+'"]').length&&a.append("<option class='ur-remove' selected='selected' value='"+r+"'>"+t+"</option>"),e(this).on("click",function(){e(this).find(".ur-remove").remove()}))})})};r(),e(window).on("load",function(){r()})}(jQuery);var google_recaptcha_user_registration,onloadURCallback=function(){jQuery(".ur-frontend-form").each(function(e){$this=jQuery(this);var r=$this.attr("id");0!==$this.find("form.register #ur-recaptcha-node #node_recaptcha_register").length&&($this.find("form.register #ur-recaptcha-node .g-recaptcha").attr("id","node_recaptcha_register_"+r),google_recaptcha_user_registration=grecaptcha.render("node_recaptcha_register_"+r,{sitekey:ur_google_recaptcha_code.site_key,theme:"light",style:"transform:scale(0.77);-webkit-transform:scale(0.77);transform-origin:0 0;-webkit-transform-origin:0 0;"}));0!==$this.find("form.login .ur-form-row .ur-form-grid #ur-recaptcha-node #node_recaptcha_login").length&&grecaptcha.render("node_recaptcha_login",{sitekey:ur_google_recaptcha_code.site_key,theme:"light",style:"transform:scale(0.77);-webkit-transform:scale(0.77);transform-origin:0 0;-webkit-transform-origin:0 0;"})})};!function(e){e(document).on("click",".password_preview",function(r){r.preventDefault();var t=user_registration_params.ursL10n,a=e(this).hasClass("dashicons-hidden")?"show":"hide",i=e(this).closest(".user-registration-form-row").find('input[name="password"]');if(0===i.length&&(i=e(this).closest(".field-user_pass").find('input[name="user_pass"]')),0===i.length&&(i=e(this).closest(".field-user_confirm_password").find('input[name="user_confirm_password"]')),0===i.length&&(i=e(this).closest(".user-registration-form-row").find('input[name="password_current"]')),0===i.length&&(i=e(this).closest(".user-registration-form-row").find('input[name="password_1"]')),0===i.length&&(i=e(this).closest(".user-registration-form-row").find('input[name="password_2"]')),i.length>0)switch(a){case"show":i.attr("type","text"),e(this).removeClass("dashicons-hidden").addClass("dashicons-visibility"),e(this).attr("title",t.hide_password_title);break;case"hide":i.attr("type","password"),e(this).removeClass("dashicons-visibility").addClass("dashicons-hidden"),e(this).attr("title",t.show_password_title)}})}(jQuery);
|
1 |
+
function request_recaptcha_token(){0!==jQuery(".ur-frontend-form").find("form.register #ur-recaptcha-node #node_recaptcha_register.g-recaptcha-v3").length&&grecaptcha.ready(function(){grecaptcha.execute(ur_google_recaptcha_code.site_key,{action:"register"}).then(function(e){jQuery("form.register").find("#g-recaptcha-response").text(e)})});0!==jQuery(".ur-frontend-form").find("form.login .ur-form-row .ur-form-grid #ur-recaptcha-node #node_recaptcha_login.g-recaptcha-v3").length&&grecaptcha.ready(function(){grecaptcha.execute(ur_google_recaptcha_code.site_key,{action:"login"}).then(function(e){jQuery("form.login").find("#g-recaptcha-response").text(e)})})}function ur_includes(e,r){if(Array.isArray(e))for(var t=0;t<e.length;t+=1)if(e[t]===r)return!0;return!1}!function(e){var r=function(){var r=user_registration_params.ursL10n;e.fn.ur_form_submission=function(){return this.each(function(){var t=e(this),a=[],i=user_registration_params.form_required_fields,s={init:function(){},get_form_data:function(r){if(r===t.closest(".ur-frontend-form").attr("id")||e(".ur-frontend-form").find("form.edit-profile").hasClass("user-registration-EditProfileForm")){var a=this,i=[],n=s.separate_form_handler(""),o=new Array;e.each(n,function(){var r=e(this).attr("name");if(s.separate_form_handler('[name="'+r+'"]').length<2){var t=a.get_fieldwise_data(e(this)),n=document.querySelector(".field-invite_code");"invite_code"===t.field_name?"none"!==n.style.display&&i.push(t):i.push(t)}else e.inArray(r,o)<0&&o.push(r)});for(var d=0;d<o.length;d++){var u=s.separate_form_handler('[name="'+o[d]+'"]'),f=(u.get(0).tagName.toLowerCase(),"undefined"!==u.eq(0).attr("type")?u.eq(0).attr("type"):"null"),l=new Array;if(e.each(u,function(){var r=e(this),t="";switch(r.get(0).tagName.toLowerCase()){case"input":switch(f){case"checkbox":case"radio":t=r.prop("checked")?r.val():"";break;default:t=r.val()}break;case"select":case"textarea":t=r.val()}""!==t&&l.push(t)}),"checkbox"==f)var c=JSON.stringify(l);else if("radio"==f)c=l[0];else c=u.val();var p=o[d];p=p.replace("[]","");var _={value:c,field_type:f,label:u.eq(0).attr("data-label"),field_name:p};i.push(_)}return e(document).trigger("user_registration_frontend_form_data_filter",[i]),i}},get_fieldwise_data:function(r){var t={},s=r.get(0).tagName.toLowerCase(),n="undefined"!==r.attr("name")?r.attr("name"):"null",o=[];e(".field-phone").each(function(){var r=e(this).find(".form-row").attr("id");e(this).find(".form-row").find("#"+r).hasClass("ur-smart-phone-field")&&o.push(e(this).find(".form-row").attr("id"))});var d="undefined"!==r.attr("type")?r.attr("type"):"null",u=r.get(0).className.split(" ")[0];switch(t.value="",s){case"input":switch(d){case"checkbox":case"radio":t.value=r.prop("checked")?r.val():"";break;default:t.value=r.val()}ur_includes(o,n)&&(t.value=r.siblings('input[type="hidden"]').val());break;case"select":t.value=r.val();break;case"textarea":switch(u){case"wysiwyg":tinyMCE.triggerSave(),t.value=r.val();break;default:t.value=r.val()}}return e(document).trigger("user_registration_frontend_form_data_render",[r,t]),t.field_type="undefined"!==r.eq(0).attr("type")?r.eq(0).attr("type"):"null",r.attr("data-label")!==undefined?t.label=r.attr("data-label"):r.prev().length&&"label"===r.prev().get(0).tagName.toLowerCase()?t.label=r.prev().text():t.label=t.field_type,r.attr("name")!==undefined&&""!==r.attr("name")?(t.field_name=r.attr("name"),t.field_name=t.field_name.replace("[]","")):t.field_name="",e.inArray(t.field_name,i.join(",").trim())>=0&&a.push(t.field_name),t},show_message:function(r,t,a,i){if(a.closest(".user-registration").find(".ur-message").remove(),e(".ur-frontend-form").find("form.edit-profile").hasClass("user-registration-EditProfileForm")){(s=e('<div class="user-registration-'+t+'"/>')).append(r);e(".user-registration").find(".user-registration-MyAccount-navigation").length?s.insertBefore(".user-registration-MyAccount-navigation"):s.insertBefore(".ur-frontend-form")}else{var s;(s=e('<div class="ur-message user-registration-'+t+'" id="ur-submit-message-node"/>')).append(r),"1"===i?a.append(s):a.prepend(s)}},separate_form_handler:function(r){return e(".ur-frontend-form").find("form.edit-profile").hasClass("user-registration-EditProfileForm")?t.find(".user-registration-profile-fields").find(".ur-edit-profile-field"+r):t.closest(".ur-frontend-form").find(".ur-form-grid").find(".ur-frontend-field"+r)},missing_attachment_handler:function(r){var t=[];if(1<=r.length){r.each(function(){var r=e(this).attr("id");-1===e.inArray(r,t)&&t.push(r)});for(var a=0;a<t.length;a++){for(var i=e("#"+t[a]).val().split(","),s=i.length;s>=0;s--)e.isNumeric(i[s])||i.splice(s,1);e("#"+t[a]).val(i)}}}},n={init:function(){this.form_submit_event(),this.edit_profile_event()},form_submit_event:function(){e(".ur-frontend-form").each(function(){var t=e(this);t.find("form.register").off("submit").on("submit",function(a){a.preventDefault();var i=e(this);if(e.extend(e.validator.messages,{required:user_registration_params.message_required_fields,url:user_registration_params.message_url_fields,email:user_registration_params.message_email_fields,number:user_registration_params.message_number_fields,confirmpassword:user_registration_params.message_confirm_password_fields}),i.find(".user-registration-password-strength").length>0){var n=i.find(".user-registration-password-strength").attr("data-current-strength"),o=i.find(".user-registration-password-strength").attr("data-min-strength");if(parseInt(n,0)<parseInt(o,0)){if(""!=i.find("#user_pass").val()){i.find("#user_pass_error").remove();var d='<label id="user_pass_error" class="user-registration-error" for="user_pass">'+r.password_strength_error+".</label>";i.find(".user-registration-password-hint").after(d),i.find("#user_pass").attr("aria-invalid",!0),i.find("#user_pass").trigger("focus")}return!1}}var u=i.find(".ur-smart-phone-field");if("true"===u.attr("aria-invalid")){(c=u.closest("p.form-row")).find("#"+u.data("id")+"-error").remove();var f='<label id="'+u.data("id")+'-error" class="user-registration-error" for="'+u.data("id")+'">'+user_registration_params.message_validate_phone_number+"</label>";return c.append(f),c.find("#"+u.data("id")).attr("aria-invalid",!0),!0}var l=i.find(".urfu-file-input");s.missing_attachment_handler(l);if(1===i.find(".uraf-profile-picture-upload").find(".user-registration-error").length){var c,p=i.find(".uraf-profile-picture-upload").find(".uraf-profile-picture-input");(c=i.find(".uraf-profile-picture-upload")).find("#"+p.attr("name")+"-error").remove(),c.find(".uraf-profile-picture-file-error").remove();var _='<label id="'+p.attr("name")+'-error" class="user-registration-error" for="'+p.attr("name")+'">'+user_registration_params.message_required_fields+"</label>";c.find("button.wp_uraf_profile_picture_upload").after(_)}if(i.valid()){i.find(".ur-submit-button").prop("disabled",!0);var m,g=0,h="0",v=i.find('[name="g-recaptcha-response"]').val();try{m=JSON.stringify(s.get_form_data(i.closest(".ur-frontend-form").attr("id")))}catch(y){m=""}1===e(this).closest("form").find('input[name="ur-user-form-id"]').length&&(g=e(this).closest("form").find('input[name="ur-user-form-id"]').val()),1===e(this).closest("form").find('input[name="ur_frontend_form_nonce"]').length&&(h=e(this).closest("form").find('input[name="ur_frontend_form_nonce"]').val());var w={action:"user_registration_user_form_submit",security:user_registration_params.user_registration_form_data_save,form_data:m,captchaResponse:v,form_id:g,ur_frontend_form_nonce:h};if(e(document).trigger("user_registration_frontend_before_form_submit",[w,i]),"undefined"!=typeof ur_google_recaptcha_code&&"1"===t.find("form.register").data("captcha-enabled")){if(0===(v=i.find('[name="g-recaptcha-response"]').val()).length)return s.show_message("<p>"+r.captcha_error+"</p>","error",i,"1"),void i.find(".ur-submit-button").prop("disabled",!1);if("v3"==ur_google_recaptcha_code.version)request_recaptcha_token();else for(var b=0;b<=google_recaptcha_user_registration;b++)grecaptcha.reset(b)}i.find(".ur-submit-button").find("span").addClass("ur-front-spinner"),e.ajax({url:user_registration_params.ajax_url,data:w,type:"POST",async:!0,complete:function(t){var a=[];if(a.status=!1,e(document).trigger("user_registration_frontend_before_ajax_complete_success_message",[t,a]),!a.status){i.find(".ur-submit-button").find("span").removeClass("ur-front-spinner");var n=i.find('input[name="ur-redirect-url"]').val(),o=e('<ul class=""/>'),d="error";try{var u=JSON.parse(t.responseText);"undefined"!=typeof u.success&&!0===u.success&&"undefined"!=typeof u.data.paypal_redirect&&(window.location=u.data.paypal_redirect),"undefined"!=typeof u.success&&!0===u.success&&(d="message"),"message"===d?(i.find(".user-registration-password-hint").remove(),i.find(".user-registration-password-strength").remove(),"admin_approval"==u.data.form_login_option?o.append("<li>"+r.user_under_approval+"</li>"):"email_confirmation"==u.data.form_login_option?o.append("<li>"+r.user_email_pending+"</li>"):"payment"==u.data.form_login_option?o.append("<li>"+u.data.message+"</li>"):o.append((u.data.message,r.user_successfully_saved)),"undefined"!=typeof u.data.auto_password_generation_success_message&&o.append("<li>"+u.data.auto_password_generation_success_message+"</li>"),i[0].reset(),jQuery("#billing_country").trigger("change"),jQuery("#shipping_country").trigger("change"),void 0!==n&&""!==n?window.setTimeout(function(){window.location=n},1e3):"undefined"!=typeof u.data.auto_login&&u.data.auto_login&&location.reload()):"error"===d&&("object"==typeof u.data.message?e.each(u.data.message,function(e,r){o.append("<li>"+r+"</li>")}):o.append("<li>"+u.data.message+"</li>"))}catch(l){o.append("<li>"+l.message+"</li>")}var f=JSON.parse(t.responseText).data.success_message_positon;s.show_message(o,d,i,f),"1"===f?e(window).scrollTop(i.find(".ur-button-container").offset().top):e(window).scrollTop(i.closest(".ur-frontend-form").offset().top),e(document).trigger("user_registration_frontend_after_ajax_complete",[t.responseText,d,i]),i.find(".ur-submit-button").prop("disabled",!1)}}})}})})},edit_profile_event:function(){e("form.user-registration-EditProfileForm").on("submit",function(r){var t=e(this);e.extend(e.validator.messages,{required:user_registration_params.message_required_fields,url:user_registration_params.message_url_fields,email:user_registration_params.message_email_fields,number:user_registration_params.message_number_fields});var a=t.find(".ur-smart-phone-field");if("true"===a.attr("aria-invalid")){(n=a.closest("p.form-row")).find("#"+a.data("id")+"-error").remove();var i='<label id="'+a.data("id")+'-error" class="user-registration-error" for="'+a.data("id")+'">'+user_registration_params.message_validate_phone_number+"</label>";return n.append(i),n.find("#"+a.data("id")).attr("aria-invalid",!0),!0}if(1===t.find(".uraf-profile-picture-upload").find(".user-registration-error").length){var n,o=t.find(".uraf-profile-picture-upload").find(".uraf-profile-picture-input");(n=t.find(".uraf-profile-picture-upload")).find("#"+o.attr("name")+"-error").remove(),n.find(".uraf-profile-picture-file-error").remove();var d='<label id="'+o.attr("name")+'-error" class="user-registration-error" for="'+o.attr("name")+'">'+user_registration_params.message_required_fields+"</label>";n.find("button.wp_uraf_profile_picture_upload").after(d)}if(t.valid()){r.preventDefault(),t.find(".user-registration-submit-Button").prop("disabled",!0);var u=t.find(".urfu-file-input");s.missing_attachment_handler(u);var f;try{f=s.get_form_data();var l=e("#profile_pic_url").val();f.push({value:l,field_name:"user_registration_profile_pic_url"}),f=JSON.stringify(f)}catch(p){f=""}var c={action:"user_registration_update_profile_details",security:user_registration_params.user_registration_profile_details_save,form_data:f};t.find(".user-registration-submit-Button").find("span").addClass("ur-front-spinner"),e.ajax({type:"POST",url:user_registration_params.ajax_url,dataType:"JSON",data:c,complete:function(r){t.find("span.ur-front-spinner").removeClass("ur-front-spinner"),t.closest(".user-registration").find(".user-registration-error").remove(),t.closest(".user-registration").find(".user-registration-message").remove();var a=e('<ul class=""/>'),i="error";try{var n=JSON.parse(r.responseText);"undefined"!=typeof n.success&&!0===n.success&&(i="message"),"object"==typeof n.data.message?e.each(n.data.message,function(e,r){a.append("<li>"+r+"</li>")}):a.append("<li>"+n.data.message+"</li>")}catch(o){a.append("<li>"+o.message+"</li>")}s.show_message(a,i,t,"0"),t.find(".user-registration-submit-Button").prop("disabled",!1),e(window).scrollTop(e(".user-registration").position())}})}})}};s.init(),n.init()})},e(function(){e(".ur-submit-button").on("click",function(){e(this).closest("form.register").ur_form_submission()}),e(".user-registration-submit-Button").on("click",function(){e(".ur-frontend-form").find("form.edit-profile").hasClass("user-registration-EditProfileForm")&&"yes"===user_registration_params.ajax_submission_on_edit_profile&&e("form.user-registration-EditProfileForm").ur_form_submission()});var t={};e(document.body).on("click","#load_flatpickr",function(){var r=e(this).data("id"),a=t[r];if(!a){var i=e(this).closest(".ur-field-item").find("#formated_date").val();if(0<e(".ur-frontend-form").length)var s=e(".ur-frontend-form #"+r).attr("type","text").val(i);else s=e(".woocommerce-MyAccount-content #"+r).attr("type","text").val(i);e(this).attr("data-date-format",s.data("date-format")),e(this).attr("data-mode",s.data("mode")),e(this).attr("data-min-date",s.data("min-date")),e(this).attr("data-max-date",s.data("max-date")),e(this).attr("data-default-date",i),a=e(this).flatpickr({disableMobile:!0,onChange:function(t,a,i){e("#"+r).val(a)}}),t[r]=a}a&&a.open()}),e(".ur-frontend-form").each(function(){e(this).find("form.register").on("focusout","#user_pass, #password_1",function(){$this=e(this);var t=e(this).attr("name"),a=e(this).data("id"),i=$this.closest("form").attr("data-enable-strength-password");if("yes"===i||"1"===i){var s=$this.closest("form"),n=s.attr("data-minimum-password-strength"),o=[];(o="function"==typeof wp.passwordStrength.userInputDisallowedList?wp.passwordStrength.userInputDisallowedList():wp.passwordStrength.userInputBlacklist()).push(s.find('input[data-id="user_email"]').val()),o.push(s.find('input[data-id="user_login"]').val());if(wp.passwordStrength.meter($this.val(),o)<n&&""!==$this.val()){s.find("#"+a+"_error").remove();var d='<label id="'+a+'_error" class="user-registration-error" for="'+t+'">'+r.password_strength_error+".</label>";s.find(".user-registration-password-hint").after(d)}}})})}),e(function(){request_recaptcha_token()}),e(function(){e(".user-registration-EditProfileForm.edit-profile .field-country").length>0&&e(".field-country").each(function(){var r=e(this).find(".ur-data-holder").data("option-value"),t=e(this).find(".ur-data-holder").data("option-html"),a=e(this).find("select");r&&t&&(0===a.find('option[value="'+r+'"]').length&&a.append("<option class='ur-remove' selected='selected' value='"+r+"'>"+t+"</option>"),e(this).on("click",function(){e(this).find(".ur-remove").remove()}))})})};r(),e(window).on("load",function(){r()})}(jQuery);var google_recaptcha_user_registration,onloadURCallback=function(){jQuery(".ur-frontend-form").find("form.register").each(function(e){$this=jQuery(this);var r=$this.closest(".ur-frontend-form").attr("id");0!==$this.find("#ur-recaptcha-node #node_recaptcha_register").length&&($this.find("#ur-recaptcha-node .g-recaptcha").attr("id","node_recaptcha_register_"+r),google_recaptcha_user_registration=grecaptcha.render("node_recaptcha_register_"+r,{sitekey:ur_google_recaptcha_code.site_key,theme:"light",style:"transform:scale(0.77);-webkit-transform:scale(0.77);transform-origin:0 0;-webkit-transform-origin:0 0;"}))}),jQuery(".ur-frontend-form").find("form.login").each(function(e){$this=jQuery(this);var r=$this.find("#ur-recaptcha-node");0!==r.length&&grecaptcha.render(r.find(".g-recaptcha").attr("id"),{sitekey:ur_google_recaptcha_code.site_key,theme:"light",style:"transform:scale(0.77);-webkit-transform:scale(0.77);transform-origin:0 0;-webkit-transform-origin:0 0;"})})};!function(e){e(document).on("click",".password_preview",function(r){r.preventDefault();var t=user_registration_params.ursL10n,a=e(this).hasClass("dashicons-hidden")?"show":"hide",i=e(this).closest(".user-registration-form-row").find('input[name="password"]');if(0===i.length&&(i=e(this).closest(".field-user_pass").find('input[name="user_pass"]')),0===i.length&&(i=e(this).closest(".field-user_confirm_password").find('input[name="user_confirm_password"]')),0===i.length&&(i=e(this).closest(".user-registration-form-row").find('input[name="password_current"]')),0===i.length&&(i=e(this).closest(".user-registration-form-row").find('input[name="password_1"]')),0===i.length&&(i=e(this).closest(".user-registration-form-row").find('input[name="password_2"]')),i.length>0)switch(a){case"show":i.attr("type","text"),e(this).removeClass("dashicons-hidden").addClass("dashicons-visibility"),e(this).attr("title",t.hide_password_title);break;case"hide":i.attr("type","password"),e(this).removeClass("dashicons-visibility").addClass("dashicons-hidden"),e(this).attr("title",t.show_password_title)}})}(jQuery);
|
includes/abstracts/abstract-ur-form-field.php
CHANGED
@@ -288,8 +288,6 @@ abstract class UR_Form_Field {
|
|
288 |
|
289 |
$form_data['username_character'] = isset( $data['advance_setting']->username_character ) ? $data['advance_setting']->username_character : "";
|
290 |
}
|
291 |
-
|
292 |
-
|
293 |
|
294 |
if( 'range' === $field_key ) {
|
295 |
$form_data['range_min'] = ( isset( $data['advance_setting']->range_min) && "" !== $data['advance_setting']->range_min) ? $data['advance_setting']->range_min : "0";
|
@@ -297,6 +295,7 @@ abstract class UR_Form_Field {
|
|
297 |
$form_data['range_step'] = isset( $data['advance_setting']->range_step) ? $data['advance_setting']->range_step : "";
|
298 |
$enable_prefix_postfix = isset( $data['advance_setting']->enable_prefix_postfix) ? $data['advance_setting']->enable_prefix_postfix : "false";
|
299 |
$enable_text_prefix_postfix = isset( $data['advance_setting']->enable_text_prefix_postfix) ? $data['advance_setting']->enable_text_prefix_postfix : "false";
|
|
|
300 |
|
301 |
if( "true" === $enable_prefix_postfix ) {
|
302 |
|
288 |
|
289 |
$form_data['username_character'] = isset( $data['advance_setting']->username_character ) ? $data['advance_setting']->username_character : "";
|
290 |
}
|
|
|
|
|
291 |
|
292 |
if( 'range' === $field_key ) {
|
293 |
$form_data['range_min'] = ( isset( $data['advance_setting']->range_min) && "" !== $data['advance_setting']->range_min) ? $data['advance_setting']->range_min : "0";
|
295 |
$form_data['range_step'] = isset( $data['advance_setting']->range_step) ? $data['advance_setting']->range_step : "";
|
296 |
$enable_prefix_postfix = isset( $data['advance_setting']->enable_prefix_postfix) ? $data['advance_setting']->enable_prefix_postfix : "false";
|
297 |
$enable_text_prefix_postfix = isset( $data['advance_setting']->enable_text_prefix_postfix) ? $data['advance_setting']->enable_text_prefix_postfix : "false";
|
298 |
+
$form_data['enable_payment_slider'] = isset( $data['advance_setting']->enable_payment_slider ) ? $data['advance_setting']->enable_payment_slider : "false";
|
299 |
|
300 |
if( "true" === $enable_prefix_postfix ) {
|
301 |
|
includes/admin/class-ur-admin-menus.php
CHANGED
@@ -567,7 +567,7 @@ if ( ! class_exists( 'UR_Admin_Menus', false ) ) :
|
|
567 |
* Add menu items.
|
568 |
*/
|
569 |
public function admin_menu() {
|
570 |
-
$registration_page = add_menu_page( __( 'User Registration'
|
571 |
|
572 |
add_action( 'load-' . $registration_page, array( $this, 'registration_page_init' ) );
|
573 |
}
|
@@ -680,7 +680,7 @@ if ( ! class_exists( 'UR_Admin_Menus', false ) ) :
|
|
680 |
$registration_table_list->prepare_items();
|
681 |
?>
|
682 |
<div class="wrap">
|
683 |
-
<h1 class="wp-heading-inline"><?php esc_html_e( 'User Registration'
|
684 |
<a href="<?php echo esc_url( admin_url( 'admin.php?page=add-new-registration' ) ); ?>" class="page-title-action"><?php esc_html_e( 'Add New', 'user-registration' ); ?></a>
|
685 |
<hr class="wp-header-end">
|
686 |
<form id="registration-list" method="post">
|
567 |
* Add menu items.
|
568 |
*/
|
569 |
public function admin_menu() {
|
570 |
+
$registration_page = add_menu_page( __( 'User Registration' ), __( 'User Registration' ), 'manage_user_registration', 'user-registration', array( $this, 'registration_page' ), $this->get_icon_svg(), '55.8' );
|
571 |
|
572 |
add_action( 'load-' . $registration_page, array( $this, 'registration_page_init' ) );
|
573 |
}
|
680 |
$registration_table_list->prepare_items();
|
681 |
?>
|
682 |
<div class="wrap">
|
683 |
+
<h1 class="wp-heading-inline"><?php esc_html_e( 'User Registration' ); ?></h1>
|
684 |
<a href="<?php echo esc_url( admin_url( 'admin.php?page=add-new-registration' ) ); ?>" class="page-title-action"><?php esc_html_e( 'Add New', 'user-registration' ); ?></a>
|
685 |
<hr class="wp-header-end">
|
686 |
<form id="registration-list" method="post">
|
includes/admin/functions-ur-admin.php
CHANGED
@@ -116,7 +116,7 @@ function ur_get_user_report( $form_id ) {
|
|
116 |
*/
|
117 |
function ur_get_screen_ids() {
|
118 |
|
119 |
-
$ur_screen_id = sanitize_title( __( 'User Registration'
|
120 |
$screen_ids = array(
|
121 |
'toplevel_page_' . $ur_screen_id,
|
122 |
$ur_screen_id . '_page_user-registration-dashboard',
|
@@ -129,7 +129,6 @@ function ur_get_screen_ids() {
|
|
129 |
$ur_screen_id . '_page_user-registration-email-templates',
|
130 |
'profile',
|
131 |
'user-edit',
|
132 |
-
|
133 |
);
|
134 |
|
135 |
return apply_filters( 'user_registration_screen_ids', $screen_ids );
|
116 |
*/
|
117 |
function ur_get_screen_ids() {
|
118 |
|
119 |
+
$ur_screen_id = sanitize_title( __( 'User Registration' ) );
|
120 |
$screen_ids = array(
|
121 |
'toplevel_page_' . $ur_screen_id,
|
122 |
$ur_screen_id . '_page_user-registration-dashboard',
|
129 |
$ur_screen_id . '_page_user-registration-email-templates',
|
130 |
'profile',
|
131 |
'user-edit',
|
|
|
132 |
);
|
133 |
|
134 |
return apply_filters( 'user_registration_screen_ids', $screen_ids );
|
includes/class-ur-ajax.php
CHANGED
@@ -246,7 +246,7 @@ class UR_AJAX {
|
|
246 |
do_action( 'user_registration_validate_email_whitelist', $single_field[ $key ], '' );
|
247 |
|
248 |
// Check if email already exists before updating user details.
|
249 |
-
if ( email_exists( $single_field[ $key ] )
|
250 |
wp_send_json_error(
|
251 |
array(
|
252 |
'message' => __( 'Email already exists.', 'user-registration' ),
|
@@ -345,6 +345,27 @@ class UR_AJAX {
|
|
345 |
|
346 |
$upload = isset( $_FILES['file'] ) ? $_FILES['file'] : array();
|
347 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
348 |
$post_overrides = array(
|
349 |
'post_status' => 'publish',
|
350 |
'post_title' => $upload['name'],
|
@@ -412,7 +433,7 @@ class UR_AJAX {
|
|
412 |
/**
|
413 |
* Login from Using Ajax
|
414 |
*/
|
415 |
-
public function ajax_login_submit(){
|
416 |
// Custom error messages.
|
417 |
$messages = array(
|
418 |
'username_is_required' => get_option( 'user_registration_message_username_required', __( 'Username is required.', 'user-registration' ) ),
|
@@ -500,6 +521,7 @@ class UR_AJAX {
|
|
500 |
$redirect = get_home_url();
|
501 |
}
|
502 |
}
|
|
|
503 |
wp_send_json_success( array( 'message' =>$redirect ));
|
504 |
}
|
505 |
wp_send_json( $user );
|
246 |
do_action( 'user_registration_validate_email_whitelist', $single_field[ $key ], '' );
|
247 |
|
248 |
// Check if email already exists before updating user details.
|
249 |
+
if ( email_exists( $single_field[ $key ] ) !== $user_id ) {
|
250 |
wp_send_json_error(
|
251 |
array(
|
252 |
'message' => __( 'Email already exists.', 'user-registration' ),
|
345 |
|
346 |
$upload = isset( $_FILES['file'] ) ? $_FILES['file'] : array();
|
347 |
|
348 |
+
// valid extension for image
|
349 |
+
$valid_extensions = $_REQUEST['valid_extension'];
|
350 |
+
$valid_extension_type = explode(',',$valid_extensions);
|
351 |
+
$valid_ext=array();
|
352 |
+
|
353 |
+
foreach($valid_extension_type as $key=>$value){
|
354 |
+
$image_extension = explode('/',$value);
|
355 |
+
$valid_ext[$key]= $image_extension[1];
|
356 |
+
}
|
357 |
+
|
358 |
+
$src_file_name = isset($upload['name'] ) ? $upload['name'] : '';
|
359 |
+
$file_extension = strtolower(pathinfo($src_file_name, PATHINFO_EXTENSION));
|
360 |
+
|
361 |
+
//Validates if the uploaded file has the acceptable extension.
|
362 |
+
if ( ! in_array( $file_extension, $valid_ext ) ) {
|
363 |
+
wp_send_json_error(
|
364 |
+
array(
|
365 |
+
'message' => __( 'Invalid file type, please contact with site administrator.', 'user-registration-advanced-fields' ),
|
366 |
+
)
|
367 |
+
);
|
368 |
+
}
|
369 |
$post_overrides = array(
|
370 |
'post_status' => 'publish',
|
371 |
'post_title' => $upload['name'],
|
433 |
/**
|
434 |
* Login from Using Ajax
|
435 |
*/
|
436 |
+
public static function ajax_login_submit(){
|
437 |
// Custom error messages.
|
438 |
$messages = array(
|
439 |
'username_is_required' => get_option( 'user_registration_message_username_required', __( 'Username is required.', 'user-registration' ) ),
|
521 |
$redirect = get_home_url();
|
522 |
}
|
523 |
}
|
524 |
+
$redirect = apply_filters( 'user_registration_login_redirect', $redirect, $user );
|
525 |
wp_send_json_success( array( 'message' =>$redirect ));
|
526 |
}
|
527 |
wp_send_json( $user );
|
includes/class-ur-form-handler.php
CHANGED
@@ -52,6 +52,7 @@ class UR_Form_Handler {
|
|
52 |
*/
|
53 |
public static function save_profile_details() {
|
54 |
|
|
|
55 |
if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) ) {
|
56 |
return;
|
57 |
}
|
@@ -181,7 +182,7 @@ class UR_Form_Handler {
|
|
181 |
do_action( 'user_registration_validate_email_whitelist', $_POST[ $key ], '' );
|
182 |
|
183 |
// Check if email already exists before updating user details.
|
184 |
-
if ( email_exists( $_POST[ $key ] )
|
185 |
ur_add_notice( __( 'Email already exists', 'user-registration' ), 'error' );
|
186 |
}
|
187 |
}
|
@@ -244,7 +245,7 @@ class UR_Form_Handler {
|
|
244 |
|
245 |
do_action( 'user_registration_save_profile_details', $user_id, $form_id );
|
246 |
|
247 |
-
wp_safe_redirect(
|
248 |
exit;
|
249 |
}
|
250 |
}
|
52 |
*/
|
53 |
public static function save_profile_details() {
|
54 |
|
55 |
+
global $wp;
|
56 |
if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) ) {
|
57 |
return;
|
58 |
}
|
182 |
do_action( 'user_registration_validate_email_whitelist', $_POST[ $key ], '' );
|
183 |
|
184 |
// Check if email already exists before updating user details.
|
185 |
+
if ( email_exists( $_POST[ $key ] ) !== $user_id ) {
|
186 |
ur_add_notice( __( 'Email already exists', 'user-registration' ), 'error' );
|
187 |
}
|
188 |
}
|
245 |
|
246 |
do_action( 'user_registration_save_profile_details', $user_id, $form_id );
|
247 |
|
248 |
+
wp_safe_redirect(home_url( add_query_arg( array(), $wp->request ) ));
|
249 |
exit;
|
250 |
}
|
251 |
}
|
includes/class-ur-shortcodes.php
CHANGED
@@ -28,6 +28,7 @@ class UR_Shortcodes {
|
|
28 |
'user_registration_form' => __CLASS__ . '::form', // change it to user_registration_form ;)
|
29 |
'user_registration_my_account' => __CLASS__ . '::my_account',
|
30 |
'user_registration_login' => __class__ . '::login',
|
|
|
31 |
);
|
32 |
add_filter( 'pre_do_shortcode_tag', array( UR_Shortcode_My_Account::class, 'pre_do_shortcode_tag' ), 10, 4 );
|
33 |
|
@@ -97,7 +98,7 @@ class UR_Shortcodes {
|
|
97 |
public static function login( $atts ) {
|
98 |
do_action( 'user_registration_my_account_enqueue_scripts', array(), 0 );
|
99 |
wp_enqueue_script( 'ur-login' );
|
100 |
-
|
101 |
return self::shortcode_wrapper(
|
102 |
array( 'UR_Shortcode_Login', 'output' ),
|
103 |
$atts,
|
@@ -112,6 +113,49 @@ class UR_Shortcodes {
|
|
112 |
);
|
113 |
}
|
114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
/**
|
116 |
* User Registration form shortcode.
|
117 |
*
|
@@ -220,6 +264,7 @@ class UR_Shortcodes {
|
|
220 |
'recaptcha_node' => $recaptcha_node,
|
221 |
'parts' => self::$parts,
|
222 |
'row_ids' => $form_row_ids_array,
|
|
|
223 |
)
|
224 |
);
|
225 |
}
|
28 |
'user_registration_form' => __CLASS__ . '::form', // change it to user_registration_form ;)
|
29 |
'user_registration_my_account' => __CLASS__ . '::my_account',
|
30 |
'user_registration_login' => __class__ . '::login',
|
31 |
+
'user_registration_edit_profile' => __class__ . '::edit_profile',
|
32 |
);
|
33 |
add_filter( 'pre_do_shortcode_tag', array( UR_Shortcode_My_Account::class, 'pre_do_shortcode_tag' ), 10, 4 );
|
34 |
|
98 |
public static function login( $atts ) {
|
99 |
do_action( 'user_registration_my_account_enqueue_scripts', array(), 0 );
|
100 |
wp_enqueue_script( 'ur-login' );
|
101 |
+
|
102 |
return self::shortcode_wrapper(
|
103 |
array( 'UR_Shortcode_Login', 'output' ),
|
104 |
$atts,
|
113 |
);
|
114 |
}
|
115 |
|
116 |
+
/**
|
117 |
+
* User Registration Edit profile form shortcode.
|
118 |
+
*
|
119 |
+
* @param mixed $atts
|
120 |
+
*/
|
121 |
+
public static function edit_profile( $atts ) {
|
122 |
+
return UR_Shortcodes::shortcode_wrapper( array( __CLASS__, 'render_edit_profile' ), $atts );
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Output for Edit-profile form .
|
127 |
+
*
|
128 |
+
*/
|
129 |
+
private static function render_edit_profile() {
|
130 |
+
$user_id = get_current_user_id();
|
131 |
+
$form_id = get_user_meta( $user_id, 'ur_form_id', true );
|
132 |
+
do_action( 'user_registration_my_account_enqueue_scripts', array(), $form_id );
|
133 |
+
$has_date = ur_has_date_field( $form_id );
|
134 |
+
|
135 |
+
if ( true === $has_date ) {
|
136 |
+
wp_enqueue_style( 'flatpickr' );
|
137 |
+
wp_enqueue_script( 'flatpickr' );
|
138 |
+
}
|
139 |
+
if ( ! is_user_logged_in() ) {
|
140 |
+
$myaccount_page = get_post( get_option( 'user_registration_myaccount_page_id' ) );
|
141 |
+
$matched = 0;
|
142 |
+
|
143 |
+
if ( ! empty( $myaccount_page ) ) {
|
144 |
+
$matched = preg_match( '/\[user_registration_my_account(\s\S+){0,3}\]|\[user_registration_login(\s\S+){0,3}\]/', $myaccount_page->post_content );
|
145 |
+
if(1 > absint( $matched )) {
|
146 |
+
$matched = preg_match( '/\[woocommerce_my_account(\s\S+){0,3}\]/', $myaccount_page->post_content );
|
147 |
+
}
|
148 |
+
if ( 1 === $matched ) {
|
149 |
+
$page_id = $myaccount_page->ID;
|
150 |
+
}
|
151 |
+
}
|
152 |
+
echo apply_filters( 'user_registration_logged_in_message', sprintf( __( 'Please Login to edit profile. <a href="%s">Login Here?</a>', 'user-registration' ), isset($page_id) ? get_permalink($page_id) : wp_login_url() ) );
|
153 |
+
} else {
|
154 |
+
include_once 'shortcodes/class-ur-shortcode-my-account.php';
|
155 |
+
UR_Shortcode_My_Account::edit_profile();
|
156 |
+
}
|
157 |
+
}
|
158 |
+
|
159 |
/**
|
160 |
* User Registration form shortcode.
|
161 |
*
|
264 |
'recaptcha_node' => $recaptcha_node,
|
265 |
'parts' => self::$parts,
|
266 |
'row_ids' => $form_row_ids_array,
|
267 |
+
'recaptcha_enabled' => $recaptcha_enabled
|
268 |
)
|
269 |
);
|
270 |
}
|
includes/functions-ur-core.php
CHANGED
@@ -505,7 +505,7 @@ function ur_exclude_profile_details_fields() {
|
|
505 |
);
|
506 |
|
507 |
// Check if the my account page contains [user_registration_my_account] shortcode.
|
508 |
-
if ( ur_post_content_has_shortcode( 'user_registration_my_account' ) ) {
|
509 |
// Push profile_picture field to fields_to_exclude array.
|
510 |
array_push( $fields_to_exclude, 'profile_picture' );
|
511 |
}
|
505 |
);
|
506 |
|
507 |
// Check if the my account page contains [user_registration_my_account] shortcode.
|
508 |
+
if ( ur_post_content_has_shortcode( 'user_registration_my_account' ) || ur_post_content_has_shortcode( 'user_registration_edit_profile' ) ) {
|
509 |
// Push profile_picture field to fields_to_exclude array.
|
510 |
array_push( $fields_to_exclude, 'profile_picture' );
|
511 |
}
|
includes/functions-ur-page.php
CHANGED
@@ -69,6 +69,11 @@ function ur_get_page_id( $page ) {
|
|
69 |
$page = apply_filters( 'user_registration_get_' . $page . '_page_id', get_option( 'user_registration_' . $page . '_page_id' ) );
|
70 |
}
|
71 |
|
|
|
|
|
|
|
|
|
|
|
72 |
return $page ? absint( $page ) : - 1;
|
73 |
}
|
74 |
|
69 |
$page = apply_filters( 'user_registration_get_' . $page . '_page_id', get_option( 'user_registration_' . $page . '_page_id' ) );
|
70 |
}
|
71 |
|
72 |
+
if( $page > 0 && function_exists( 'pll_current_language' ) && !empty( pll_current_language() )){
|
73 |
+
$translations = pll_get_post_translations($page);
|
74 |
+
$page = $translations[pll_current_language()];
|
75 |
+
}
|
76 |
+
|
77 |
return $page ? absint( $page ) : - 1;
|
78 |
}
|
79 |
|
includes/functions-ur-template.php
CHANGED
@@ -197,7 +197,7 @@ if ( ! function_exists( 'user_registration_form_field' ) ) {
|
|
197 |
$args['required'] = $required = '';
|
198 |
}
|
199 |
|
200 |
-
if ( is_null( $value ) ) {
|
201 |
$value = $args['default'];
|
202 |
}
|
203 |
|
197 |
$args['required'] = $required = '';
|
198 |
}
|
199 |
|
200 |
+
if ( is_null( $value ) || empty($value)) {
|
201 |
$value = $args['default'];
|
202 |
}
|
203 |
|
includes/shortcodes/class-ur-shortcode-my-account.php
CHANGED
@@ -206,6 +206,10 @@ class UR_Shortcode_My_Account {
|
|
206 |
$profile[ $key ]['value'] = apply_filters( 'user_registration_my_account_edit_profile_field_value', $user_data->display_name, $key );
|
207 |
}
|
208 |
}
|
|
|
|
|
|
|
|
|
209 |
|
210 |
ur_get_template(
|
211 |
'myaccount/form-edit-profile.php',
|
206 |
$profile[ $key ]['value'] = apply_filters( 'user_registration_my_account_edit_profile_field_value', $user_data->display_name, $key );
|
207 |
}
|
208 |
}
|
209 |
+
|
210 |
+
include_once UR_ABSPATH . 'includes/functions-ur-notice.php';
|
211 |
+
$notices = ur_get_notices();
|
212 |
+
ur_print_notices();
|
213 |
|
214 |
ur_get_template(
|
215 |
'myaccount/form-edit-profile.php',
|
languages/user-registration.pot
CHANGED
@@ -2,23 +2,20 @@
|
|
2 |
# This file is distributed under the same license as the User Registration plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: User Registration 1.9.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/user-registration\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"POT-Creation-Date: 2021-
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.4.0\n"
|
15 |
"X-Domain: user-registration\n"
|
16 |
|
17 |
#. Plugin Name of the plugin
|
18 |
-
#: includes/admin/class-ur-admin-menus.php:570
|
19 |
-
#: includes/admin/class-ur-admin-menus.php:683
|
20 |
#: includes/admin/class-ur-admin.php:123
|
21 |
-
#: includes/admin/functions-ur-admin.php:119
|
22 |
#: includes/class-ur-form-block.php:48
|
23 |
#: includes/class-ur-privacy.php:31
|
24 |
msgid "User Registration"
|
@@ -40,12 +37,12 @@ msgstr ""
|
|
40 |
msgid "https://wpeverest.com"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: includes/abstracts/abstract-ur-form-field.php:
|
44 |
-
#: includes/admin/functions-ur-admin.php:
|
45 |
msgid "General Settings"
|
46 |
msgstr ""
|
47 |
|
48 |
-
#: includes/abstracts/abstract-ur-form-field.php:
|
49 |
msgid "Advance Settings"
|
50 |
msgstr ""
|
51 |
|
@@ -706,12 +703,12 @@ msgstr ""
|
|
706 |
msgid "loading..."
|
707 |
msgstr ""
|
708 |
|
709 |
-
#: includes/admin/functions-ur-admin.php:
|
710 |
-
#: includes/admin/functions-ur-admin.php:
|
711 |
msgid "User Extra Information"
|
712 |
msgstr ""
|
713 |
|
714 |
-
#: includes/admin/functions-ur-admin.php:
|
715 |
msgid "WordPress User Extra Information"
|
716 |
msgstr ""
|
717 |
|
@@ -1060,8 +1057,8 @@ msgstr ""
|
|
1060 |
|
1061 |
#: includes/admin/settings/class-ur-settings-general.php:362
|
1062 |
#: includes/class-ur-ajax.php:108
|
1063 |
-
#: includes/class-ur-ajax.php:
|
1064 |
-
#: includes/class-ur-form-handler.php:
|
1065 |
#: includes/class-ur-frontend-scripts.php:377
|
1066 |
msgid "Captcha code error, please try again."
|
1067 |
msgstr ""
|
@@ -1948,33 +1945,33 @@ msgstr ""
|
|
1948 |
#: includes/class-ur-ajax.php:117
|
1949 |
#: includes/class-ur-ajax.php:173
|
1950 |
#: includes/class-ur-ajax.php:330
|
1951 |
-
#: includes/class-ur-ajax.php:
|
1952 |
msgid "Nonce error, please reload."
|
1953 |
msgstr ""
|
1954 |
|
1955 |
#: includes/class-ur-ajax.php:101
|
1956 |
-
#: includes/class-ur-ajax.php:
|
1957 |
-
#: includes/class-ur-form-handler.php:
|
1958 |
msgid "Error on google reCaptcha. Contact your site administrator."
|
1959 |
msgstr ""
|
1960 |
|
1961 |
#: includes/class-ur-ajax.php:129
|
1962 |
-
#: includes/class-ur-shortcodes.php:
|
1963 |
msgid "Only administrators can add new users."
|
1964 |
msgstr ""
|
1965 |
|
1966 |
#: includes/class-ur-ajax.php:147
|
1967 |
-
#: includes/class-ur-shortcodes.php:
|
1968 |
msgid "You are currently logged in as %1$1s. %2$2s"
|
1969 |
msgstr ""
|
1970 |
|
1971 |
#: includes/class-ur-ajax.php:147
|
1972 |
-
#: includes/class-ur-shortcodes.php:
|
1973 |
msgid "Log out of this account."
|
1974 |
msgstr ""
|
1975 |
|
1976 |
#: includes/class-ur-ajax.php:147
|
1977 |
-
#: includes/class-ur-shortcodes.php:
|
1978 |
#: includes/functions-ur-account.php:111
|
1979 |
msgid "Logout"
|
1980 |
msgstr ""
|
@@ -1985,49 +1982,49 @@ msgid "Email already exists."
|
|
1985 |
msgstr ""
|
1986 |
|
1987 |
#: includes/class-ur-ajax.php:301
|
1988 |
-
#: includes/class-ur-form-handler.php:
|
1989 |
msgid "User profile updated successfully."
|
1990 |
msgstr ""
|
1991 |
|
1992 |
-
#: includes/class-ur-ajax.php:
|
1993 |
-
#: includes/class-ur-form-handler.php:
|
1994 |
msgid "File size exceed, please check your file size."
|
1995 |
msgstr ""
|
1996 |
|
1997 |
-
#: includes/class-ur-ajax.php:
|
1998 |
-
#: includes/class-ur-form-handler.php:
|
1999 |
msgid "Something went wrong while uploading, please contact your site administrator."
|
2000 |
msgstr ""
|
2001 |
|
2002 |
-
#: includes/class-ur-ajax.php:
|
2003 |
-
#: includes/class-ur-form-handler.php:
|
2004 |
msgid "Username is required."
|
2005 |
msgstr ""
|
2006 |
|
2007 |
-
#: includes/class-ur-ajax.php:
|
2008 |
-
#: includes/class-ur-form-handler.php:
|
2009 |
msgid "A user could not be found with this email address."
|
2010 |
msgstr ""
|
2011 |
|
2012 |
-
#: includes/class-ur-ajax.php:
|
2013 |
-
#: includes/class-ur-ajax.php:
|
2014 |
-
#: includes/class-ur-ajax.php:
|
2015 |
-
#: includes/class-ur-form-handler.php:
|
2016 |
-
#: includes/class-ur-form-handler.php:
|
2017 |
-
#: includes/class-ur-form-handler.php:
|
2018 |
msgid "ERROR"
|
2019 |
msgstr ""
|
2020 |
|
2021 |
-
#: includes/class-ur-ajax.php:
|
2022 |
-
#: includes/class-ur-ajax.php:
|
2023 |
msgid "post data not set"
|
2024 |
msgstr ""
|
2025 |
|
2026 |
-
#: includes/class-ur-ajax.php:
|
2027 |
msgid "Could not save form. Invalid field name. Please check all field name"
|
2028 |
msgstr ""
|
2029 |
|
2030 |
-
#: includes/class-ur-ajax.php:
|
2031 |
msgid "Could not save form, "
|
2032 |
msgstr ""
|
2033 |
|
@@ -2083,11 +2080,11 @@ msgid "User does not exist!"
|
|
2083 |
msgstr ""
|
2084 |
|
2085 |
#: includes/class-ur-email-confirmation.php:414
|
2086 |
-
#: includes/class-ur-form-handler.php:
|
2087 |
-
#: includes/class-ur-form-handler.php:
|
2088 |
-
#: includes/class-ur-form-handler.php:
|
2089 |
-
#: includes/class-ur-form-handler.php:
|
2090 |
-
#: includes/class-ur-form-handler.php:
|
2091 |
#: includes/class-ur-user-approval.php:194
|
2092 |
#: includes/class-ur-user-approval.php:199
|
2093 |
#: includes/class-ur-user-approval.php:214
|
@@ -2132,72 +2129,72 @@ msgstr ""
|
|
2132 |
msgid "Form"
|
2133 |
msgstr ""
|
2134 |
|
2135 |
-
#: includes/class-ur-form-handler.php:
|
2136 |
#: includes/frontend/class-ur-frontend-form-handler.php:467
|
2137 |
msgid "%s is a required field."
|
2138 |
msgstr ""
|
2139 |
|
2140 |
-
#: includes/class-ur-form-handler.php:
|
2141 |
msgid "Email already exists"
|
2142 |
msgstr ""
|
2143 |
|
2144 |
-
#: includes/class-ur-form-handler.php:
|
2145 |
msgid "%s is not a valid email address."
|
2146 |
msgstr ""
|
2147 |
|
2148 |
-
#: includes/class-ur-form-handler.php:
|
2149 |
msgid "Please fill out all password fields."
|
2150 |
msgstr ""
|
2151 |
|
2152 |
-
#: includes/class-ur-form-handler.php:
|
2153 |
msgid "Please enter your current password."
|
2154 |
msgstr ""
|
2155 |
|
2156 |
-
#: includes/class-ur-form-handler.php:
|
2157 |
msgid "Please enter your new password."
|
2158 |
msgstr ""
|
2159 |
|
2160 |
-
#: includes/class-ur-form-handler.php:
|
2161 |
msgid "Please re-enter your password."
|
2162 |
msgstr ""
|
2163 |
|
2164 |
-
#: includes/class-ur-form-handler.php:
|
2165 |
msgid "New passwords do not match."
|
2166 |
msgstr ""
|
2167 |
|
2168 |
-
#: includes/class-ur-form-handler.php:
|
2169 |
msgid "Your current password is incorrect."
|
2170 |
msgstr ""
|
2171 |
|
2172 |
-
#: includes/class-ur-form-handler.php:
|
2173 |
msgid "New password must not be same as old password"
|
2174 |
msgstr ""
|
2175 |
|
2176 |
-
#: includes/class-ur-form-handler.php:
|
2177 |
msgid "Password changed successfully."
|
2178 |
msgstr ""
|
2179 |
|
2180 |
-
#: includes/class-ur-form-handler.php:
|
2181 |
msgid "Please enter your password."
|
2182 |
msgstr ""
|
2183 |
|
2184 |
-
#: includes/class-ur-form-handler.php:
|
2185 |
msgid "Passwords do not match."
|
2186 |
msgstr ""
|
2187 |
|
2188 |
-
#: includes/class-ur-form-handler.php:
|
2189 |
msgid "New password must not be same as old password."
|
2190 |
msgstr ""
|
2191 |
|
2192 |
-
#: includes/class-ur-form-handler.php:
|
2193 |
msgid "Invalid Key"
|
2194 |
msgstr ""
|
2195 |
|
2196 |
-
#: includes/class-ur-form-handler.php:
|
2197 |
msgid "Thanks for confirming your export request."
|
2198 |
msgstr ""
|
2199 |
|
2200 |
-
#: includes/class-ur-form-handler.php:
|
2201 |
msgid "Thanks for confirming your erasure request."
|
2202 |
msgstr ""
|
2203 |
|
@@ -2574,6 +2571,10 @@ msgstr ""
|
|
2574 |
msgid "Profile Details"
|
2575 |
msgstr ""
|
2576 |
|
|
|
|
|
|
|
|
|
2577 |
#: includes/class-ur-user-approval.php:194
|
2578 |
msgid "Your account is still pending approval."
|
2579 |
msgstr ""
|
@@ -4254,24 +4255,24 @@ msgstr ""
|
|
4254 |
msgid "Are you sure you want to log out? <a href=\"%s\">Confirm and log out</a>"
|
4255 |
msgstr ""
|
4256 |
|
4257 |
-
#: includes/shortcodes/class-ur-shortcode-my-account.php:
|
4258 |
msgid "No profile details found."
|
4259 |
msgstr ""
|
4260 |
|
4261 |
-
#: includes/shortcodes/class-ur-shortcode-my-account.php:
|
4262 |
msgid "Enter a username or email address."
|
4263 |
msgstr ""
|
4264 |
|
4265 |
-
#: includes/shortcodes/class-ur-shortcode-my-account.php:
|
4266 |
-
#: includes/shortcodes/class-ur-shortcode-my-account.php:
|
4267 |
msgid "Invalid username or email."
|
4268 |
msgstr ""
|
4269 |
|
4270 |
-
#: includes/shortcodes/class-ur-shortcode-my-account.php:
|
4271 |
msgid "Password reset is not allowed for this user"
|
4272 |
msgstr ""
|
4273 |
|
4274 |
-
#: includes/shortcodes/class-ur-shortcode-my-account.php:
|
4275 |
msgid "The email could not be sent. Contact your site administrator. "
|
4276 |
msgstr ""
|
4277 |
|
@@ -4299,7 +4300,7 @@ msgstr ""
|
|
4299 |
msgid "Total"
|
4300 |
msgstr ""
|
4301 |
|
4302 |
-
#: templates/form-registration.php:
|
4303 |
msgid "Form not found, form id :"
|
4304 |
msgstr ""
|
4305 |
|
@@ -4337,8 +4338,8 @@ msgid "Confirm new password"
|
|
4337 |
msgstr ""
|
4338 |
|
4339 |
#: templates/myaccount/form-edit-password.php:82
|
4340 |
-
#: templates/myaccount/form-edit-profile.php:
|
4341 |
-
#: templates/myaccount/form-edit-profile.php:
|
4342 |
msgid "Save changes"
|
4343 |
msgstr ""
|
4344 |
|
@@ -4346,23 +4347,23 @@ msgstr ""
|
|
4346 |
msgid "Profile Detail"
|
4347 |
msgstr ""
|
4348 |
|
4349 |
-
#: templates/myaccount/form-edit-profile.php:
|
4350 |
msgid "Max size: "
|
4351 |
msgstr ""
|
4352 |
|
4353 |
-
#: templates/myaccount/form-edit-profile.php:
|
4354 |
msgid "Upload your new profile image."
|
4355 |
msgstr ""
|
4356 |
|
4357 |
-
#: templates/myaccount/form-edit-profile.php:
|
4358 |
msgid "Remove"
|
4359 |
msgstr ""
|
4360 |
|
4361 |
-
#: templates/myaccount/form-edit-profile.php:
|
4362 |
msgid "You can change your profile picture on"
|
4363 |
msgstr ""
|
4364 |
|
4365 |
-
#: templates/myaccount/form-edit-profile.php:
|
4366 |
msgid "Gravatar"
|
4367 |
msgstr ""
|
4368 |
|
2 |
# This file is distributed under the same license as the User Registration plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: User Registration 1.9.8\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/user-registration\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2021-05-31T06:35:19+00:00\n"
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.4.0\n"
|
15 |
"X-Domain: user-registration\n"
|
16 |
|
17 |
#. Plugin Name of the plugin
|
|
|
|
|
18 |
#: includes/admin/class-ur-admin.php:123
|
|
|
19 |
#: includes/class-ur-form-block.php:48
|
20 |
#: includes/class-ur-privacy.php:31
|
21 |
msgid "User Registration"
|
37 |
msgid "https://wpeverest.com"
|
38 |
msgstr ""
|
39 |
|
40 |
+
#: includes/abstracts/abstract-ur-form-field.php:554
|
41 |
+
#: includes/admin/functions-ur-admin.php:426
|
42 |
msgid "General Settings"
|
43 |
msgstr ""
|
44 |
|
45 |
+
#: includes/abstracts/abstract-ur-form-field.php:564
|
46 |
msgid "Advance Settings"
|
47 |
msgstr ""
|
48 |
|
703 |
msgid "loading..."
|
704 |
msgstr ""
|
705 |
|
706 |
+
#: includes/admin/functions-ur-admin.php:150
|
707 |
+
#: includes/admin/functions-ur-admin.php:213
|
708 |
msgid "User Extra Information"
|
709 |
msgstr ""
|
710 |
|
711 |
+
#: includes/admin/functions-ur-admin.php:233
|
712 |
msgid "WordPress User Extra Information"
|
713 |
msgstr ""
|
714 |
|
1057 |
|
1058 |
#: includes/admin/settings/class-ur-settings-general.php:362
|
1059 |
#: includes/class-ur-ajax.php:108
|
1060 |
+
#: includes/class-ur-ajax.php:487
|
1061 |
+
#: includes/class-ur-form-handler.php:383
|
1062 |
#: includes/class-ur-frontend-scripts.php:377
|
1063 |
msgid "Captcha code error, please try again."
|
1064 |
msgstr ""
|
1945 |
#: includes/class-ur-ajax.php:117
|
1946 |
#: includes/class-ur-ajax.php:173
|
1947 |
#: includes/class-ur-ajax.php:330
|
1948 |
+
#: includes/class-ur-ajax.php:457
|
1949 |
msgid "Nonce error, please reload."
|
1950 |
msgstr ""
|
1951 |
|
1952 |
#: includes/class-ur-ajax.php:101
|
1953 |
+
#: includes/class-ur-ajax.php:480
|
1954 |
+
#: includes/class-ur-form-handler.php:380
|
1955 |
msgid "Error on google reCaptcha. Contact your site administrator."
|
1956 |
msgstr ""
|
1957 |
|
1958 |
#: includes/class-ur-ajax.php:129
|
1959 |
+
#: includes/class-ur-shortcodes.php:174
|
1960 |
msgid "Only administrators can add new users."
|
1961 |
msgstr ""
|
1962 |
|
1963 |
#: includes/class-ur-ajax.php:147
|
1964 |
+
#: includes/class-ur-shortcodes.php:188
|
1965 |
msgid "You are currently logged in as %1$1s. %2$2s"
|
1966 |
msgstr ""
|
1967 |
|
1968 |
#: includes/class-ur-ajax.php:147
|
1969 |
+
#: includes/class-ur-shortcodes.php:188
|
1970 |
msgid "Log out of this account."
|
1971 |
msgstr ""
|
1972 |
|
1973 |
#: includes/class-ur-ajax.php:147
|
1974 |
+
#: includes/class-ur-shortcodes.php:188
|
1975 |
#: includes/functions-ur-account.php:111
|
1976 |
msgid "Logout"
|
1977 |
msgstr ""
|
1982 |
msgstr ""
|
1983 |
|
1984 |
#: includes/class-ur-ajax.php:301
|
1985 |
+
#: includes/class-ur-form-handler.php:244
|
1986 |
msgid "User profile updated successfully."
|
1987 |
msgstr ""
|
1988 |
|
1989 |
+
#: includes/class-ur-ajax.php:402
|
1990 |
+
#: includes/class-ur-form-handler.php:105
|
1991 |
msgid "File size exceed, please check your file size."
|
1992 |
msgstr ""
|
1993 |
|
1994 |
+
#: includes/class-ur-ajax.php:409
|
1995 |
+
#: includes/class-ur-form-handler.php:108
|
1996 |
msgid "Something went wrong while uploading, please contact your site administrator."
|
1997 |
msgstr ""
|
1998 |
|
1999 |
+
#: includes/class-ur-ajax.php:439
|
2000 |
+
#: includes/class-ur-form-handler.php:346
|
2001 |
msgid "Username is required."
|
2002 |
msgstr ""
|
2003 |
|
2004 |
+
#: includes/class-ur-ajax.php:442
|
2005 |
+
#: includes/class-ur-form-handler.php:349
|
2006 |
msgid "A user could not be found with this email address."
|
2007 |
msgstr ""
|
2008 |
|
2009 |
+
#: includes/class-ur-ajax.php:499
|
2010 |
+
#: includes/class-ur-ajax.php:505
|
2011 |
+
#: includes/class-ur-ajax.php:508
|
2012 |
+
#: includes/class-ur-form-handler.php:422
|
2013 |
+
#: includes/class-ur-form-handler.php:428
|
2014 |
+
#: includes/class-ur-form-handler.php:431
|
2015 |
msgid "ERROR"
|
2016 |
msgstr ""
|
2017 |
|
2018 |
+
#: includes/class-ur-ajax.php:596
|
2019 |
+
#: includes/class-ur-ajax.php:602
|
2020 |
msgid "post data not set"
|
2021 |
msgstr ""
|
2022 |
|
2023 |
+
#: includes/class-ur-ajax.php:619
|
2024 |
msgid "Could not save form. Invalid field name. Please check all field name"
|
2025 |
msgstr ""
|
2026 |
|
2027 |
+
#: includes/class-ur-ajax.php:630
|
2028 |
msgid "Could not save form, "
|
2029 |
msgstr ""
|
2030 |
|
2080 |
msgstr ""
|
2081 |
|
2082 |
#: includes/class-ur-email-confirmation.php:414
|
2083 |
+
#: includes/class-ur-form-handler.php:380
|
2084 |
+
#: includes/class-ur-form-handler.php:383
|
2085 |
+
#: includes/class-ur-form-handler.php:388
|
2086 |
+
#: includes/class-ur-form-handler.php:392
|
2087 |
+
#: includes/class-ur-form-handler.php:401
|
2088 |
#: includes/class-ur-user-approval.php:194
|
2089 |
#: includes/class-ur-user-approval.php:199
|
2090 |
#: includes/class-ur-user-approval.php:214
|
2129 |
msgid "Form"
|
2130 |
msgstr ""
|
2131 |
|
2132 |
+
#: includes/class-ur-form-handler.php:178
|
2133 |
#: includes/frontend/class-ur-frontend-form-handler.php:467
|
2134 |
msgid "%s is a required field."
|
2135 |
msgstr ""
|
2136 |
|
2137 |
+
#: includes/class-ur-form-handler.php:186
|
2138 |
msgid "Email already exists"
|
2139 |
msgstr ""
|
2140 |
|
2141 |
+
#: includes/class-ur-form-handler.php:200
|
2142 |
msgid "%s is not a valid email address."
|
2143 |
msgstr ""
|
2144 |
|
2145 |
+
#: includes/class-ur-form-handler.php:291
|
2146 |
msgid "Please fill out all password fields."
|
2147 |
msgstr ""
|
2148 |
|
2149 |
+
#: includes/class-ur-form-handler.php:294
|
2150 |
msgid "Please enter your current password."
|
2151 |
msgstr ""
|
2152 |
|
2153 |
+
#: includes/class-ur-form-handler.php:297
|
2154 |
msgid "Please enter your new password."
|
2155 |
msgstr ""
|
2156 |
|
2157 |
+
#: includes/class-ur-form-handler.php:300
|
2158 |
msgid "Please re-enter your password."
|
2159 |
msgstr ""
|
2160 |
|
2161 |
+
#: includes/class-ur-form-handler.php:303
|
2162 |
msgid "New passwords do not match."
|
2163 |
msgstr ""
|
2164 |
|
2165 |
+
#: includes/class-ur-form-handler.php:306
|
2166 |
msgid "Your current password is incorrect."
|
2167 |
msgstr ""
|
2168 |
|
2169 |
+
#: includes/class-ur-form-handler.php:309
|
2170 |
msgid "New password must not be same as old password"
|
2171 |
msgstr ""
|
2172 |
|
2173 |
+
#: includes/class-ur-form-handler.php:330
|
2174 |
msgid "Password changed successfully."
|
2175 |
msgstr ""
|
2176 |
|
2177 |
+
#: includes/class-ur-form-handler.php:515
|
2178 |
msgid "Please enter your password."
|
2179 |
msgstr ""
|
2180 |
|
2181 |
+
#: includes/class-ur-form-handler.php:519
|
2182 |
msgid "Passwords do not match."
|
2183 |
msgstr ""
|
2184 |
|
2185 |
+
#: includes/class-ur-form-handler.php:523
|
2186 |
msgid "New password must not be same as old password."
|
2187 |
msgstr ""
|
2188 |
|
2189 |
+
#: includes/class-ur-form-handler.php:557
|
2190 |
msgid "Invalid Key"
|
2191 |
msgstr ""
|
2192 |
|
2193 |
+
#: includes/class-ur-form-handler.php:572
|
2194 |
msgid "Thanks for confirming your export request."
|
2195 |
msgstr ""
|
2196 |
|
2197 |
+
#: includes/class-ur-form-handler.php:574
|
2198 |
msgid "Thanks for confirming your erasure request."
|
2199 |
msgstr ""
|
2200 |
|
2571 |
msgid "Profile Details"
|
2572 |
msgstr ""
|
2573 |
|
2574 |
+
#: includes/class-ur-shortcodes.php:152
|
2575 |
+
msgid "Please Login to edit profile. <a href=\"%s\">Login Here?</a>"
|
2576 |
+
msgstr ""
|
2577 |
+
|
2578 |
#: includes/class-ur-user-approval.php:194
|
2579 |
msgid "Your account is still pending approval."
|
2580 |
msgstr ""
|
4255 |
msgid "Are you sure you want to log out? <a href=\"%s\">Confirm and log out</a>"
|
4256 |
msgstr ""
|
4257 |
|
4258 |
+
#: includes/shortcodes/class-ur-shortcode-my-account.php:222
|
4259 |
msgid "No profile details found."
|
4260 |
msgstr ""
|
4261 |
|
4262 |
+
#: includes/shortcodes/class-ur-shortcode-my-account.php:323
|
4263 |
msgid "Enter a username or email address."
|
4264 |
msgstr ""
|
4265 |
|
4266 |
+
#: includes/shortcodes/class-ur-shortcode-my-account.php:344
|
4267 |
+
#: includes/shortcodes/class-ur-shortcode-my-account.php:349
|
4268 |
msgid "Invalid username or email."
|
4269 |
msgstr ""
|
4270 |
|
4271 |
+
#: includes/shortcodes/class-ur-shortcode-my-account.php:359
|
4272 |
msgid "Password reset is not allowed for this user"
|
4273 |
msgstr ""
|
4274 |
|
4275 |
+
#: includes/shortcodes/class-ur-shortcode-my-account.php:372
|
4276 |
msgid "The email could not be sent. Contact your site administrator. "
|
4277 |
msgstr ""
|
4278 |
|
4300 |
msgid "Total"
|
4301 |
msgstr ""
|
4302 |
|
4303 |
+
#: templates/form-registration.php:152
|
4304 |
msgid "Form not found, form id :"
|
4305 |
msgstr ""
|
4306 |
|
4338 |
msgstr ""
|
4339 |
|
4340 |
#: templates/myaccount/form-edit-password.php:82
|
4341 |
+
#: templates/myaccount/form-edit-profile.php:294
|
4342 |
+
#: templates/myaccount/form-edit-profile.php:299
|
4343 |
msgid "Save changes"
|
4344 |
msgstr ""
|
4345 |
|
4347 |
msgid "Profile Detail"
|
4348 |
msgstr ""
|
4349 |
|
4350 |
+
#: templates/myaccount/form-edit-profile.php:60
|
4351 |
msgid "Max size: "
|
4352 |
msgstr ""
|
4353 |
|
4354 |
+
#: templates/myaccount/form-edit-profile.php:63
|
4355 |
msgid "Upload your new profile image."
|
4356 |
msgstr ""
|
4357 |
|
4358 |
+
#: templates/myaccount/form-edit-profile.php:85
|
4359 |
msgid "Remove"
|
4360 |
msgstr ""
|
4361 |
|
4362 |
+
#: templates/myaccount/form-edit-profile.php:104
|
4363 |
msgid "You can change your profile picture on"
|
4364 |
msgstr ""
|
4365 |
|
4366 |
+
#: templates/myaccount/form-edit-profile.php:104
|
4367 |
msgid "Gravatar"
|
4368 |
msgstr ""
|
4369 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: WPEverest
|
|
3 |
Tags: user registration, registration, user profile, registration form, login form,
|
4 |
Requires at least: 4.0
|
5 |
Requires PHP: 5.3
|
6 |
-
Tested up to: 5.7.
|
7 |
-
Stable tag: 1.9.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -153,6 +153,17 @@ Yes, the plugin has a shortcode for the login form.
|
|
153 |
|
154 |
== Changelog ==
|
155 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
= 1.9.7 - 28/04/2021
|
157 |
* Feature - Login Form Using Ajax.
|
158 |
* Feature - Disable profile picture in my account.
|
3 |
Tags: user registration, registration, user profile, registration form, login form,
|
4 |
Requires at least: 4.0
|
5 |
Requires PHP: 5.3
|
6 |
+
Tested up to: 5.7.2
|
7 |
+
Stable tag: 1.9.8
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
153 |
|
154 |
== Changelog ==
|
155 |
|
156 |
+
= 1.9.8 - 31/05/2021
|
157 |
+
* Feature - Edit profile form shortcode.
|
158 |
+
* Enhance - Valid file type in my account profile picture.
|
159 |
+
* Enhance - Reset Button in UR Form.
|
160 |
+
* Enhance - Payment slider in range field.
|
161 |
+
* Tweak - Email exists check in edit profile.
|
162 |
+
* Tweak - Redirection filter in ajax login.
|
163 |
+
* Fix - My Account slug not translate via polylang plugin.
|
164 |
+
* Fix - UR not working if dashboard language changed.
|
165 |
+
* Fix - Recaptcha issue on login and registration shortcode page.
|
166 |
+
|
167 |
= 1.9.7 - 28/04/2021
|
168 |
* Feature - Login Form Using Ajax.
|
169 |
* Feature - Disable profile picture in my account.
|
templates/form-registration.php
CHANGED
@@ -57,7 +57,7 @@ do_action( 'user_registration_before_registration_form', $form_id );
|
|
57 |
?>
|
58 |
<div class='user-registration ur-frontend-form <?php echo $template_class . ' ' . $custom_class; ?>' id='user-registration-form-<?php echo absint( $form_id ); ?>'>
|
59 |
<form method='post' class='register' data-form-id="<?php echo absint( $form_id ); ?>"
|
60 |
-
data-enable-strength-password="<?php echo $enable_strong_password; ?>" data-minimum-password-strength="<?php echo $minimum_password_strength; ?>" <?php echo apply_filters( 'user_registration_form_params', '' );
|
61 |
|
62 |
<?php
|
63 |
do_action( 'user_registration_before_form_fields', $form_data_array, $form_id );
|
@@ -134,7 +134,6 @@ do_action( 'user_registration_before_registration_form', $form_id );
|
|
134 |
$submit_btn_class = apply_filters( 'user_registration_form_submit_btn_class', array(), $form_id );
|
135 |
$submit_btn_class = array_merge( $submit_btn_class, (array) ur_get_form_setting_by_key( $form_id, 'user_registration_form_setting_form_submit_class' ) );
|
136 |
?>
|
137 |
-
|
138 |
<button type="submit" class="btn button ur-submit-button <?php echo esc_attr( implode( ' ', $submit_btn_class ) ); ?>">
|
139 |
<span></span>
|
140 |
<?php
|
@@ -142,8 +141,8 @@ do_action( 'user_registration_before_registration_form', $form_id );
|
|
142 |
echo ur_string_translation( $form_id, 'user_registration_form_setting_form_submit_label', $submit );
|
143 |
?>
|
144 |
</button>
|
145 |
-
|
146 |
<?php do_action( 'user_registration_after_form_buttons', $form_id ); ?>
|
|
|
147 |
</div>
|
148 |
<?php
|
149 |
}
|
57 |
?>
|
58 |
<div class='user-registration ur-frontend-form <?php echo $template_class . ' ' . $custom_class; ?>' id='user-registration-form-<?php echo absint( $form_id ); ?>'>
|
59 |
<form method='post' class='register' data-form-id="<?php echo absint( $form_id ); ?>"
|
60 |
+
data-enable-strength-password="<?php echo $enable_strong_password; ?>" data-minimum-password-strength="<?php echo $minimum_password_strength; ?>" <?php echo apply_filters( 'user_registration_form_params', '' ); ?> data-captcha-enabled="<?php echo esc_attr( $recaptcha_enabled ) ?>">
|
61 |
|
62 |
<?php
|
63 |
do_action( 'user_registration_before_form_fields', $form_data_array, $form_id );
|
134 |
$submit_btn_class = apply_filters( 'user_registration_form_submit_btn_class', array(), $form_id );
|
135 |
$submit_btn_class = array_merge( $submit_btn_class, (array) ur_get_form_setting_by_key( $form_id, 'user_registration_form_setting_form_submit_class' ) );
|
136 |
?>
|
|
|
137 |
<button type="submit" class="btn button ur-submit-button <?php echo esc_attr( implode( ' ', $submit_btn_class ) ); ?>">
|
138 |
<span></span>
|
139 |
<?php
|
141 |
echo ur_string_translation( $form_id, 'user_registration_form_setting_form_submit_label', $submit );
|
142 |
?>
|
143 |
</button>
|
|
|
144 |
<?php do_action( 'user_registration_after_form_buttons', $form_id ); ?>
|
145 |
+
<?php do_action( 'user_registration_after_submit_buttons', $form_id ); ?>
|
146 |
</div>
|
147 |
<?php
|
148 |
}
|
templates/myaccount/form-edit-profile.php
CHANGED
@@ -22,7 +22,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
22 |
|
23 |
do_action( 'user_registration_before_edit_profile_form' ); ?>
|
24 |
|
25 |
-
<div class="ur-frontend-form login" id="ur-frontend-form">
|
26 |
<form class="user-registration-EditProfileForm edit-profile" action="" method="post" enctype="multipart/form-data">
|
27 |
<div class="ur-form-row">
|
28 |
<div class="ur-form-grid">
|
@@ -38,6 +38,19 @@ do_action( 'user_registration_before_edit_profile_form' ); ?>
|
|
38 |
$profile_picture_url = get_user_meta( get_current_user_id(), 'user_registration_profile_pic_url', true );
|
39 |
$image = ( ! empty( $profile_picture_url ) ) ? $profile_picture_url : $gravatar_image;
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
?>
|
42 |
<img class="profile-preview" alt="profile-picture" src="<?php echo $image; ?>" style='max-width:96px; max-height:96px;' >
|
43 |
<?php
|
@@ -56,7 +69,7 @@ do_action( 'user_registration_before_edit_profile_form' ); ?>
|
|
56 |
<div class="uraf-profile-picture-upload">
|
57 |
<p class="form-row " id="profile_pic_url_field" data-priority="">
|
58 |
<span class="uraf-profile-picture-upload-node" style="height: 0;width: 0;margin: 0;padding: 0;float: left;border: 0;overflow: hidden;">
|
59 |
-
<input type="file" id="ur-profile-pic" name="profile-pic" class="profile-pic-upload" accept="
|
60 |
<?php echo '<input type="text" class="uraf-profile-picture-input input-text ur-frontend-field" name="profile_pic_url" id="profile_pic_url" value="' . esc_url( $profile_picture_url ) . '" />'; ?>
|
61 |
</span>
|
62 |
<?php do_action( 'uraf_profile_picture_buttons' ); ?>
|
@@ -74,11 +87,11 @@ do_action( 'user_registration_before_edit_profile_form' ); ?>
|
|
74 |
if ( 'yes' === get_option( 'user_registration_ajax_form_submission_on_edit_profile', 'no' ) ) {
|
75 |
?>
|
76 |
<button type="button" class="button user_registration_profile_picture_upload hide-if-no-js" style="<?php echo ( $gravatar_image !== $image ) ? 'display:none;' : ''; ?>" ><?php echo __( 'Upload Picture', 'user-registration-advanced-fields' ); ?></button>
|
77 |
-
<input type="file" id="ur-profile-pic" name="profile-pic" class="profile-pic-upload" accept="image/jpeg" style="display:none" />
|
78 |
<?php
|
79 |
} else {
|
80 |
?>
|
81 |
-
<input type="file" id="ur-profile-pic" name="profile-pic" class="profile-pic-upload" accept="image/jpeg" style="<?php echo ( $gravatar_image !== $image ) ? 'display:none;' : ''; ?>" />
|
82 |
<?php
|
83 |
}
|
84 |
}
|
@@ -174,6 +187,7 @@ do_action( 'user_registration_before_edit_profile_form' ); ?>
|
|
174 |
$field['range_min'] = ( isset( $advance_data['advance_setting']->range_min) && "" !== $advance_data['advance_setting']->range_min )? $advance_data['advance_setting']->range_min : "0";
|
175 |
$field['range_max'] = ( isset( $advance_data['advance_setting']->range_max) && "" !== $advance_data['advance_setting']->range_max ) ? $advance_data['advance_setting']->range_max : "10";
|
176 |
$field['range_step'] = isset( $advance_data['advance_setting']->range_step) ? $advance_data['advance_setting']->range_step : "1";
|
|
|
177 |
|
178 |
if( "true" === $advance_data['advance_setting']->enable_prefix_postfix) {
|
179 |
if( "true" === $advance_data['advance_setting']->enable_text_prefix_postfix ) {
|
@@ -185,6 +199,10 @@ do_action( 'user_registration_before_edit_profile_form' ); ?>
|
|
185 |
}
|
186 |
}
|
187 |
|
|
|
|
|
|
|
|
|
188 |
}
|
189 |
|
190 |
if ( 'phone' === $single_item->field_key ) {
|
22 |
|
23 |
do_action( 'user_registration_before_edit_profile_form' ); ?>
|
24 |
|
25 |
+
<div class="ur-frontend-form login ur-edit-profile" id="ur-frontend-form">
|
26 |
<form class="user-registration-EditProfileForm edit-profile" action="" method="post" enctype="multipart/form-data">
|
27 |
<div class="ur-form-row">
|
28 |
<div class="ur-form-grid">
|
38 |
$profile_picture_url = get_user_meta( get_current_user_id(), 'user_registration_profile_pic_url', true );
|
39 |
$image = ( ! empty( $profile_picture_url ) ) ? $profile_picture_url : $gravatar_image;
|
40 |
|
41 |
+
foreach($form_data_array as $data){
|
42 |
+
foreach ( $data as $grid_key => $grid_data ) {
|
43 |
+
foreach ( $grid_data as $grid_data_key => $single_item ) {
|
44 |
+
$edit_profile_valid_file_type = 'image/jpeg,image/jpg,image/gif,image/png';
|
45 |
+
|
46 |
+
if("profile_picture" === $single_item->field_key){
|
47 |
+
if ( ! empty( $single_item->advance_setting->valid_file_type ) ) {
|
48 |
+
$edit_profile_valid_file_type = implode(', ', $single_item->advance_setting->valid_file_type);
|
49 |
+
}
|
50 |
+
}
|
51 |
+
}
|
52 |
+
}
|
53 |
+
}
|
54 |
?>
|
55 |
<img class="profile-preview" alt="profile-picture" src="<?php echo $image; ?>" style='max-width:96px; max-height:96px;' >
|
56 |
<?php
|
69 |
<div class="uraf-profile-picture-upload">
|
70 |
<p class="form-row " id="profile_pic_url_field" data-priority="">
|
71 |
<span class="uraf-profile-picture-upload-node" style="height: 0;width: 0;margin: 0;padding: 0;float: left;border: 0;overflow: hidden;">
|
72 |
+
<input type="file" id="ur-profile-pic" name="profile-pic" class="profile-pic-upload" accept="<?php echo $edit_profile_valid_file_type ?>" style="<?php echo ( $gravatar_image !== $image ) ? 'display:none;' : ''; ?>" />
|
73 |
<?php echo '<input type="text" class="uraf-profile-picture-input input-text ur-frontend-field" name="profile_pic_url" id="profile_pic_url" value="' . esc_url( $profile_picture_url ) . '" />'; ?>
|
74 |
</span>
|
75 |
<?php do_action( 'uraf_profile_picture_buttons' ); ?>
|
87 |
if ( 'yes' === get_option( 'user_registration_ajax_form_submission_on_edit_profile', 'no' ) ) {
|
88 |
?>
|
89 |
<button type="button" class="button user_registration_profile_picture_upload hide-if-no-js" style="<?php echo ( $gravatar_image !== $image ) ? 'display:none;' : ''; ?>" ><?php echo __( 'Upload Picture', 'user-registration-advanced-fields' ); ?></button>
|
90 |
+
<input type="file" id="ur-profile-pic" name="profile-pic" class="profile-pic-upload" accept="image/jpeg,image/jpg,image/gif,image/png" style="display:none" />
|
91 |
<?php
|
92 |
} else {
|
93 |
?>
|
94 |
+
<input type="file" id="ur-profile-pic" name="profile-pic" class="profile-pic-upload" accept="image/jpeg,image/jpg,image/gif,image/png" style="<?php echo ( $gravatar_image !== $image ) ? 'display:none;' : ''; ?>" />
|
95 |
<?php
|
96 |
}
|
97 |
}
|
187 |
$field['range_min'] = ( isset( $advance_data['advance_setting']->range_min) && "" !== $advance_data['advance_setting']->range_min )? $advance_data['advance_setting']->range_min : "0";
|
188 |
$field['range_max'] = ( isset( $advance_data['advance_setting']->range_max) && "" !== $advance_data['advance_setting']->range_max ) ? $advance_data['advance_setting']->range_max : "10";
|
189 |
$field['range_step'] = isset( $advance_data['advance_setting']->range_step) ? $advance_data['advance_setting']->range_step : "1";
|
190 |
+
$field['enable_payment_slider'] = isset( $advance_data['advance_setting']->enable_payment_slider) ? $advance_data['advance_setting']->enable_payment_slider : "false";
|
191 |
|
192 |
if( "true" === $advance_data['advance_setting']->enable_prefix_postfix) {
|
193 |
if( "true" === $advance_data['advance_setting']->enable_text_prefix_postfix ) {
|
199 |
}
|
200 |
}
|
201 |
|
202 |
+
// to hide the range as payment slider in edit profile
|
203 |
+
if("true" ===$field['enable_payment_slider']){
|
204 |
+
continue;
|
205 |
+
}
|
206 |
}
|
207 |
|
208 |
if ( 'phone' === $single_item->field_key ) {
|
user-registration.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: User Registration
|
4 |
* Plugin URI: https://wpeverest.com/plugins/user-registration
|
5 |
* Description: Drag and Drop user registration form and login form builder.
|
6 |
-
* Version: 1.9.
|
7 |
* Author: WPEverest
|
8 |
* Author URI: https://wpeverest.com
|
9 |
* Text Domain: user-registration
|
@@ -31,7 +31,7 @@ if ( ! class_exists( 'UserRegistration' ) ) :
|
|
31 |
*
|
32 |
* @var string
|
33 |
*/
|
34 |
-
public $version = '1.9.
|
35 |
|
36 |
/**
|
37 |
* Session instance.
|
3 |
* Plugin Name: User Registration
|
4 |
* Plugin URI: https://wpeverest.com/plugins/user-registration
|
5 |
* Description: Drag and Drop user registration form and login form builder.
|
6 |
+
* Version: 1.9.8
|
7 |
* Author: WPEverest
|
8 |
* Author URI: https://wpeverest.com
|
9 |
* Text Domain: user-registration
|
31 |
*
|
32 |
* @var string
|
33 |
*/
|
34 |
+
public $version = '1.9.8';
|
35 |
|
36 |
/**
|
37 |
* Session instance.
|