From: Qingping Hou Date: Sun, 24 Feb 2013 23:13:25 +0000 (-0500) Subject: update oldDisplayName value on displayName change X-Git-Tag: v5.0.0RC1~45^2~4 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=278a6f5b416693ed2dbeb13b6cc1fb0dafc9d391;p=nextcloud-server.git 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. --- diff --git a/settings/js/personal.js b/settings/js/personal.js index c5a46a16002..8747c496041 100644 --- a/settings/js/personal.js +++ b/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();