<div class="input-group stream-privacy-values">
    <div class="alert stream-privacy-status"></div>
    <label>{{t 'Who can access the stream?'}}
        {{> ../help_link_widget link="/help/stream-permissions" }}
    </label>
    {{#each stream_privacy_policy_values}}
        <div class="radio-input-parent">
            <label class="radio">
                <input type="radio" name="privacy" value="{{ this.code }}" {{#if (eq this.code ../stream_privacy_policy) }}checked{{/if}} />
                <b>{{ this.name }}:</b> {{ this.description }}
            </label>
        </div>
    {{/each}}
</div>

{{#if ask_to_announce_stream}}
    <div id="announce-new-stream">
        <label class="checkbox">
            <input type="checkbox" name="announce" value="announce" checked />
            <span></span>
            {{t "Announce stream" }}
        </label>
        <span class="fa fa-info-circle settings-info-icon" aria-hidden="true" id="announce-stream-docs"></span>
    </div>
{{/if}}

<div class="input-group">
    <label class="dropdown-title">{{t 'Who can post to the stream?'}}
        {{> ../help_link_widget link="/help/stream-sending-policy" }}
    </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)}}
<div>
    <label class="stream-title">{{t "Message retention for stream" }}
        {{> ../help_link_widget link="/help/message-retention-policy" }}
    </label>

    {{> ../settings/upgrade_tip_widget}}

    <div class="input-group inline-block message-retention-setting-group">
        <div class="dropdown-title">{{t "Message retention period" }}
            <i class="fa fa-info-circle settings-info-icon stream_message_retention_tooltip tippy-zulip-tooltip" aria-hidden="true" data-tippy-content="{{t 'Only owners can change stream message retention policy.' }}"></i>
        </div>
        <select name="stream_message_retention_setting"
          class="stream_message_retention_setting prop-element"
          {{#if disable_message_retention_setting}}disabled{{/if}}>
            <option value="realm_default">{{#tr}}Use organization level settings {org_level_message_retention_setting}{{/tr}}</option>
            <option value="unlimited">{{t 'Retain forever' }}</option>
            <option value="retain_for_period">{{t 'Retain for N days after posting' }}</option>
        </select>

        <div class="dependent-inline-block stream-message-retention-days-input">
            <label class="inline-block">
                {{t 'N' }}:
            </label>
            <input type="text" autocomplete="off"
              name="stream-message-retention-days"
              class="stream-message-retention-days"
              value="{{ stream_message_retention_days }}"
              {{#if disable_message_retention_setting}}disabled{{/if}}/>
        </div>
    </div>
</div>
{{/if}}
