mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-01 19:50:37 +00:00
parent
7d7bb3ecb8
commit
0dfb1f150f
3 changed files with 16 additions and 13 deletions
|
|
@ -138,6 +138,7 @@
|
|||
"inviteNewUsers": "Invite New Users",
|
||||
"sendInvitations": "Send Invitations",
|
||||
"invitationsSent": "Invitations sent!",
|
||||
"invitationSent": "Invitation sent!",
|
||||
"inviteAlertInfo2": "Or share this link (copy/paste):",
|
||||
"sendGiftHeading": "Send Gift to <%= name %>",
|
||||
"sendGiftGemsBalance": "From <%= number %> Gems",
|
||||
|
|
|
|||
|
|
@ -43,9 +43,13 @@ habitrpg.controller('InviteToGroupCtrl', ['$scope', '$rootScope', 'User', 'Group
|
|||
}
|
||||
|
||||
Groups.Group.invite($scope.group._id, invitationDetails)
|
||||
.then(function() {
|
||||
Notification.text(window.env.t('invitationsSent'));
|
||||
_resetInvitees();
|
||||
.then(function () {
|
||||
var invitesSent = invitationDetails.emails || invitationDetails.uuids;
|
||||
var invitationString = invitesSent.length > 1 ? 'invitationsSent' : 'invitationSent';
|
||||
|
||||
Notification.text(window.env.t(invitationString));
|
||||
|
||||
_resetInvitees();
|
||||
|
||||
if ($scope.group.type === 'party') {
|
||||
$rootScope.hardRedirect('/#/options/groups/party');
|
||||
|
|
|
|||
|
|
@ -12,11 +12,10 @@ script(type='text/ng-template', id='modals/invite-guild.html')
|
|||
tr(ng-repeat='user in invitees track by $index')
|
||||
td
|
||||
input.form-control(type='text', ng-model='user.uuid')
|
||||
//- @TODO: Refactor src/controllers/groups api.invite to use promises before implimenting this
|
||||
//- tr
|
||||
//- td
|
||||
//- a.btn.btn-xs.pull-right(ng-click='addUuid()')
|
||||
//- i.glyphicon.glyphicon-plus
|
||||
tr
|
||||
td
|
||||
a.btn.btn-xs.pull-right(ng-click='addUuid()')
|
||||
i.glyphicon.glyphicon-plus
|
||||
tr
|
||||
td
|
||||
.col-sm-4.col-sm-offset-8
|
||||
|
|
@ -91,11 +90,10 @@ script(type='text/ng-template', id='modals/invite-party.html')
|
|||
tr(ng-repeat='user in invitees track by $index')
|
||||
td
|
||||
input.form-control(type='text', ng-model='user.uuid')
|
||||
//- @TODO: Refactor src/controllers/groups api.invite to use promises before implimenting this
|
||||
//- tr
|
||||
//- td
|
||||
//- a.btn.btn-xs.pull-right(ng-click='addUuid()')
|
||||
//- i.glyphicon.glyphicon-plus
|
||||
tr
|
||||
td
|
||||
a.btn.btn-xs.pull-right(ng-click='addUuid()')
|
||||
i.glyphicon.glyphicon-plus
|
||||
tr
|
||||
td
|
||||
.col-sm-4.col-sm-offset-8
|
||||
|
|
|
|||
Loading…
Reference in a new issue