mirror of https://github.com/zulip/zulip.git
settings: Eliminate remaining NEW_USER_BOT code.
I somehow missed this when removing the rest of the custom NEW_USER_BOT logic. This may fix a Casper test that has been failing.
This commit is contained in:
parent
9ce9c2f9db
commit
5c1dd162be
|
@ -502,11 +502,6 @@ function test_extract_property_name() {
|
||||||
assert.equal(stream_id, 75);
|
assert.equal(stream_id, 75);
|
||||||
return { name: 'some_stream' };
|
return { name: 'some_stream' };
|
||||||
};
|
};
|
||||||
page_params.new_user_bot_configured = false;
|
|
||||||
settings_org.render_signup_notifications_stream_ui(75);
|
|
||||||
assert.equal(elem.text(), 'translated: Disabled');
|
|
||||||
assert(elem.hasClass('text-warning'));
|
|
||||||
page_params.new_user_bot_configured = true;
|
|
||||||
settings_org.render_signup_notifications_stream_ui(75);
|
settings_org.render_signup_notifications_stream_ui(75);
|
||||||
assert.equal(elem.text(), '#some_stream');
|
assert.equal(elem.text(), '#some_stream');
|
||||||
assert(!elem.hasClass('text-warning'));
|
assert(!elem.hasClass('text-warning'));
|
||||||
|
|
|
@ -51,7 +51,6 @@ function _setup_page() {
|
||||||
realm_message_retention_days: page_params.realm_message_retention_days,
|
realm_message_retention_days: page_params.realm_message_retention_days,
|
||||||
realm_allow_edit_history: page_params.realm_allow_edit_history,
|
realm_allow_edit_history: page_params.realm_allow_edit_history,
|
||||||
language_list: page_params.language_list,
|
language_list: page_params.language_list,
|
||||||
new_user_bot_configured: page_params.new_user_bot_configured,
|
|
||||||
realm_default_language: page_params.realm_default_language,
|
realm_default_language: page_params.realm_default_language,
|
||||||
realm_waiting_period_threshold: page_params.realm_waiting_period_threshold,
|
realm_waiting_period_threshold: page_params.realm_waiting_period_threshold,
|
||||||
realm_notifications_stream_id: page_params.realm_notifications_stream_id,
|
realm_notifications_stream_id: page_params.realm_notifications_stream_id,
|
||||||
|
|
|
@ -278,7 +278,7 @@ exports.render_signup_notifications_stream_ui = function (stream_id) {
|
||||||
|
|
||||||
var name = stream_data.maybe_get_stream_name(stream_id);
|
var name = stream_data.maybe_get_stream_name(stream_id);
|
||||||
|
|
||||||
if (!name || !page_params.new_user_bot_configured) {
|
if (!name) {
|
||||||
elem.text(i18n.t("Disabled"));
|
elem.text(i18n.t("Disabled"));
|
||||||
elem.addClass("text-warning");
|
elem.addClass("text-warning");
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -172,7 +172,7 @@
|
||||||
{{t "New user notifications:" }}
|
{{t "New user notifications:" }}
|
||||||
<span class="dropup actual-dropdown-menu" id="id_realm_signup_notifications_stream"
|
<span class="dropup actual-dropdown-menu" id="id_realm_signup_notifications_stream"
|
||||||
name="realm_signup_notifications_stream" aria-labelledby="realm_signup_notifications_stream_label">
|
name="realm_signup_notifications_stream" aria-labelledby="realm_signup_notifications_stream_label">
|
||||||
<button class="button small rounded dropdown-toggle" data-toggle="dropdown" {{#unless new_user_bot_configured }} disabled="disabled" {{/unless}}>
|
<button class="button small rounded dropdown-toggle" data-toggle="dropdown">
|
||||||
<span id="realm_signup_notifications_stream_name"></span>
|
<span id="realm_signup_notifications_stream_name"></span>
|
||||||
<i class="fa fa-pencil"></i>
|
<i class="fa fa-pencil"></i>
|
||||||
</button>
|
</button>
|
||||||
|
@ -185,13 +185,8 @@
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
{{#if is_admin }}
|
{{#if is_admin }}
|
||||||
{{#if new_user_bot_configured }}
|
|
||||||
<a class="signup-notifications-stream-disable">{{t "[Disable]" }}</a>
|
<a class="signup-notifications-stream-disable">{{t "[Disable]" }}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
|
||||||
<i class="icon-vector-question-sign signup_notification_stream_tooltip" data-toggle="tooltip"
|
|
||||||
{{#if new_user_bot_configured}}style="display:none" {{/if}}
|
|
||||||
title="{{t 'You must configure a "new user" bot before setting a stream for signup notifications.' }}"/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in New Issue