summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--settings/js/users/groups.js15
-rw-r--r--settings/templates/users/part.createuser.php14
-rw-r--r--settings/templates/users/part.userlist.php50
3 files changed, 48 insertions, 31 deletions
diff --git a/settings/js/users/groups.js b/settings/js/users/groups.js
index b666ad5e74b..0180cb64898 100644
--- a/settings/js/users/groups.js
+++ b/settings/js/users/groups.js
@@ -55,6 +55,19 @@
var addedGroups = result.data.groupname;
UserList.availableGroups = $.unique($.merge(UserList.availableGroups, addedGroups));
GroupList.addGroup(result.data.groupname);
+
+ $('#newusergroups').children().first().attr('value', result.data.groupname);
+ $('#newusergroups').children().first().text(result.data.groupname);
+
+ $('.groupsselect').each( function (index, element) {
+ $(element).children().first().attr('value', result.data.groupname);
+ $(element).children().first().text(result.data.groupname);
+ });
+
+ $('.subadminsselect').each( function (index, element) {
+ $(element).children().first().attr('value', result.data.groupname);
+ $(element).children().first().text(result.data.groupname);
+ });
}
GroupList.toggleAddGroup();
}
@@ -124,7 +137,7 @@
initDeleteHandling: function() {
//set up handler
GroupDeleteHandler = new DeleteHandler('removegroup.php', 'groupname',
- GroupList.hide, GroupList.remove);
+ GroupList.hide, GroupList.remove);
//configure undo
OC.Notification.hide();
diff --git a/settings/templates/users/part.createuser.php b/settings/templates/users/part.createuser.php
index e52f0da0b36..73799ff5d5b 100644
--- a/settings/templates/users/part.createuser.php
+++ b/settings/templates/users/part.createuser.php
@@ -1,16 +1,18 @@
<div id="user-controls">
<form id="newuser" autocomplete="off">
- <input id="newusername" type="text" placeholder="<?php p($l->t('Login Name'))?>" /> <input
+ <input id="newusername" type="text" placeholder="<?php p($l->t('Login Name'))?>" />
+ <input
type="password" id="newuserpassword"
- placeholder="<?php p($l->t('Password'))?>" /> <select
- class="groupsselect"
- id="newusergroups" data-placeholder="groups"
+ placeholder="<?php p($l->t('Password'))?>"
+ />
+ <select
+ class="groupsselect" id="newusergroups" data-placeholder="groups"
title="<?php p($l->t('Groups'))?>" multiple="multiple">
<?php foreach($_["adminGroup"] as $adminGroup): ?>
- <option value="<?php p($adminGroup['name']);?>"><?php p($adminGroup['name']); ?></option>
+ <option value="<?php p($adminGroup['name']);?>"><?php p($adminGroup['name']); ?></option>
<?php endforeach; ?>
<?php foreach($_["groups"] as $group): ?>
- <option value="<?php p($group['name']);?>"><?php p($group['name']);?></option>
+ <option value="<?php p($group['name']);?>"><?php p($group['name']);?></option>
<?php endforeach;?>
</select>
<input type="submit" class="button" value="<?php p($l->t('Create'))?>" />
diff --git a/settings/templates/users/part.userlist.php b/settings/templates/users/part.userlist.php
index 989d5f362c4..17105b6e59d 100644
--- a/settings/templates/users/part.userlist.php
+++ b/settings/templates/users/part.userlist.php
@@ -33,32 +33,34 @@
src="<?php print_unescaped(image_path('core', 'actions/rename.svg'))?>"
alt="<?php p($l->t("set new password"))?>" title="<?php p($l->t("set new password"))?>"/>
</td>
- <td class="groups"><select
- class="groupsselect"
- data-username="<?php p($user['name']) ;?>"
- data-user-groups="<?php p(json_encode($user['groups'])) ;?>"
- data-placeholder="groups" title="<?php p($l->t('Groups'))?>"
- multiple="multiple">
- <?php foreach($_["adminGroup"] as $adminGroup): ?>
- <option value="<?php p($adminGroup['name']);?>"><?php p($adminGroup['name']); ?></option>
- <?php endforeach; ?>
- <?php foreach($_["groups"] as $group): ?>
- <option value="<?php p($group['name']);?>"><?php p($group['name']);?></option>
- <?php endforeach;?>
- </select>
+ <td class="groups">
+ <select
+ class="groupsselect"
+ data-username="<?php p($user['name']) ;?>"
+ data-user-groups="<?php p(json_encode($user['groups'])) ;?>"
+ data-placeholder="groups" title="<?php p($l->t('Groups'))?>"
+ multiple="multiple">
+ <?php foreach($_["adminGroup"] as $adminGroup): ?>
+ <option value="<?php p($adminGroup['name']);?>"><?php p($adminGroup['name']); ?></option>
+ <?php endforeach; ?>
+ <?php foreach($_["groups"] as $group): ?>
+ <option value="<?php p($group['name']);?>"><?php p($group['name']);?></option>
+ <?php endforeach;?>
+ </select>
</td>
<?php if(is_array($_['subadmins']) || $_['subadmins']): ?>
- <td class="subadmins"><select
- class="subadminsselect"
- data-username="<?php p($user['name']) ;?>"
- data-subadmin="<?php p(json_encode($user['subadmin']));?>"
- data-placeholder="subadmins" title="<?php p($l->t('Group Admin'))?>"
- multiple="multiple">
- <?php foreach($_["subadmingroups"] as $group): ?>
- <option value="<?php p($group);?>"><?php p($group);?></option>
- <?php endforeach;?>
- </select>
- </td>
+ <td class="subadmins">
+ <select
+ class="subadminsselect"
+ data-username="<?php p($user['name']) ;?>"
+ data-subadmin="<?php p(json_encode($user['subadmin']));?>"
+ data-placeholder="subadmins" title="<?php p($l->t('Group Admin'))?>"
+ multiple="multiple">
+ <?php foreach($_["subadmingroups"] as $group): ?>
+ <option value="<?php p($group);?>"><?php p($group);?></option>
+ <?php endforeach;?>
+ </select>
+ </td>
<?php endif;?>
<td class="quota">
<select class='quota-user' data-inputtitle="<?php p($l->t('Please enter storage quota (ex: "512 MB" or "12 GB")')) ?>">