mirror of https://github.com/zulip/zulip.git
stream_types: Remove new-style class in stream_types.hbs.
Previously, the stream_edit modal relied on the new-style class to set the margin-bottom value for stream-message-retention-days-input to 0, in order to override the value set by bootstrap. The class new-style is unhelpful because of its generic name, and in addition, time has / will eroded away the significance of its name. Hence, this commit adds the necessary rules to subscriptions.css and removes the new-style class. In order to make this change, this commit adds a block to `subscriptions.css` with the selector `#stream_privacy_modal .stream-message-retention-days-input input[type="text"]` one important rule that this adds is `height: inherit;`. Adding this rule solves a minor UI glitch where selecting "retain N days after posting" would cause the save and cancel buttons to jump down by a pixel or so. Fixes: #20222.
This commit is contained in:
parent
d1aefd4207
commit
53a5942ab3
|
@ -1086,6 +1086,13 @@
|
|||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#stream_privacy_modal .stream-message-retention-days-input input[type="text"] {
|
||||
border-radius: 5px;
|
||||
box-shadow: none;
|
||||
margin: 0;
|
||||
height: inherit;
|
||||
}
|
||||
|
||||
@media (width < $lg_min) {
|
||||
.subscriptions-container {
|
||||
max-width: 95%;
|
||||
|
|
|
@ -1,64 +1,62 @@
|
|||
<div class="new-style">
|
||||
<div class="input-group stream-privacy-values">
|
||||
<div class="alert stream-privacy-status"></div>
|
||||
<h4>{{t 'Who can access the stream?'}}
|
||||
{{> ../help_link_widget link="/help/stream-permissions" }}
|
||||
</h4>
|
||||
{{#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 class="input-group stream-privacy-values">
|
||||
<div class="alert stream-privacy-status"></div>
|
||||
<h4>{{t 'Who can access the stream?'}}
|
||||
{{> ../help_link_widget link="/help/stream-permissions" }}
|
||||
</h4>
|
||||
{{#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>
|
||||
|
||||
<div class="input-group">
|
||||
<h4>{{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}}
|
||||
</div>
|
||||
|
||||
{{#if (or is_owner is_stream_edit)}}
|
||||
<div>
|
||||
<h4>{{t "Message retention for stream" }}
|
||||
{{> ../help_link_widget link="/help/message-retention-policy" }}
|
||||
</h4>
|
||||
|
||||
{{> ../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" class="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}}
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<h4>{{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}}
|
||||
</div>
|
||||
|
||||
{{#if (or is_owner is_stream_edit)}}
|
||||
<div>
|
||||
<h4>{{t "Message retention for stream" }}
|
||||
{{> ../help_link_widget link="/help/message-retention-policy" }}
|
||||
</h4>
|
||||
|
||||
{{> ../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" class="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}}
|
||||
|
|
Loading…
Reference in New Issue