summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-01-28 17:01:37 +0100
committerBjörn Schießle <schiessle@owncloud.com>2013-01-28 17:01:37 +0100
commitf3a99f4869ea238822793f89bef14b564c333aad (patch)
treef0e5ff4440138432ecc83dc42077cd3ffa61c60e
parent590c4aa710077ae82a5af0ec4477a00eafe791dc (diff)
downloadnextcloud-server-f3a99f4869ea238822793f89bef14b564c333aad.tar.gz
nextcloud-server-f3a99f4869ea238822793f89bef14b564c333aad.zip
show display name in input field
-rw-r--r--settings/js/users.js3
-rw-r--r--settings/templates/users.php3
2 files changed, 4 insertions, 2 deletions
diff --git a/settings/js/users.js b/settings/js/users.js
index 835f46f6ed3..111e3040a35 100644
--- a/settings/js/users.js
+++ b/settings/js/users.js
@@ -305,7 +305,8 @@ $(document).ready(function () {
event.stopPropagation();
var img = $(this);
var uid = img.parent().parent().attr('data-uid');
- var input = $('<input type="text">');
+ var displayName = img.parent().parent().attr('data-displayName');
+ var input = $('<input type="text" value="'+displayName+'">');
img.css('display', 'none');
img.parent().children('span').replaceWith(input);
input.focus();
diff --git a/settings/templates/users.php b/settings/templates/users.php
index 2ba57fb4a7c..6407b59883a 100644
--- a/settings/templates/users.php
+++ b/settings/templates/users.php
@@ -91,7 +91,8 @@ var isadmin = <?php echo $_['isadmin']?'true':'false'; ?>;
</thead>
<tbody>
<?php foreach($_["users"] as $user): ?>
- <tr data-uid="<?php echo $user["name"] ?>">
+ <tr data-uid="<?php echo $user["name"] ?>"
+ data-displayName="<?php echo $user["displayName"] ?>">
<td class="name"><?php echo $user["name"]; ?></td>
<td class="displayName"><span><?php echo $user["displayName"]; ?></span> <img class="svg action"
src="<?php echo image_path('core', 'actions/rename.svg')?>"