Added per user cost message if group has subscription (#8328)

* Added per user cost message if group has subscription

* Added user specification to cost
This commit is contained in:
Keith Holliday
2016-12-29 08:56:40 -06:00
committed by GitHub
parent 6ce83d1fa4
commit fb229acb58
3 changed files with 17 additions and 12 deletions

View File

@@ -1,7 +1,7 @@
"use strict";
habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '$http', '$q', 'User', 'Members', '$state', 'Notification',
function($scope, $rootScope, Shared, Groups, $http, $q, User, Members, $state, Notification) {
function($scope, $rootScope, Shared, Groups, $http, $q, User, Members, $state, Notification) {
$scope.isMemberOfPendingQuest = function (userid, group) {
if (!group.quest || !group.quest.members) return false;
if (group.quest.active) return false; // quest is started, not pending
@@ -125,12 +125,16 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '
return console.log('Invalid group type.')
}
var sendInviteText = window.env.t('sendInvitations');
if(group.purchased.plan.customerId) sendInviteText += window.env.t('groupAdditionalUserCost');
group.sendInviteText = sendInviteText;
$rootScope.openModal('invite-' + group.type, {
controller:'InviteToGroupCtrl',
resolve: {
injectedGroup: function(){
return group;
}
},
}
});
};