From f57368d7edf7d9b097e2b4dc34f515b7bae8f86f Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 14 May 2024 16:14:11 +0000 Subject: [PATCH] Users: Reuse an existing string in the confirmation for unsaved changes in user profile. Follow-up to [58137]. Fixes #40493. Built from https://develop.svn.wordpress.org/trunk@58145 git-svn-id: http://core.svn.wordpress.org/trunk@57610 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/js/user-profile.js | 2 +- wp-admin/js/user-profile.min.js | 2 +- wp-includes/version.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-admin/js/user-profile.js b/wp-admin/js/user-profile.js index 2b0fe5a5fc..88b051b352 100644 --- a/wp-admin/js/user-profile.js +++ b/wp-admin/js/user-profile.js @@ -491,7 +491,7 @@ return __( 'Your new password has not been saved.' ); } if ( originalFormContent !== $form.serialize() && ! isSubmitting ) { - return __( 'Changes that you made may not be saved.' ); + return __( 'The changes you made will be lost if you navigate away from this page.' ); } }); diff --git a/wp-admin/js/user-profile.min.js b/wp-admin/js/user-profile.min.js index 859ee84ab9..4aed1d046b 100644 --- a/wp-admin/js/user-profile.min.js +++ b/wp-admin/js/user-profile.min.js @@ -1,2 +1,2 @@ /*! This file is auto-generated */ -!function(o){var s,a,t,n,i,r,p,d,l,c,u,h,f=!1,m=!1,w=wp.i18n.__;function v(){"function"!=typeof zxcvbn?setTimeout(v,50):(!a.val()||h.hasClass("is-open")?(a.val(a.data("pw")),a.trigger("pwupdate")):_(),C(),b(),1!==parseInt(r.data("start-masked"),10)?a.attr("type","text"):r.trigger("click"),o("#pw-weak-text-label").text(w("Confirm use of weak password")),"mailserver_pass"!==a.prop("id")&&o(a).trigger("focus"))}function g(e){r.attr({"aria-label":w(e?"Show password":"Hide password")}).find(".text").text(w(e?"Show":"Hide")).end().find(".dashicons").removeClass(e?"dashicons-hidden":"dashicons-visibility").addClass(e?"dashicons-visibility":"dashicons-hidden")}function b(){r||(r=s.find(".wp-hide-pw")).show().on("click",function(){"password"===a.attr("type")?(a.attr("type","text"),g(!1)):(a.attr("type","password"),g(!0))})}function y(e,s,a){var t=o("
");t.addClass("notice inline"),t.addClass("notice-"+(s?"success":"error")),t.text(o(o.parseHTML(a)).text()).wrapInner("

"),e.prop("disabled",s),e.siblings(".notice").remove(),e.before(t)}function k(){var e;s=o(".user-pass1-wrap, .user-pass-wrap, .mailserver-pass-wrap, .reset-pass-submit"),o(".user-pass2-wrap").hide(),d=o("#submit, #wp-submit").on("click",function(){f=!1}),p=d.add(" #createusersub"),n=o(".pw-weak"),(i=n.find(".pw-checkbox")).on("change",function(){p.prop("disabled",!i.prop("checked"))}),(a=o("#pass1, #mailserver_pass")).length?(l=a.val(),1===parseInt(a.data("reveal"),10)&&v(),a.on("input pwupdate",function(){a.val()!==l&&(l=a.val(),a.removeClass("short bad good strong"),C())})):a=o("#user_pass"),t=o("#pass2").on("input",function(){0]*>/gi,""),t[e].length)&&-1===o.inArray(s,a)&&(a.push(s),o("

'+e.message+"

")}).fail(function(e){s.siblings(".notice").remove(),s.before('

'+e.message+"

")}),e.preventDefault()}),window.generatePassword=v,o(window).on("beforeunload",function(){return!0===f?w("Your new password has not been saved."):u===c.serialize()||m?void 0:w("Changes that you made may not be saved.")}),o(function(){o(".reset-pass-submit").length&&o(".reset-pass-submit button.wp-generate-pw").trigger("click")})}(jQuery); \ No newline at end of file +!function(o){var s,a,t,n,i,r,p,l,d,c,u,h,f=!1,w=!1,m=wp.i18n.__;function v(){"function"!=typeof zxcvbn?setTimeout(v,50):(!a.val()||h.hasClass("is-open")?(a.val(a.data("pw")),a.trigger("pwupdate")):_(),C(),b(),1!==parseInt(r.data("start-masked"),10)?a.attr("type","text"):r.trigger("click"),o("#pw-weak-text-label").text(m("Confirm use of weak password")),"mailserver_pass"!==a.prop("id")&&o(a).trigger("focus"))}function g(e){r.attr({"aria-label":m(e?"Show password":"Hide password")}).find(".text").text(m(e?"Show":"Hide")).end().find(".dashicons").removeClass(e?"dashicons-hidden":"dashicons-visibility").addClass(e?"dashicons-visibility":"dashicons-hidden")}function b(){r||(r=s.find(".wp-hide-pw")).show().on("click",function(){"password"===a.attr("type")?(a.attr("type","text"),g(!1)):(a.attr("type","password"),g(!0))})}function y(e,s,a){var t=o("
");t.addClass("notice inline"),t.addClass("notice-"+(s?"success":"error")),t.text(o(o.parseHTML(a)).text()).wrapInner("

"),e.prop("disabled",s),e.siblings(".notice").remove(),e.before(t)}function k(){var e;s=o(".user-pass1-wrap, .user-pass-wrap, .mailserver-pass-wrap, .reset-pass-submit"),o(".user-pass2-wrap").hide(),l=o("#submit, #wp-submit").on("click",function(){f=!1}),p=l.add(" #createusersub"),n=o(".pw-weak"),(i=n.find(".pw-checkbox")).on("change",function(){p.prop("disabled",!i.prop("checked"))}),(a=o("#pass1, #mailserver_pass")).length?(d=a.val(),1===parseInt(a.data("reveal"),10)&&v(),a.on("input pwupdate",function(){a.val()!==d&&(d=a.val(),a.removeClass("short bad good strong"),C())})):a=o("#user_pass"),t=o("#pass2").on("input",function(){0]*>/gi,""),t[e].length)&&-1===o.inArray(s,a)&&(a.push(s),o("

'+e.message+"

")}).fail(function(e){s.siblings(".notice").remove(),s.before('

'+e.message+"

")}),e.preventDefault()}),window.generatePassword=v,o(window).on("beforeunload",function(){return!0===f?m("Your new password has not been saved."):u===c.serialize()||w?void 0:m("The changes you made will be lost if you navigate away from this page.")}),o(function(){o(".reset-pass-submit").length&&o(".reset-pass-submit button.wp-generate-pw").trigger("click")})}(jQuery); \ No newline at end of file diff --git a/wp-includes/version.php b/wp-includes/version.php index bceff44468..6897a2f004 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-alpha-58144'; +$wp_version = '6.6-alpha-58145'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.