mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	subscriptions: Edit copy for the new stream creation confirmation flow.
The new text is a bit simpler and clearer. We also decrease the threshhold for this page to 50 subscribers.
This commit is contained in:
		@@ -939,7 +939,7 @@ function render(template_name, args) {
 | 
			
		||||
    global.write_handlebars_output("subscription_invites_warning_modal", html);
 | 
			
		||||
 | 
			
		||||
    var button = $(html).find(".close-invites-warning-modal").last();
 | 
			
		||||
    assert.equal(button.text(), 'Oops! Let me change it');
 | 
			
		||||
    assert.equal(button.text(), 'Go back');
 | 
			
		||||
}());
 | 
			
		||||
 | 
			
		||||
(function subscription_settings() {
 | 
			
		||||
 
 | 
			
		||||
@@ -165,13 +165,6 @@ function create_stream() {
 | 
			
		||||
    );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function show_large_invites_warning(count) {
 | 
			
		||||
    var invites_warning_modal = templates.render('subscription_invites_warning_modal');
 | 
			
		||||
    $('#stream-creation').append(invites_warning_modal);
 | 
			
		||||
    var confirm_button = $('#invites-warning-overlay').find('.confirm-invites-warning-modal');
 | 
			
		||||
    confirm_button.text(i18n.t('Invite __count__ users!', {count: count}));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
exports.new_stream_clicked = function (stream) {
 | 
			
		||||
    // this changes the tab switcher (settings/preview) which isn't necessary
 | 
			
		||||
    // to a add new stream title.
 | 
			
		||||
@@ -328,8 +321,11 @@ $(function () {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        var principals = get_principals();
 | 
			
		||||
        if (principals.length > 100) {
 | 
			
		||||
            show_large_invites_warning(principals.length);
 | 
			
		||||
        if (principals.length >= 50) {
 | 
			
		||||
            var invites_warning_modal = templates.render('subscription_invites_warning_modal',
 | 
			
		||||
                                                         {stream_name: stream,
 | 
			
		||||
                                                          count: principals.length});
 | 
			
		||||
            $('#stream-creation').append(invites_warning_modal);
 | 
			
		||||
        } else {
 | 
			
		||||
            create_stream();
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -2,14 +2,14 @@
 | 
			
		||||
    <div class="modal" id="invites-warning-modal" tabindex="-1" role="dialog" aria-labelledby="invites-warning-label" aria-hidden="true">
 | 
			
		||||
        <div class="modal-header">
 | 
			
		||||
            <button type="button" class="close close-invites-warning-modal" aria-hidden="true">×</button>
 | 
			
		||||
            <h3 id="invites-warning-label">{{t "Confirm invites" }}</h3>
 | 
			
		||||
            <h3 id="invites-warning-label">{{t "Large number of subscribers" }}</h3>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="modal-body">
 | 
			
		||||
            <p>{{t 'You are going to invite a large numbers of users! Are you sure?' }}</p>
 | 
			
		||||
            <p>{{#tr this}}Are you sure you want to create stream '__stream_name__' and subscribe __count__ users to it?{{/tr}}</p>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="modal-footer">
 | 
			
		||||
            <button class="btn btn-default close-invites-warning-modal" aria-hidden="true">{{t "Oops! Let me change it" }}</button>
 | 
			
		||||
            <button class="btn btn-warning confirm-invites-warning-modal"></button>
 | 
			
		||||
            <button class="btn btn-default close-invites-warning-modal" aria-hidden="true">{{t "Go back" }}</button>
 | 
			
		||||
            <button class="btn btn-warning confirm-invites-warning-modal">{{#tr this}}Yes, subscribe __count__ users!{{/tr}}</button>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user