Add administrator editing
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
<th class="control-column"></th>
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<th>Administrator</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -11,6 +12,10 @@
|
||||
<td><a href="" ng-click="vm.edit(user)"><i class="fa fa-edit"></i></a></td>
|
||||
<td>{{user.userName}}</td>
|
||||
<td>{{user.email}}</td>
|
||||
<td>
|
||||
<i class="fa fa-check-square-o" ng-show="user.administrator"></i>
|
||||
<i class="fa fa-square-o" ng-show="!user.administrator"></i>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
|
||||
function edit(existingUser, editedUser) {
|
||||
return $http.post("/User/Edit", editedUser)
|
||||
.success(function(user) {
|
||||
angular.copy(user, existingUser);
|
||||
.success(function(data) {
|
||||
angular.copy(data, existingUser);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user