WIP(party-page): Restore Guild invite modal

This commit is contained in:
Sabe Jones
2015-08-14 13:17:19 -05:00
parent 572e64e3ed
commit c4c563aca1
3 changed files with 41 additions and 3 deletions

View File

@@ -103,7 +103,7 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '
};
$scope.openInviteModal = function(group){
$rootScope.openModal('invite-friends', {controller:'InviteToGroupCtrl', resolve:
$rootScope.openModal('invite-guild', {controller:'InviteToGroupCtrl', resolve:
{injectedGroup: function(){
return group;
}}});

View File

@@ -100,7 +100,7 @@
function inviteOrStartParty(group) {
if (group.type === "party" || $location.$$path === "/options/groups/party") {
$rootScope.openModal('invite-friends', {
$rootScope.openModal('invite-party', {
controller:'InviteToGroupCtrl',
resolve: {
injectedGroup: function(){ return group; }

View File

@@ -1,4 +1,42 @@
script(type='text/ng-template', id='modals/invite-friends.html')
script(type='text/ng-template', id='modals/invite-guild.html')
.modal-header
h4=env.t('inviteFriends')
.modal-body
p.alert.alert-info!=env.t('inviteAlertInfo')
form.form-inline(ng-submit='invite()')
.form-group
input.form-control(type='text', placeholder=env.t('userId'), ng-model='invitee')
| 
button.btn.btn-primary(type='submit')=env.t('inviteExistUser')
hr
p.alert.alert-info=env.t('inviteByEmail')
form.form-horizontal(ng-submit='inviteEmails()')
table.table.table-striped
thead
tr
th=env.t('name')
th=env.t('email')
tbody
tr(ng-repeat='email in emails')
td
input.form-control(type='text', ng-model='email.name')
td
input.form-control(type='email', ng-model='email.email')
tr
td(colspan=2)
a.btn.btn-xs.pull-right(ng-click='emails = emails.concat([{name:"",email:""}])')
i.glyphicon.glyphicon-plus
tr
td.form-group(colspan=2)
label.col-sm-1.control-label=env.t('byColon')
.col-sm-7
input.form-control(type='text', ng-model='inviter')
.col-sm-4
button.btn.btn-primary.btn-wrap(type='submit')=env.t('inviteNewUsers')
.modal-footer
button.btn.btn-default(ng-click='$close()')=env.t('close')
script(type='text/ng-template', id='modals/invite-party.html')
.modal-body
div(ng-if='!group._id')
h4(style='margin-top:0')=env.t('nameYourParty')