From 5d4ef19df20cc17e83837b34256ae83d02642803 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 4 Feb 2015 21:36:10 +0100 Subject: [PATCH] Reset the invitation form after submit Only if it succeed --- public/js/vroom.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/js/vroom.js b/public/js/vroom.js index 8a7868f..1b1c945 100644 --- a/public/js/vroom.js +++ b/public/js/vroom.js @@ -1638,6 +1638,10 @@ function initVroom(room) { success: function(data) { $('#recipient').val(''); if (data.status == 'success'){ + $('#inviteModal').modal('hide'); + $('#email-list-invite').find('.email-entry:not(:last)').remove(); + $('#email-list-invite').find('input').val(''); + $('#message').val(''); $.notify(data.msg, 'success'); } else{