Changeset 58137
- Timestamp:
- 05/12/2024 06:43:19 PM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/admin/user-profile.js
r57702 r58137 6 6 (function($) { 7 7 var updateLock = false, 8 isSubmitting = false, 8 9 __ = wp.i18n.__, 9 10 $pass1Row, … … 16 17 $submitButton, 17 18 currentPass, 19 $form, 20 originalFormContent, 18 21 $passwordWrapper; 19 22 … … 455 458 bindPasswordForm(); 456 459 bindPasswordResetLink(); 460 $submitButtons.on( 'click', function() { 461 isSubmitting = true; 462 }); 463 464 $form = $( '#your-profile, #createuser' ); 465 originalFormContent = $form.serialize(); 457 466 }); 458 467 … … 482 491 return __( 'Your new password has not been saved.' ); 483 492 } 484 } ); 493 if ( originalFormContent !== $form.serialize() && ! isSubmitting ) { 494 return __( 'Changes that you made may not be saved.' ); 495 } 496 }); 485 497 486 498 /*
Note: See TracChangeset
for help on using the changeset viewer.