update oldDisplayName value on displayName change

This patch fixes a bug that can be reproduced in following way:

1. change displayName
2. clear text in displayName input click change again

Then you will get an error and previous displayName will be restored.

Expected behavior should restore the new updated displayName.
remotes/origin/stable5
Qingping Hou 12 years ago
parent 2f3c5d8afc
commit 278a6f5b41
  1. 1
      settings/js/personal.js

@ -42,6 +42,7 @@ $(document).ready(function(){
$.post( 'ajax/changedisplayname.php', post, function(data){
if( data.status == "success" ){
$('#displaynamechanged').show();
$('#oldDisplayName').val($('#displayName').val());
// update displayName on the top right expand button
str_parts = $('#expand').html().split('\t');
str_parts[5] = $('#displayName').val();

Loading…
Cancel
Save