feat(invite-friends): update wording on invitations. Add commented-out

sample code on copy-link (it's not working)
This commit is contained in:
Tyler Renelle
2014-11-13 12:53:07 -07:00
parent 02328fcf58
commit 524e0514a1
2 changed files with 10 additions and 2 deletions
+3
View File
@@ -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!");
+7 -2
View File
@@ -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 <strong>already play</strong> HabitRPG. Have them send you their <a href='http://habitrpg.wikia.com/wiki/API_Options' target='_blank'>User ID</a> and enter it here.
p.alert.alert-info Invite friends by <a href='http://habitrpg.wikia.com/wiki/API_Options' target='_blank'>User ID</a> 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 <strong>don't yet play</strong> 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