mirror of https://github.com/zulip/zulip.git
invite: Draw lock by invite-only streams (and don't select by default).
(imported from commit 1ad8a033801f70d3c6491691eebef79bbce82b77)
This commit is contained in:
parent
a44aa44e6c
commit
e98b4b9f1e
|
@ -2,9 +2,11 @@
|
||||||
<a href="#" onclick="invite.set_all_streams(event, true);">Check all</a> |
|
<a href="#" onclick="invite.set_all_streams(event, true);">Check all</a> |
|
||||||
<a href="#" onclick="invite.set_all_streams(event, false);">Uncheck all</a>
|
<a href="#" onclick="invite.set_all_streams(event, false);">Uncheck all</a>
|
||||||
<div id="stream-checkboxes">
|
<div id="stream-checkboxes">
|
||||||
{{#each subscriptions}}
|
{{#each streams}}
|
||||||
<label class="checkbox">
|
<label class="checkbox">
|
||||||
<input type="checkbox" name="stream" value="{{this}}" checked="true"> {{this}}
|
<input type="checkbox" name="stream" value="{{name}}"
|
||||||
|
{{#unless invite_only}}checked="true"{{/unless}}> {{name}}
|
||||||
|
{{#if invite_only}}<i class="icon-lock"></i>{{/if}}
|
||||||
</label>
|
</label>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,8 +7,11 @@ function update_subscription_checkboxes() {
|
||||||
// stream list has actually changed; that way, the settings of the
|
// stream list has actually changed; that way, the settings of the
|
||||||
// checkboxes are saved from invocation to invocation (which is
|
// checkboxes are saved from invocation to invocation (which is
|
||||||
// nice if I want to invite a bunch of people at once)
|
// nice if I want to invite a bunch of people at once)
|
||||||
$('#streams_to_add').html(templates.invite_subscription({subscriptions:
|
var streams = [];
|
||||||
subs.subscribed_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() {
|
function reset_error_messages() {
|
||||||
|
|
Loading…
Reference in New Issue