From 524e0514a1560feef5b1e3d33b82df8e20791c6e Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Thu, 13 Nov 2014 12:53:07 -0700 Subject: [PATCH] feat(invite-friends): update wording on invitations. Add commented-out sample code on copy-link (it's not working) --- public/js/controllers/groupsCtrl.js | 3 +++ views/shared/modals/invite-friends.jade | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/public/js/controllers/groupsCtrl.js b/public/js/controllers/groupsCtrl.js index 6f9559a9d7..1b3ef7fba2 100644 --- a/public/js/controllers/groupsCtrl.js +++ b/public/js/controllers/groupsCtrl.js @@ -74,6 +74,9 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', ' } $scope.emails = [{name:"",email:""},{name:"",email:""}]; + //$scope.inviteLink = function(obj){ + // return window.env.BASE_URL + '?partyInvite=' + encodeURIComponent(JSON.stringify(obj)); + //} $scope.inviteEmails = function(emails){ $http.post('/api/v2/user/social/invite-friends', emails).success(function(){ Notification.text("Invitations sent!"); diff --git a/views/shared/modals/invite-friends.jade b/views/shared/modals/invite-friends.jade index 516d425741..87b7e36215 100644 --- a/views/shared/modals/invite-friends.jade +++ b/views/shared/modals/invite-friends.jade @@ -2,7 +2,7 @@ script(type='text/ng-template', id='modals/invite-friends.html') .modal-header h4 Invite Friends .modal-body - p.alert.alert-info Invite friends to your party who already play HabitRPG. Have them send you their User ID and enter it here. + p.alert.alert-info Invite friends by User ID here. form.form-inline(ng-submit='invite(party)') //-.alert.alert-danger(ng-show='_groupError') {{_groupError}} @@ -13,7 +13,7 @@ script(type='text/ng-template', id='modals/invite-friends.html') hr - p.alert.alert-info Invite friends to your party who don't yet play HabitRPG. This will send them an invite email, and automatically invite them to your party. + p.alert.alert-info Invite friends by email. If they join via your email, they'll automatically be invited to your party. table.table.table-striped thead @@ -34,6 +34,11 @@ script(type='text/ng-template', id='modals/invite-friends.html') td(colspan=2) button.btn.btn-primary.pull-right(ng-click='inviteEmails(emails)') Invite New User(s) + //- + hr + p.alert.alert-info Or share this link (copy/paste): + input.form-control(type='text', ng-value='inviteLink({id: party._id, inviter: user._id, name: party.name})') + .modal-footer button.btn.btn-default(ng-click='$close()') Close