mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
invite: Add setup tips to user invite modal.
We include setup tips to the user invite modal for the following cases: At the top of the invite modal - If the org description is missing. - If the org profile picture is missing. - If the custom profile fields have not been added, where we also provide a link to the default user settings for the time being, until we have a better way to compare if the default user settings have been changed. We also use the new banner ui to display these tips. In doing so, we extract the banner component from `compose_banner.hbs` to `popover_banner.hbs`, removing any compose specific code from the banner component. Fixes: #24262 Co-authored-by: Lalit <lalitkumarsingh3716@gmail.com>
This commit is contained in:
30
web/templates/modal_banner/invite_tips_banner.hbs
Normal file
30
web/templates/modal_banner/invite_tips_banner.hbs
Normal file
@@ -0,0 +1,30 @@
|
||||
{{#unless realm_has_description}}
|
||||
{{#> modal_banner }}
|
||||
<p class="banner_message">
|
||||
{{#tr}}
|
||||
You may want to <z-link>configure</z-link> your organization's login page prior to inviting users.
|
||||
{{#*inline "z-link"}}<a href="#organization/organization-profile">{{> @partial-block}}</a>{{/inline}}
|
||||
{{/tr}}
|
||||
</p>
|
||||
{{/modal_banner}}
|
||||
{{else unless realm_has_user_set_icon}}
|
||||
{{#> modal_banner }}
|
||||
<p class="banner_message">
|
||||
{{#tr}}
|
||||
You may want to <z-link>upload a profile picture</z-link> for your organization prior to inviting users.
|
||||
{{#*inline "z-link"}}<a href="#organization/organization-profile">{{> @partial-block}}</a>{{/inline}}
|
||||
{{/tr}}
|
||||
</p>
|
||||
{{/modal_banner}}
|
||||
{{/unless}}
|
||||
{{#unless realm_has_custom_profile_fields}}
|
||||
{{#> modal_banner }}
|
||||
<p class="banner_message">
|
||||
{{#tr}}
|
||||
You may want to configure <z-link-1>default new user settings</z-link-1> and <z-link-2>custom profile fields</z-link-2> prior to inviting users.
|
||||
{{#*inline "z-link-1"}}<a href="#organization/organization-level-user-defaults">{{> @partial-block}}</a>{{/inline}}
|
||||
{{#*inline "z-link-2"}}<a href="#organization/profile-field-settings">{{> @partial-block}}</a>{{/inline}}
|
||||
{{/tr}}
|
||||
</p>
|
||||
{{/modal_banner}}
|
||||
{{/unless}}
|
||||
15
web/templates/modal_banner/modal_banner.hbs
Normal file
15
web/templates/modal_banner/modal_banner.hbs
Normal file
@@ -0,0 +1,15 @@
|
||||
<div class="main-view-banner {{banner_type}} {{classname}}">
|
||||
<div class="main-view-banner-elements-wrapper {{#if button_text}}banner-contains-button{{/if}}">
|
||||
{{#if banner_text}}
|
||||
<p class="banner_content">{{banner_text}}</p>
|
||||
{{else}}
|
||||
<div class="banner_content">{{> @partial-block}}</div>
|
||||
{{/if}}
|
||||
{{#if button_text}}
|
||||
<button class="main-view-banner-action-button{{#if hide_close_button}} right_edge{{/if}}">{{button_text}}</button>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#unless hide_close_button}}
|
||||
<a role="button" class="zulip-icon zulip-icon-close main-view-banner-close-button"></a>
|
||||
{{/unless}}
|
||||
</div>
|
||||
Reference in New Issue
Block a user