From 4b821a590eb1fb787e5e93a1f0d512c65b9210c4 Mon Sep 17 00:00:00 2001 From: Angel Lim Date: Thu, 4 Aug 2016 01:45:58 -0700 Subject: [PATCH] Can add staff members by WCA id --- client/modals.js | 3 ++- client/pages/admin/editStaff.jsx | 4 ++-- templates/editStaff.html | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/client/modals.js b/client/modals.js index 69f8a58..ac1a84f 100644 --- a/client/modals.js +++ b/client/modals.js @@ -5,7 +5,8 @@ Template.ccmSaveButton.helpers({ }, disabled: function() { // Treat saveable as true by default (not passed in). - return !(this.saveable || _.isUndefined(this.saveable)); + return false; // Enable the save button + // return !(this.saveable || _.isUndefined(this.saveable)); }, text: function() { return this.text || "Save"; diff --git a/client/pages/admin/editStaff.jsx b/client/pages/admin/editStaff.jsx index ad83c0f..a176681 100644 --- a/client/pages/admin/editStaff.jsx +++ b/client/pages/admin/editStaff.jsx @@ -51,8 +51,8 @@ Template.modalAddStaff.events({ 'click button[type="submit"]': function(e, template) { let $input = template.$('input.select-user'); let selectize = $input[0].selectize; - - let wcaUserIds = selectize.getValue().split(","); + // let wcaUserIds = selectize.getValue().split(","); + let wcaUserIds = [selectize.lastQuery]; let data = Template.parentData(1); Meteor.call('addStaffMembers', data.competitionId, wcaUserIds, function(error) { if(error) { diff --git a/templates/editStaff.html b/templates/editStaff.html index 09f8137..e0979e2 100644 --- a/templates/editStaff.html +++ b/templates/editStaff.html @@ -19,7 +19,7 @@ {{/ccmHeader}}