From e98b4b9f1e1561ade3c18bd47bb1fa88db007202 Mon Sep 17 00:00:00 2001 From: Waseem Daher Date: Wed, 6 Feb 2013 20:15:12 -0500 Subject: [PATCH] invite: Draw lock by invite-only streams (and don't select by default). (imported from commit 1ad8a033801f70d3c6491691eebef79bbce82b77) --- zephyr/jstemplates/invite_subscription.html | 6 ++++-- zephyr/static/js/invite.js | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/zephyr/jstemplates/invite_subscription.html b/zephyr/jstemplates/invite_subscription.html index 873375ef17..05b808d12a 100644 --- a/zephyr/jstemplates/invite_subscription.html +++ b/zephyr/jstemplates/invite_subscription.html @@ -2,9 +2,11 @@ Check all | Uncheck all
- {{#each subscriptions}} + {{#each streams}} {{/each}}
diff --git a/zephyr/static/js/invite.js b/zephyr/static/js/invite.js index 0a6ec33fd8..122ee12b91 100644 --- a/zephyr/static/js/invite.js +++ b/zephyr/static/js/invite.js @@ -7,8 +7,11 @@ function update_subscription_checkboxes() { // stream list has actually changed; that way, the settings of the // checkboxes are saved from invocation to invocation (which is // nice if I want to invite a bunch of people at once) - $('#streams_to_add').html(templates.invite_subscription({subscriptions: - subs.subscribed_streams()})); + var streams = []; + $.each(subs.subscribed_streams(), function (index, value) { + streams.push({name: value, invite_only: subs.get_invite_only(value)}); + }); + $('#streams_to_add').html(templates.invite_subscription({streams: streams})); } function reset_error_messages() {