Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
stream_settings: Implement dropdown widget for "stream post policy".
NerdyLucifer5f472b16074a
diff --git a/static/js/stream_create.js b/static/js/stream_create.jsindex 27c73c43ee0..cf75a1bdf17 100644--- a/static/js/stream_create.js+++ b/static/js/stream_create.js@@ -196,7 +196,7 @@ function create_stream() {data.history_public_to_subscribers = JSON.stringify(history_public_to_subscribers);const stream_post_policy = Number.parseInt(- $("#stream_creation_form input[name=stream-post-policy]:checked").val(),+ $("#stream_creation_form select[name=stream-post-policy]").val(),10,);diff --git a/static/js/stream_edit.js b/static/js/stream_edit.jsindex dc7ccb9bc8e..2a24731438f 100644--- a/static/js/stream_edit.js+++ b/static/js/stream_edit.js@@ -379,7 +379,7 @@ function change_stream_privacy(e) {const privacy_setting = $("#stream_privacy_modal input[name=privacy]:checked").val();const stream_post_policy = Number.parseInt(- $("#stream_privacy_modal input[name=stream-post-policy]:checked").val(),+ $("#stream_privacy_modal select[name=stream-post-policy]").val(),10,);diff --git a/static/templates/stream_settings/stream_types.hbs b/static/templates/stream_settings/stream_types.hbsindex a8a63deadb3..ab192e4d9f1 100644--- a/static/templates/stream_settings/stream_types.hbs+++ b/static/templates/stream_settings/stream_types.hbs@@ -25,17 +25,16 @@{{/if}}<div class="input-group">- <h4>{{t 'Who can post to the stream?'}}+ <label>{{t 'Who can post to the stream?'}}{{> ../help_link_widget link="/help/stream-sending-policy" }}- </h4>- {{#each stream_post_policy_values}}- <div class="radio-input-parent">- <label class="radio">- <input type="radio" name="stream-post-policy" value="{{ this.code }}" {{#if (eq this.code ../stream_post_policy) }}checked{{/if}} />- {{ this.description }}- </label>- </div>- {{/each}}+ </label>+ <select name="stream-post-policy" class="stream_post_policy_setting prop-element">+ {{#each stream_post_policy_values}}+ <option value="{{this.code}}" {{#if (eq this.code ../stream_post_policy) }}selected{{/if}}>+ {{ this.description}}+ </option>+ {{/each}}+ </select></div>{{#if (or is_owner is_stream_edit)}}