Skip to content

Commit cc65960

Browse files
authored
Merge branch 'trunk' into setup-sqlite-integration-without-creating-db-php
2 parents bfddf95 + 946dd72 commit cc65960

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

packages/playground/wordpress-builds/public/wp-nightly/wp-admin/js/user-profile.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
/* global ajaxurl, pwsL10n, userProfileL10n */
66
(function($) {
77
var updateLock = false,
8+
isSubmitting = false,
89
__ = wp.i18n.__,
910
$pass1Row,
1011
$pass1,
@@ -15,6 +16,8 @@
1516
$submitButtons,
1617
$submitButton,
1718
currentPass,
19+
$form,
20+
originalFormContent,
1821
$passwordWrapper;
1922

2023
function generatePassword() {
@@ -454,6 +457,12 @@
454457

455458
bindPasswordForm();
456459
bindPasswordResetLink();
460+
$submitButtons.on( 'click', function() {
461+
isSubmitting = true;
462+
});
463+
464+
$form = $( '#your-profile, #createuser' );
465+
originalFormContent = $form.serialize();
457466
});
458467

459468
$( '#destroy-sessions' ).on( 'click', function( e ) {
@@ -481,7 +490,10 @@
481490
if ( true === updateLock ) {
482491
return __( 'Your new password has not been saved.' );
483492
}
484-
} );
493+
if ( originalFormContent !== $form.serialize() && ! isSubmitting ) {
494+
return __( 'Changes that you made may not be saved.' );
495+
}
496+
});
485497

486498
/*
487499
* We need to generate a password as soon as the Reset Password page is loaded,

packages/playground/wordpress-builds/public/wp-nightly/wp-admin/js/user-profile.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/playground/wordpress-builds/src/wordpress/get-wordpress-module-details.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function getWordPressModuleDetails(wpVersion: string = "6.5"): { size: nu
2626
case 'nightly':
2727
/** @ts-ignore */
2828
return {
29-
size: 4989027,
29+
size: 4989050,
3030
url: url_nightly,
3131
};
3232

23 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)