From 6b20fef52af078e6fa7343f2e9c23fcbbf6fef48 Mon Sep 17 00:00:00 2001 From: Emmanuel ROHEE Date: Thu, 11 Sep 2014 13:52:07 +0200 Subject: [PATCH] Invite: reset the input when the invitation has been done --- webclient/room/room-controller.js | 7 ++++--- webclient/room/room.html | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js index fe3821eb4..da7786401 100644 --- a/webclient/room/room-controller.js +++ b/webclient/room/room-controller.js @@ -694,12 +694,13 @@ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput']) ); }; - $scope.inviteUser = function(user_id) { + $scope.inviteUser = function() { - matrixService.invite($scope.room_id, user_id).then( + matrixService.invite($scope.room_id, $scope.userIDToInvite).then( function() { console.log("Invited."); - $scope.feedback = "Invite sent successfully"; + $scope.feedback = "Invite successfully sent to " + $scope.userIDToInvite; + $scope.userIDToInvite = ""; }, function(reason) { $scope.feedback = "Failure: " + reason; diff --git a/webclient/room/room.html b/webclient/room/room.html index 2225cc764..b00d63229 100644 --- a/webclient/room/room.html +++ b/webclient/room/room.html @@ -150,8 +150,8 @@
Invite a user: - - + +