Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

stream-settings: Extract privacy type template in a new file.

Sahil Batra819084d0a157
diff --git a/web/templates/stream_settings/channel_type.hbs b/web/templates/stream_settings/channel_type.hbs
new file mode 100644
index 00000000000..103f34f1578
--- /dev/null
+++ b/web/templates/stream_settings/channel_type.hbs
@@ -0,0 +1,17 @@
+<div class="input-group stream-privacy-values">
+ <div class="alert stream-privacy-status"></div>
+ <label>{{t 'Who can access this channel'}}
+ {{> ../help_link_widget link="/help/channel-permissions" }}
+ </label>
+
+ <div class="stream-privacy_choices prop-element" id="{{prefix}}stream_privacy" data-setting-widget-type="radio-group" data-setting-choice-type="string">
+ {{#each stream_privacy_policy_values}}
+ <div class="settings-radio-input-parent">
+ <label class="radio">
+ <input type="radio" name="privacy" value="{{ this.code }}" {{#if (eq this.code ../stream_privacy_policy) }}checked{{/if}} />
+ <b class="highlighted-element">{{ this.name }}:</b> {{ this.description }}
+ </label>
+ </div>
+ {{/each}}
+ </div>
+</div>
diff --git a/web/templates/stream_settings/stream_permissions.hbs b/web/templates/stream_settings/stream_permissions.hbs
index 4ad0f20e3e5..5102585ac89 100644
--- a/web/templates/stream_settings/stream_permissions.hbs
+++ b/web/templates/stream_settings/stream_permissions.hbs
@@ -8,23 +8,7 @@
<div class="stream-permissions-warning-banner"></div>
{{/if}}
- <div class="input-group stream-privacy-values">
- <div class="alert stream-privacy-status"></div>
- <label>{{t 'Who can access this channel'}}
- {{> ../help_link_widget link="/help/channel-permissions" }}
- </label>
-
- <div class="stream-privacy_choices prop-element" id="{{prefix}}stream_privacy" data-setting-widget-type="radio-group" data-setting-choice-type="string">
- {{#each stream_privacy_policy_values}}
- <div class="settings-radio-input-parent">
- <label class="radio">
- <input type="radio" name="privacy" value="{{ this.code }}" {{#if (eq this.code ../stream_privacy_policy) }}checked{{/if}} />
- <b class="highlighted-element">{{ this.name }}:</b> {{ this.description }}
- </label>
- </div>
- {{/each}}
- </div>
- </div>
+ {{> channel_type .}}
{{#if ask_to_announce_stream}}
<div id="announce-new-stream">