Commit Graph

310 Commits

Author SHA1 Message Date
Sahil Batra 39c6a01c74 settings: Fix updating realm join restrictions setting.
This commit fixes the bug when updating
"Restrict email domains of new users?" setting by
adding data-setting-widget-type attribute to the select
element as get_input_element_value now expects every
element to have that attribute after 64c8262eaf.

Due to this change, we also need to update the code in
populate_data_for_request function to not send invalid
parameter in the request. This change resulted in some
refactoring which now helps in not passing in the
"disallow_disposable_email_addresses" and
"email_restricted_to_domains" when these fields are
not changed.
2024-05-21 21:20:50 -07:00
Sahil Batra ed8d7ed864 settings: Fix code for updating realm default language.
This commit fixes the bug when updating realm default
language setting by adding data-setting-widget-type
attribute to the relevant element with "prop-element"
class as get_input_element_value now expects every
element passed to it to have that attr after 64c8262eaf.

As a result we can now remove the code from
get_complete_data_for_subsection to handle realm
default language and just let get_input_element_value
handle it and it also helps in passing the parameter
unnecessary to request when the setting is not changed.
2024-05-21 21:20:50 -07:00
Lauryn Menard 7a61044a03 org-settings: Update tab for default channel settings.
Updates instances of default-streams-list to instead be
default-channels-list as the data-section for the organization
settings overlay is part of the URL hash.
2024-05-15 12:18:36 -07:00
Lauryn Menard d97571e1df help: Rename and redirect manage-inactive-streams for channel. 2024-05-03 12:55:39 -07:00
Sahil Batra a37deb9fbc settings: Use settings-field-label class in language widget label.
We now use "settings-field-label" class in the label of language
selection widget instead of "title" class to add the bottom margin.
2024-05-03 09:51:36 -07:00
Sahil Batra 62d2b93079 settings: Remove dropdown-title class.
We now use "settings-field-label" and "modal-field-label"
class on label elements in settings and modals respectively
to add the bottom margin which was previously done by
"dropdown-title" class as it is better to have more
generic names to use on label for all type of inputs.
2024-05-03 09:51:36 -07:00
Sahil Batra 040486776c modals: Add bottom margin to label elements.
This commit adds bottom margin to label elements of
different inputs by adding "modal-field-label" class
to the label elements. Some of them already have the
margin due to having dropdown-title class.
2024-05-03 09:51:36 -07:00
Sahil Batra 8c6e71a195 settings: Add bottom margin to label elements.
This commit adds bottom margin to label elements of
settings inputs in personal, organization, stream
and group settings using the recently added
"settings-field-label" class.

Most of the settings are dropdown settings, so the
label for them already had a margin as they use
"dropdown-title" class.
2024-05-03 09:51:36 -07:00
Sahil Batra e7a4790d33 settings: Remove extraneous hr element below "Field choices".
There is no need to have hr element below the "Field choices"
heading in custom profile edit form and this also makes it
consistent with the new custom profile field form.
2024-05-03 09:51:36 -07:00
Sahil Batra 916ea58aaf settings: Remove unused classes from label elements.
This commit removes classes like "title", "input-label"
and "emoji-theme" from label elements in settings and
modals as these are classes are neither used in JS
nor to apply any CSS.
2024-05-03 09:51:36 -07:00
Karl Stolley 6f4a58fe71 settings: Place and style .settings-field-label on Profile. 2024-05-03 09:51:36 -07:00
Karl Stolley 29508e54b0 settings: Extend use of settings-profile-user-field-hint class. 2024-05-03 09:51:36 -07:00
Karl Stolley 38f51683a4 settings: Improve settings-profile-user-field-hint class.
This slight transposition makes it read closer to the adjacent
`settings-profile-user-field` class.
2024-05-03 09:51:36 -07:00
Shubham Padia 2c0518ff69 custom_profile_fields: Don't send extra params during editing in dialog.
Fixes #29750.
- We introduced an argument called `custom_profile_field` similar to
`sub` and `group` in `check_property_changed` and
`populate_data_for_request`.
- We could've introduced `field` param in `get_input_element_value`,
but I've kept it clean since it didn't have any similar kind of data input.
The performance difference due to this should be negligible.
- Introduced a span that would be parent to all `field_data` params
since it is needed by the diff infrastructure.
- If there is no data to be changed, we display our success status
without sending the PATCH request since save changed button is
always enabled.
2024-04-26 18:13:04 -07:00
Shubham Padia d6cf423dfc custom_profile_fields: Remove unnecessary `-{{id}}` suffix.
Removes unnecessary suffix from `edit_custom_profile_field_form.hbs`.
Conversation here:
https://chat.zulip.org/#narrow/stream/6-frontend/topic/Name.2Fhint.2Fetc.20optional.20in.20custom.20profile.20fields.2E/near/1784450
2024-04-26 18:13:04 -07:00
Lauryn Menard 4dcb0258a5 web-i18n: Update frontend translated strings for stream rename channel.
Updates translated strings in web/ that do not need updates to any
tests. The majority of these strings are also unique to the file/
template that they are in. A few have overlap with one other file.

Some changes here update placeholders/variables in these strings to
no longer use stream so that all the translation updates for this
rename happen at the same time.

The exception to this are cases of "<z-stream>" placeholders in
these translated strings.

Part of the stream to channel rename project.
2024-04-24 14:35:04 -07:00
Lauryn Menard d7f9f8333e web-stream-settings: Update strings for stream rename channel.
Updates a chunk of translated strings that overlap between files,
with the streams settings overlay being the starting point for
finding these strings, to use channel instead of stream.

Part of stream to channel rename project.
2024-04-24 14:35:04 -07:00
sujal shah f144400d46 settings: Change links to user_pills in invitations seciton.
Previously, links were displayed for the user's name,
but now they are presented as pills. These pills are rendered
using the user_display_only_pill.hbs template.
To obtain the avatar of a user,
the small_avatar_url_for_person function is utilized.
2024-04-20 16:59:45 -07:00
sujal shah 01e898252b setting_ui: Fix sorting by "Invited by" column.
Previously, the sorting was broken due to
incorrect referencing of the property.
The code has been updated to use the "referrer_name"
property instead of "ref".
2024-04-20 12:28:39 -07:00
Shubham Padia 3f6ceba39a settings_users: Add role filter to user list.
Fixes #18617.
- The role filter is added to both active and deactivated user
list. The original plan was to introduce a multi select checkbox
dropdown for the roles, but since that component is not ready yet,
we will use the dropdown component for the first iteration.
- To accomodate multiple filters, we have used an approach
similar to the one in recent_view_ui.js where we use dropdown
callback function and on("input") event on text search to set the
filter value in memory. The predicate functions uses these filters.
- We have also changed the default message when there are no
users to show to reflect `filters` instead of `current filter`.
2024-04-10 13:45:06 -07:00
Pratik 6b31823c23 right_sidebar: Update invite modal label.
This commit updates the user invitation terminology in the right
sidebar, user invitation modal, and settings, to clarify exactly what
sort of invitation this is.

Fixes #29582.
2024-04-03 11:45:33 -07:00
roanster007 acc7444575 organization-permissions: Add help page link for User Identity section.
This commit adds the /help link to the User Identity section heading
of the Organization Permissions, linking to /help/restrict-name-and-
email-changes.
2024-04-03 11:01:52 -07:00
Sahil Batra e595b9d611 settings: Remove template for group creation modal.
We no longer use this file as we have removed the old groups
UI from "#settings" overlay and instead now use the new
"#groups" overlay UI.
2024-04-02 17:21:36 -07:00
roanster007 c7a08f3b77 settings: Add permission to enforce unique names in realm.
Previously, users were allowed to signup or change their names to
those which already existed in the realm.

This commit adds an Organization Permission, that shall enforce
users to use unique names while signing up or changing their
names. If a same or normalized full name is found in realm,
then a validation error is thrown.

Fixes #7830.
2024-04-02 14:55:59 -07:00
Kenneth Rodrigues faccfb9bdc organization settings: Add links to manage deactivated users.
Display manage this user in the three-dot menu on the user card
regardless of is_active.
Similarly, display edit user icon in deactivated users list.
Do not hide edit button when user is deactivated.

Fixes #29486.
2024-04-01 15:43:16 -07:00
sujal fbcf31c9e0 bot-url: Add event filtering UI to generate bot URL modal.
Adds an option to the generate bot URL modal to filter for events
that will trigger notifications. This option is conditionally
displayed when only `all_event_types` is defined for the selected
integration.

If selected, the URL will display all events by default. There
are "check all" and "uncheck all" buttons to easily include or
remove all the events from the URL.

Fixes #27628.
2024-04-01 11:39:03 -07:00
tnmkr 79cc7db315 tooltips: Fix incorrect "required" tooltip on custom profile fields.
Previously, "This profile field is required." tooltip was visible on
all custom profile fields, including those that were not required.
This commit fixes that by targeting only the required fields.
2024-03-29 12:35:01 -07:00
Karl Stolley 286d44bf33 settings: Add new web information density settings.
Note that these settings are not operative at present, and are only
visible in the settings UI in the development environment.
2024-03-27 12:58:32 -07:00
Kislay de8d664830
templates: Add missing translation tags.
Several of these were found via an audit by Tim Abbott.
2024-03-25 13:26:11 -07:00
Vector73 f758ca596b custom_profile_fields: Add "required" parameter to the profile fields.
Fixes #28512.
2024-03-21 10:48:54 -07:00
Tim Abbott ac0673e0b5 settings: Rename overly generic field and field_hint classes. 2024-03-21 10:48:54 -07:00
Tim Abbott 9786a16680 bot_avatar_row: Rename extremely generic CSS classes.
I fixed one apparent typo, `$row.find("api_key_error").hide();`, while
doing this.
2024-03-21 10:48:54 -07:00
Sahil Batra 12e298dd4c settings: Add description below name field.
This commit adds description text below the name field in
profile settings panel mentioning how the field will be used.

Fixes #29226.
2024-03-14 10:53:36 -07:00
Sahil Batra 74ab3d2cbe webapp: Rename "Full name" field to "Name".
This commit renames "Full name" field in profile settings,
"Edit user" form and in the email modal for demo orgs to
"Name".

Fixes part of #29226.
2024-03-14 10:53:36 -07:00
Mateusz Mandera da9e4e6e54 backends: Implementation of restricting certain backends by plan.
Only affects zulipchat, by being based on the BILLING_ENABLED setting.

The restricted backends in this commit are
- AzureAD - restricted to Standard plan
- SAML - restricted to Plus plan, although it was already practically
  restricted due to requiring server-side configuration to be done by us

This restriction is placed upon **enabling** a backend - so
organizations that already have a backend enabled, will continue to be
able to use it. This allows us to make exceptions and enable a backend
for an org manually via the shell, and to grandfather organizations into
keeping the backend they have been relying on.
2024-03-05 11:48:58 -08:00
Prakhar Pratyush fe1a20ebb3 settings: Add realm-level setting 'zulip_update_announcements_stream'.
This commit adds a realm-level setting named
'zulip_update_announcements_stream' that configures the
stream to which zulip updates should be posted.

Fixes part of #28604.
2024-02-25 09:33:00 -08:00
David Rosa 948b427de7 api-docs: Add instructions to download `zuliprc` files.
- Adds instructions for downloading a zuliprc file for a bot or for
  yourself.
- Updates the button label to "Download zuliprc", since that's the
  filename it downloads.

Fixes #28881.
2024-02-23 09:43:57 -08:00
David Rosa 9a6ccba733 account-settings: Rename "API key" button.
Renames button to "Manage your API key", and updates docs
accordingly.

Fixes part of #28881.
2024-02-23 09:43:57 -08:00
sujal 1e625bc43b setting_ui: Fix sorting by "Expires at" column.
Previously, the sorting was broken due to
incorrect referencing of the property.
The code has been updated to use the "expiry_date"
property instead of "expires_at".

Fixes #29005.
2024-02-23 09:04:18 -08:00
Alya Abbott d8848057ef playgrounds: Replace replit playground example with Rust playground.
Passing code to replit as a URL parameter no longer works.
2024-02-23 09:03:44 -08:00
Prakhar Pratyush ee612dafac settings: Rename signup_notifications_stream realm setting.
This commit renames the realm-level setting
'signup_notifications_stream' to 'signup_announcements_stream'.

The new name reflects better what the setting does.
2024-02-21 09:04:23 -08:00
Prakhar Pratyush ab453fbe20 settings: Rename notifications_stream to new_stream_announce..._stream.
This commit renames the realm-level setting 'notifications_stream'
to 'new_stream_announcements_stream'.

The new name reflects better what the setting does.
2024-02-21 09:04:23 -08:00
Anders Kaseorg b9e62c7af8 page_params: Split out state data for realm.
For spectators, the chunk of page_params that originates from
do_events_register isn’t assigned until ui_init.js.  That means the
TypeScript type of page_params is mostly a lie during module load
time: reading a parameter too early silently results in undefined
rather than the declared type, with unpredictable results later on.

We want to make such an early read into an immediate runtime error,
for both users and spectators consistently, and pave the way for
runtime validation of the page_params type.  As a second step, split
out the subset of fields that pertain to the entire realm.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-15 10:22:52 -08:00
Anders Kaseorg e96ede0ef6 page_params: Split out state data for current user.
For spectators, the chunk of page_params that originates from
do_events_register isn’t assigned until ui_init.js.  That means the
TypeScript type of page_params is mostly a lie during module load
time: reading a parameter too early silently results in undefined
rather than the declared type, with unpredictable results later on.

We want to make such an early read into an immediate runtime error,
for both users and spectators consistently, and pave the way for
runtime validation of the page_params type.  As a first step, split
out the subset of fields that pertain to the current user.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-15 10:22:52 -08:00
Anders Kaseorg 80a6b12690 docs: Optimize /api links to skip trailing slash redirect.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-14 21:06:03 -05:00
qx24680 86e306a679 settings: Improve placeholder text for empty settings tables.
Fixes: #27250.
2024-02-14 08:52:52 -08:00
David Rosa 8e92b54df1 help: Update external links to "Bots overview" help center page.
The page was renamed and thus this will avoid an unnecessary redirect.
2024-02-06 18:22:57 -08:00
Tim Abbott 649072977e settings: Fix buggy conversion of emoji-display-settings-status.
6cd165386a incorrectly converted this
field with different names in the two places it is used.
2024-01-31 13:07:26 -08:00
vighneshbhat9945 642cce1a30 settings: Remove extraneous background for export button.
Removed the div along it's css rules which was
responsible for extraneous background around the
'start export of public data' button.

Fixes: #28625.
2024-01-25 18:24:06 -08:00
Sahil Batra 6781d06988 settings: Remove extraneous divider in account settings. 2024-01-25 14:28:48 -08:00
Sahil Batra 3d56f65df3 settings: Show the text about downloading config in "Active bots".
This commit moves the "Download config of all active outgoing
webhook bots in Zulip Botserver format." text to be shown in the
"Active bots" section since the text is relevant for active bots
only. This commit also updates the code to show the text only
if user has atleast one active outgoing webhook bot since the
text is relavant only for outgoing webhook bots.
2024-01-25 14:28:48 -08:00
Sahil Batra a6370fda68 settings: Do not use bootstrap tabs in bots panel.
This commit replaces the boostrap tabs with our own
tabs implementation from components.ts. This is part
of the bootstrap removal project.
2024-01-25 14:28:48 -08:00
Aditya Kumar Kasaudhan 6cd165386a settings: Rename 'emoji-display-settings' to 'emoji-preferences'.
Fixes part of #26874.
2024-01-23 10:11:44 -08:00
Aditya Kumar Kasaudhan 61a10dfca0 settings: Rename 'display-settings' to 'preferences'.
This commit renames "display-settings-radio-choice-label" to "preferences-radio-choice-label".

Fixes part of #26874.
2024-01-23 10:11:44 -08:00
Aditya Kumar Kasaudhan 1ab4520c4e settings: Rename display-settings-form to preferences-settings-form.
Fixes part of #26874.
2024-01-18 13:39:57 -08:00
vighneshbhat9945 59a7a2e11d
settings: Use correct tooltips for deactivated bots.
Added handlebars if-else conditions to display
'User is deactivated' tooltip for deactivated users
and 'Bot is deactivated' tooltip for deactivated bots.

Fixes #28593.
2024-01-17 12:45:03 -08:00
Alex Vandiver e0bd169c77 docs: Fix other help pages that were renamed or moved, to save a redirect. 2024-01-11 13:52:12 -08:00
Vector73 ed97420ffc
settings: Fix setting label click functionality.
This commit fixes "Automatically follow topics where I'm mentioned"
setting label click functionality so that the setting is toggled
on clicking the label.
2024-01-11 13:34:46 -08:00
Anders Kaseorg 79379c479d notification_settings: Open push notification docs link in new tab.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-09 09:22:31 -08:00
Angelica Ferlin 3fcb44e24d
organization settings: Use tippy for edit/delete custom field.
Fixes #27816.
2024-01-07 19:08:05 -08:00
Alya Abbott 2732da2bb2 settings: Update description text in Settings > Topics panel. 2024-01-02 15:54:48 -08:00
Sahil Batra 415fb2014b settings: Show push notifications tooltip on stream specific row.
This commit fixes the bug about not showing the tooltip about push
notifications not being enabled on the server on checkbox in stream
specific notification row.
2023-12-23 14:55:23 -08:00
Sahil Batra 99f29983a1 settings: Do not show tooltip if push notifications are enabled.
We previously showed tooltips about push notifictions not being
enabled on server on the checkboxes in "Notification triggers"
section incorrectly when server had push notifications enabled.

This bug was present as realm_push_notifications_enabled was
not passed to the template correctly. This commit fixes it by
instead using "is_disabled" in the "if" condition as we only
expect it to be true when push notifications are not enabled
on server.
2023-12-23 14:55:23 -08:00
Sahil Batra 94f0837b9c settings: Restrict length of realm Jitsi url custom input.
We have a restriction of 200 characters for jitsi_server_url
realm setting custom input element.

Fixes part of #27355.
2023-12-14 12:11:59 -08:00
Vector73 2e71ec78e3 settings: Add "Automatically follow topics where I'm mentioned" setting.
Fixes: #26795
2023-12-11 23:26:11 -08:00
Sahil Batra d6e30ee3e8 settings: Add help link for "can_access_all_users_group" setting. 2023-12-11 08:29:14 -08:00
Sahil Batra 49470af46e setting: Allow changing "can_access_all_users_group" setting in prod.
We now allow changing "can_access_all_users_group" setting in
production.
2023-12-10 15:20:07 -08:00
Sahil Batra b2b36ff37b settings: Update the label for can_access_all_users_group setting. 2023-12-10 15:20:07 -08:00
Sahil Batra 3d181a8ee1 settings: Remove "User groups" panel from settings overlay.
The "User groups" panel is now removed from settings overlay
and we instead use new "#groups" UI.

This commit also makes some changes to tests to ensure coverage
for pill_typeahead.js which was previously done by
settings_user_group_legacy.test.js. We have still not got
complete coverage on user_pill.ts as we have removed
settings_user_group_legacy.test.js, but we just add the file
to EXEMPT_FILS list for now and will handle it in future.

Fixes #28012.
2023-12-07 06:35:38 -08:00
Sayam Samal 68ccb022ca push_notifications: Add help links to mobile notifications options.
Fixes #27830.
2023-12-04 16:38:19 -08:00
Sayam Samal db753f7f90 notification_settings: Remove extra param being sent to checkboxes.
The show_push_notifications_tooltip param is not being used inside
`web/templates/settings/settings_checkbox.hbs` and thus should not be
passed.
2023-12-04 16:38:19 -08:00
Sayam Samal e09761c0f9 notification_settings: Disable push notification opts when not configured. 2023-12-04 16:38:19 -08:00
Sayam Samal c7e2306380 notification_settings: Add banner when push notification not configured. 2023-12-04 16:38:19 -08:00
Sayam Samal e2485b7ee8 notification_settings: Add tooltip to checkboxes in the triggers table. 2023-12-04 16:38:19 -08:00
Sayam Samal c01e9b8071 notification_settings: Move tooltip from help icon to "Mobile" heading. 2023-12-04 16:38:19 -08:00
Sayam Samal 31cc47cbd7 settings: Migrate mobile notification tooltips to a common template. 2023-12-04 16:38:19 -08:00
Sahil Batra d5d1540118 settings: Fix width of can-access-all-users-group widget container.
This commit moves dropdown widget for "can_access_all_users_group"
setting inside ".organization-permissions-parent" element which
makes it consistent with other settings and also reduces the
width of its container which is important in further commits to
show the tooltip about plan change on this setting correctly.
2023-11-29 12:01:37 -08:00
Prakhar Pratyush 49388d5d3d topic_mentions: Fix restriction rule for @-topic mentions.
Now, the topic wildcard mention follows the following
rules:
* If the topic has less than 15 participants , anyone
can use @ topic mentions.
* For more than 15, the org setting 'wildcard_mention_policy'
determines who can use @ topic mentions.

Earlier, topic wildcard mentions followed the same restriction
as stream wildcard mentions, which was incorrect.

Fixes part of #27700.
2023-11-23 12:52:25 -08:00
Sahil Batra 189718dc64 settings: Add support to change user-access setting in development.
This commit updates the backend code to allow changing
can_access_all_users_group setting in development environment
and also adds a dropdown in webapp UI which is only shown in
development environment.
2023-11-23 10:40:42 -08:00
Sahil Batra c90d00faea settings: Rearrange settings in "Organization permissions" section.
This commit re-arranges the settings in "Organization permissions"
section -
- A new section "Guests" is added which now contains the guest
indicator setting checkbox.
- Moved "User identity" and "Guests" sections above "Other permissions"
section.
2023-11-23 10:40:42 -08:00
Pratik 137505e2ad settings_notifications: Enable muted stream notification settings.
This commit allow the users to modify notification settings for muted
streams through the 'notification' section located in the personal
settings.

Fixes #27272.
2023-11-07 13:46:19 -08:00
David Rosa b5351285b6 help: Document "Jitsi server URL" setting.
- Updates "Start a call", documents the "Jitsi server URL" setting,
  and links to it in a (?) from the relevant admin UI.
- Fixes misplaced include block for opening the compose box.

Fixes #26907.
2023-11-07 13:09:52 -08:00
Aman Agrawal 00df9c6c18 urls: Show sponsorship page on a new URL.
Fixes #27377

Replaced #sponsorship links with sponsorship/ links and in other
places liking gear menu.
2023-11-06 14:55:14 -08:00
Pratik daa34685c3 stream_edit: Enable notification settings for muted streams.
This commit allows the user to change notification settings even though
the stream is muted and adds a line of text in stream settings and
notification settings.

Fixes #27272.
2023-11-02 13:57:56 -07:00
Sahil Batra c9fccf476a settings: Rename default_view and escape_navigates_to_default_view.
This commit renames default_view and escape_navigates_to_default_view
settings to web_home_view and web_escape_navigates_to_home_view in
database and API to match with our recent renaming of user facing
strings related to this.

We also rename the variables, functions, comments in code and class
names and IDs for elements related to this.
2023-10-26 11:00:12 -07:00
Animesh Biswas 7da9ca771f
settings: Change bot-type question to help center link.
In the "Add a new bot" modal, there was '?' next to the bot type field
that was confusingly showing a tooltip describing incoming webhooks,
regardless of the bot type have been selected.

The tooltip is removed from the '?' and it is linked to the help center
article explaining all the different bot types.

Fixes #27047.
2023-10-24 10:08:13 -07:00
David Rosa 56ccaa571e settings: Update topic notifications help center links.
- Updates the `?` link on "Topic notifications" and "Topic settings"
  to go to the new /help/topic-notifications page.
- Adds links to /help/follow-a-topic and /help/mute-a-topic.

Fixes #27297.
2023-10-23 18:37:41 -07:00
Prakhar Pratyush 3f2ab44f94 follow_topics: Remove the 'development' guard.
This commit removes the 'development' guard and makes
the UI changes related to the 'Follow Topics' project visible
outside the development environment.

Cleans up the older UI elements related to mute and unmute topics.
2023-10-22 14:24:22 -07:00
Karl Stolley 9458497ad2 settings: Reference 'Call provider' in settings. 2023-10-18 14:04:00 -07:00
Sahil Batra 760d793d6b settings: Rename "default" views to "home" views in settings and docs.
This commit renames "default" views to "home" views in the setting
labels, keyboard shortcuts list, help documentation and its urls.

This commit does not do changes in variable and class names, setting
field in database, API docs and changelog.

Fixes part of #27251.
2023-10-18 11:25:20 -07:00
Prakhar Pratyush e01ffba143 settings: Add default typing indicator user settings.
This commit adds two settings to 'SETTINGS / DEFAULT USER SETTINGS':
* Let recipients see when a user is typing direct messages
* Let recipients see when a user is typing stream messages
2023-10-13 15:30:49 -07:00
Sahil Batra c51c1d5135 realm: Add setting to control adding "(guest)" indicator to name.
This commit adds new realm setting to control adding "(guest)"
indicator to names of guest users in the UI.

Fixes part of #26700.
2023-10-12 12:06:10 -07:00
Hemant Umre 655cb51980 templates: Make the empty list messages consistent.
This commit makes the empty list messages of certain tables more
descriptive and consistent with the others.
2023-10-11 18:03:53 -07:00
Hemant Umre 0f5f7109b4 templates: Display a different message for empty search results.
In this commit, we introduce the `data-search-results-empty`
dataset to certain templates. This dataset, along with `data-empty`,
is used by `render_empty_list_message_if_needed` to present different
messages when there are no items matching the applied filter and
no items to display, respectively.

Co-authored-by: Akarsh Jain <akarsh.jain.790@gmail.com>
2023-10-11 18:03:53 -07:00
Hemant Umre eeec8f06e9 templates: Stop using `::after` to render empty list message.
This commit removes all instances of the `required-text` class,
which utilizes the `::after` pseudo-element to render empty list
message. To avoid inserting non-decorative content using a pseudo-
element, we will now use `list_widget.render_empty_list_message_
if_needed` introduced a few commits back to display the empty list
message.

Fixes #23072.
2023-10-11 18:03:53 -07:00
Sahil Batra 1080da08f0 settings: Fix live-update of text on the bots admin page.
We did not live-update the text on the top of admin bots page
correctly when changing the bot creation policy. This commit
fixes it.
2023-10-11 16:22:37 -07:00
Prakhar Pratyush 43789cac58 stream_typing_indicator: Remove the dev environment guard in settings.
This commit removes the 'page_params.development_environment' guard
for the setting 'send_stream_typing_notifications' and makes it
available outside the development environment.
2023-10-11 10:16:24 -07:00
Prakhar Pratyush 28fb5ea24d settings: Add UI for automatically follow and unmute topics settings.
This commit adds two drop-down settings in 'SETTINGS / NOTIFICATIONS'
and 'SETTINGS / DEFAULT USER SETTINGS'.

The new settings lie in a new section named "Topic notifications",
just below the "Noification triggers" section.

Label: "Automatically follow topics"
Options: "Topics I participate in", "Topics I send a message to",
"Topics I start", and "Never".

Label: "Automatically unmute topics in muted streams"
Options: "Topics I participate in", "Topics I send a message to",
"Topics I start", and "Never".

Fixes #25914.
2023-10-04 13:04:29 -07:00
Ujjawal Modi ba1405df96 settings: Live update tooltip in users and deactivated users table.
Earlier tooltip shown on hovering to activate and deactivate user
button in users and deactivated_users table does not live update
when user is deactivated or reactivated.

This commit makes changes to do the live update.
2023-10-03 11:15:39 -07:00
Eeshan Garg f3465dea08 demo-orgs: Add UI for converting to permanent organization.
Adds warning banner to the organization settings overlay/tabs
for demo organizations. For owners, clicking on the link in the
banner opens a modal to convert the demo organization into a
permanent organization.

For admins that are not owners, clicking on the link will go
to the help center article on demo organizations.

Non-admin users will not see the warning banner.

The modal for converting a demo organization requires the owner
to have set their email address. Once the owner's email address
is set, then the organization can be made permanent by changing
the subdomain of the organization. The deletion date for the
demo organization will be removed as part of updating the
subdomain.

The organization owner must also have updated the organization
type to be any value other than unsepecified to convert the
demo organization to a permanent organization. The modal's
submit button will be disabled if that is the value for the
organization type in the form. The demo organizations created
in the dev environment now have their organization type set to
unspecified on creation.

This is a part of #19523.

Co-authored by: Lauryn Menard <lauryn@zulip.com>
2023-10-03 09:11:41 -07:00
Satyam Bansal 51e2030f7b integration-url: Migrate integration typeahead to dropdown widget.
Fixes part of #26797.
2023-10-02 12:29:42 -07:00
palashb01 2ca1c0c63e settings: Decrease the gap between the account heading and banner.
This commit fixes the alignment of account-alert-notification-banner
by using a new classname 'account-alert-notification' for this specific
banner, removed the default margin-top and margin-left from this banner
which is set to all other banners, and Aligned the banner with
vertical-align property set to middle.

To left-align this specific banner when the email is long enough
to wrap to the next line removed the margin-left and used a new
classname 'account-settings-heading' for the accounts heading,
and gave a margin-right of 10px to ensure that the notice banner and
the heading have enough space between them, when the email is short.

If the email is long enough to wrap to multiple lines, then the gap
between the email input field and the banner is too low. To adjust
this, set the margin-bottom to 10px.
2023-10-01 17:54:22 -07:00
Hardik Dharmani 7721100378 bot_settings: Use same copy icon across the app.
The bot settings avatar row was using `fa-clipboard` icon. Changed
the icon to use `{{> copy_to_clipboard_svg }}` SVG icon that is used
everywhere else in the app as copy icon.
2023-09-28 15:15:57 -07:00
Vector73 9e9326b5df settings_users: Add "Reactivate user" option in "manage user" panel.
Fixes: #26693.
2023-09-27 10:41:05 -07:00
Hemant Umre f731602024 org_settings: Add frontend support for `realm_jitsi_server_url`.
This commit adds a dropdown and custom input element to set the
`realm_jitsi_server_url` when the video call provider is Jitsi. This
allows organization administrators to add a custom Jitsi server as the
organization's video call provider.

Fixes #17914.

Co-authored-by: Gaurav Pandey <gauravguitarrocks@gmail.com>
2023-09-21 17:39:10 -07:00
Karl Stolley 55e43b6926 settings: Display radio choice label as flexbox. 2023-09-21 17:18:47 -07:00
Karl Stolley 2c3a276753 settings: Uniformly structure username and status emoji. 2023-09-21 17:18:47 -07:00
Zixuan James Li d3e4456562 linkifiers: Use only the handle for dragging.
So that the user can still select and copy text from the body of the
linkifier rows. It might be helpful if we extend this behavior to other
draggable rows, like those for custom profile fields settings.

Fixes #26798
2023-09-21 15:27:16 -07:00
Philip Durbin 47288c7d79
settings: link to list of emoticon translations.
Under "Emoji" under "Preferences", we link to the rules explaining
what emoticons exist, e.g., :) translates to 😄, etc.

These docs: https://zulip.com/help/configure-emoticon-translations

Fixes #18147.
2023-09-21 08:46:29 -07:00
Satyam Bansal 9cde3abd4d bot-settings: Add modal to generate Integration URL.
Fixes part of #25976.
2023-09-20 17:49:51 -07:00
Lalit 0e73b5547c user_settings: Add new user setting to show/hide unread counts on streams.
Added a show_unread_counts personal user setting to the
Settings > Display settings > Advanced section which
lets user choose whether he/she wants to see unread messages
count on the left sidebar for streams.

This setting have three options,
"All Streams" - This will show unread messages count for all
streams.
"Unmuted Stream" - This will be default option and it will
only show unread messages count for unmuted streams.
"No Stream" - This option will not show unread messages count
on any stream.

Fixes #24149
2023-09-13 18:45:45 -07:00
palashb01 6323bb1e39 user_profile: Disable deactivate user button if the admin is only user.
This commit disables the "Deactivate User" button inside the
"manage user" tab in the user profile modal. Additionally, a
tooltip is applied to the button by wrapping it inside a div
with the tooltip applied.
2023-09-11 10:39:00 -07:00
palashb01 61948d273b settings_bots: Migrate manage bot to user profile modal.
This commit migrates the "Manage Bot" modal to the user profile modal,
with the same explanation as in the "Manage User" modal commit.
However, in this commit, we changed the permission of the "Manage User"
tab so that non-admin users can also see the "Manage Bot" tab if they
have created the bot. Additionally, since we can't make changes to
system bots, we check if the bot is a system bot and hide the
"Manage Bot" tab accordingly.

Fixes: #21806
2023-09-11 10:39:00 -07:00
palashb01 218bde443a profile_modal: Migrate manage user footer buttons to user profile.
This commit migrates the "Manage User" footer buttons to the user
profile modal. We made this change because we don't want the buttons
to scroll with the content; instead, we want them to be sticky at
the bottom at all times. Therefore, we moved the buttons to the user
profile modal.
2023-09-11 10:39:00 -07:00
palashb01 61cca84b17 settings_users: Migrate manage user modal to full profile modal.
This commit migrates the "manage user" modal to the "Full Profile"
modal. Refactored the show_edit_user_info_modal function since
earlier, we used to have a separate "Manage User" modal.
Consequently, we checked if we were coming from the
user_info_popover and then built the dialog widget accordingly.
However, with this new change, we no longer need to build the
dialog widget. Therefore, removed that part and now just pass
the container of the 'user profile modal' to get the content.

Previously, for deactivation, we used to have a separate dialog
widget. But now, since we have a dedicated function to handle
this case, refactored the deactivation code to use the
'confirm_deactivation' function.

Additionally, created two new functions to handle the loading
spinner. Since we will need these functions in the future for
the "Manage Bot" modal, we marked them as exported.

"Since we do not want to show the 'Manage User' tab to the user
looking at their own profile, in the 'can_manage_user' function
that we use to render the 'Manage User' tab, we check if the user
profile popover belongs to the same user. If it does, we set it to
'false' instead of 'true,' ensuring that the 'Manage User' tab is
not visible.

Added a new tab in the user profile modal 'manage user'.

Fixes: #21806
2023-09-11 10:39:00 -07:00
Lauryn Menard b4f02a336d demo-orgs: Add section on configuring email address to help article.
Adds a section to the demo organizations help center article about
configuring an email and password for demo organization owners.

For demo organization warning banners about needing to configure
an email, add a link to the new section in the help article.

Also, adds a related articles section to the help center article,
and updates the current draft text for changes in how the demo
organization feature is being implemented.
2023-09-08 15:17:23 -07:00
Ujjawal Modi 9a96d19315 invites: Frontend changes for adding the new realm setting.
This commit does the changes in frontend required
for adding the new setting `Who can create multiuse invite link.`

Fixes #15159.
2023-09-07 14:21:01 -07:00
Ujjawal Modi ec49c3acc8 invites: Rename `can_invite_others_to_realm` local variables.
This commit rename the existing setting `Who can invite users to this
organization` to `Who can send email invitations to new users` and
also renames all the variables related to this setting that do not
require a change to the API.

This was done for better code readability as a new setting
`Who can create invite links` will be added in future commits.
2023-09-07 14:21:01 -07:00
Ujjawal Modi 77c67464ba invites: Live update option to create new invitations.
Earlier option to create new invitations in right_sidebar,
gear_menu and invitations panel does not get live update
when the setting `who can invite others to realm` is changed.

This commit make changes to do live update.
2023-09-07 14:21:01 -07:00
Lauryn Menard 91b40a45fe demo-orgs: Add email and password process for demo organization owners.
Creates process for demo organization owners to add an email address
and password to their account.

Uses the same flow as changing an email (via user settings) at the
beginning, but then sends a different email template to the user
for the email confirmation process.

We also encourage users to set their full name field in the modal for
adding an email in a demo organization. We disable the submit button
on the form if either input is empty, email or full name.

When the user clicks the 'confirm and set password' button in the
email sent to confirm the email address sent via the form, their
email is updated via confirm_email_change, but the user is redirected
to the reset password page for their account (instead of the page for
confirming an email change has happened).

Once the user successfully sets a password, then they will be
prompted to log in with their newly configured email and password.
2023-08-31 15:02:16 -07:00
Lauryn Menard 19b8217e49 demo-orgs: Disable changing user's email visibility until email set.
Because demo organization owners do not initially have an email
set, some of the personal and organization settings in the web-app
UI should be disabled/hidden until the owner configures an email
address for their account.

Disables the dropdown for changing the user's email address visibility
in the account & security tab of the personal settings overlay until
the user configures an email address.
2023-08-31 15:02:16 -07:00
Lauryn Menard b0bc66a8ba demo-orgs: Disable admin of authentication methods until email set.
Because demo organization owners do not initially have an email
set, some of the personal and organization settings in the web-app
UI should be disabled/hidden until the owner configures an email
address for their account.

Disables configuring organization authentication methods in the
organization settings overlay until the user has configured an email
address. Adds a tip at the top of the authentication methods tab to
indicate why the authentication method checkboxes are disabled.
2023-08-31 15:02:16 -07:00
Lauryn Menard 665deac7c0 demo-orgs: Disable show/change API key if email not configured.
Because demo organization owners do not initially have an email
set, some of the personal and organization settings in the web-app
UI should be disabled/hidden until the owner configures an email
address for their account.

Disables the show/change API key button in the account & security
tab of the personal settings overlay if the user's email address
is not configured. A tooltip is shown when hovering over the disabled
button explaining why the feature is disabled.
2023-08-31 15:02:16 -07:00
Lauryn Menard 6a36340ac7 demo-orgs: Hide change password field if email not configured.
Because demo organization owners do not initially have an email
set, some of the personal and organization settings in the web-app
UI should be disabled/hidden until the owner configures an email
address for their account.

Updates showing the password change field in the account & privacy
tab of the personal settings overlay to check if the user's email
being configured (to cover the demo organization case) and if the
organization has enabled password authorization.
2023-08-31 15:02:16 -07:00
Anders Kaseorg 6758d8ad12 settings/dropdown_list: Remove unused template.
It’s unused since commit 875d564f2d
(#26291).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-08-31 14:59:39 -07:00
Karl Stolley 2e07c03968 settings: Align notification play button in a flex layout.
This allows the select to flex, keeping the buttons position on
screen even at mobile-scale viewports.

While other most other controls are currently not so responsive,
this might provide some direction (along with a TODO) on how to
go about moving controls in that direction.

Fixes: #26563
2023-08-31 12:06:32 -07:00
Karl Stolley 8b81f2c92c settings: Match notification sound for attribute to ID. 2023-08-31 12:06:32 -07:00
David 75a654b9ab
help: Update links to "Edit a message" and "Delete a message".
The series including 0349152f0f split
this page into two smaller pages.
2023-08-28 18:09:41 -07:00
Yogesh Sirsat a729c95ada custom_profile_fields: Fix empty field choices issue of select field.
While editing select type profile field, if we submit empty or zero
choices it fails silently, current implementation for this issue does
not work for some cases, and this commit will fix that.

This will disable dialog submit button in case of empty field choices.

Also removing code of all calls making to `update_choice_delete_btn`
as that function have no more use-case for empty field choices, still
keeping the function because it gets used in `settings_streams.js`.

Co-authored-by: Palash Baderia <palash.baderia@outlook.com>
2023-08-28 08:52:43 -07:00
Zixuan James Li a4963df6ad settings: Remove "add a new bot button" from admin page.
Instead, we show a message with links that either opens a modal for
creating a new bot or navigates to the bot settings page. The
"add a new bot" link only show up when the user has enough permission
to create new bots, and the "manage your bots" link only shows up when
the user has at least one bot if they don't have the permission to
create one. Otherwise, the message does not show up at all.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2023-08-24 16:57:17 -07:00
Sahil Batra 75126c96a4 settings: Make custom profile fields table similar to other tables.
This commit updates the admin custom profile fields table to be
similar to other tables in settings page. After this change,
the table will be horizontally scrollable for narrow screens
and the buttons in actions column will not wrap to multiple lines.

This increases the width of "Actions" column and it takes some
unnecessary space, but this will be handled in the next commit
which will adjust "Actions" column in all the tables.
2023-08-21 15:00:39 -07:00
Sahil Batra 16bf9e7600 templates: Remove table-condensed class for <table> elements.
The table-condensed class was used by bootstrap to add padding
to the table cells. But since we want padding in cells for all
tables, we added the padding CSS to the other existing CSS for
tables while removing the bootstrap CSS for tables and
"table-condensed" is not required anymore.
2023-08-21 15:00:39 -07:00
Zixuan James Li 255e382750 linkifiers: Disable dragging when a filter is applied.
Dragging while a filter is applied can be confusing because the
reordering request won't succeed if the complete list of linkifiers is
not provided.
2023-08-15 10:21:22 -07:00
Zixuan James Li 5301060954 linkifiers: Support dragging and reordering linkifiers.
This also removes sorting on the pattern and the URL template, because
it does not make sense anymore as we make linkifiers draggable.

Fixes #23716
2023-08-14 15:21:48 -07:00
Zixuan James Li 31b7003d61 settings: Rename movable-profile-field-row.
So that we can reuse it for other movable rows in places like
.admin_linkifiers_table.
2023-08-14 15:21:48 -07:00
Sahil Batra db3b9e4742 settings: Make custom profile fields table consistent with others.
We change the custom profile fields table to have same header as
of other table and as a result this also makes the page look
better if an organization has zero custom profile fields.
2023-08-06 18:13:33 -07:00
Sahil Batra fc5b63e5cd settings: Fix save-discard widget fo.
The save-discard widget was not showing and hiding correctly
for the "Automated messages and emails" section in organization
settings panel. This was because the "proposed_val" was always
being returned as "undefined" for language setting as
"data-language-code", which is used to check the proposed value
of setting, was not set after changes in 36475daba7.
This commit fixes it by passing language_code value to
language_selection_widget and thus setting "data-language-code"
attribute correctly.

The changes in 36475daba7 removed language_code parameter from
language_selection_widget as it was not passed in the template
from "Display settings" section. So, this commit also passes
the language_code parameter to language_selection_widget from
"Display settings" section.
This change sets the "data-language-code" attribute even when
it is not being used there, to make sure there is no reference
to undefined fields in language_selection_widget.

Note that the above bug was reproducible only if you have not
changed the language even once and are trying to change the
other settings, as the data-language-code attribute was set
after selecting a language from the modal, but it was not
set initially after rendering the page.
2023-08-06 17:53:57 -07:00
Prakhar Pratyush 3d5d434e71 settings: Add a saving-saved indicator to the 'SETTINGS/TOPICS' UI.
This commit adds a 'saving...' - 'saved' indicator to the
'SETTINGS/TOPICS' UI.

This improves the UX by reflecting that the changes are saved.
2023-08-06 13:55:21 -07:00
Aman Agrawal 875d564f2d stream_settings: Migrate to new DropdownWidget.
Also, remove old DropdownListWidget since it is no longer used.
2023-07-27 14:10:08 -07:00
Aman Agrawal aa8e94ca6d settings_org: Migrate dropdowns to new DropdownWidget.
This also moves [Disabled] button inside the dropdown.
2023-07-27 14:10:08 -07:00
Aman Agrawal 6efcb7a349 dropdown_widget: Refactor to use Class. 2023-07-27 14:10:08 -07:00
Zixuan James Li 000761ac0c realm_playgrounds: Replace url_prefix with url_template.
Dropping support for url_prefix for RealmPlayground, the server now uses
url_template instead only for playground creation, retrieval and audit
logging upon removal.

This does the necessary handling so that url_template is expanded with
the extracted code.

Fixes #25723.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2023-07-24 17:40:59 -07:00
Prakhar Pratyush 93a18b999a settings: Update SETTINGS/TOPICS panel to include followed topics.
This commit updates the existing 'Topics' settings UI
to add support for followed topics.

Changes:
- Add "Followed" as the first option in the topic status dropdowns.
- Modify the intro text.
- Replace the "Learn more." link with a question mark linking to
'/help/mute-a-topic' on the "Topic settings" heading.

The changes are visible in the development environment only.

Fixes #25918.
2023-07-17 17:39:17 -07:00
nimish c238327899 settings: Change "Display settings" to "Preferences".
This includes changing the URL to #settings/preferences, with a
transparent redirect so that existing links, like the one from Welcome
Bot, continue to work.
2023-07-12 07:09:03 -07:00
Sahil Batra 5442bfb07c templates: Add filter_text_input class to inputs used for filtering.
This commit adds filter_text_input class to various search inputs
used across the app. This new class is used to re-add the bootstrap
CSS rules such that we can remove the CSS from bootstrap.css.
2023-07-07 10:10:28 -07:00
Sahil Batra aef557054e templates: Add settings_text_input class to various inputs.
This commit adds settings_text_input class to inputs in the
playground and linkifier panels, excluding the search inputs
as they are handled by filter_text_input class, and also to
the description input in the new user group creation form.

After adding this class, the bootstrap CSS rules to these
inputs are applied using the "settings_text_input" class.
2023-07-07 10:10:28 -07:00
Sahil Batra 04debf72df templates: Add modal_text_input class where it is missing.
This commit adds modal_text_input class to:

- Input for payload url in new bot form. We add
modal_text_input class as type attribute for it has
been set to "text".

- Inputs in old user group creation modal.

- Input in set status modal.

- Inputs in linkifier edit modal.

- Inputs for options for "List of options" type
custom profile field.

This change is needed as we would be removing the
bootstrap CSS for text inputs and further commits
and the required CSS is added to modal_text_input
class.
2023-07-07 10:10:28 -07:00
Ganesh Pawar fff9b334ff default_streams: Convert inline form to modal.
Fixes #20838.
2023-07-06 16:24:44 -07:00
Lalit 1676d0b638 settings_emoji: Fix file upload bug in upload emoji modal.
Before this commit if a user pressed enter to submit the add emoji form
the uploaded emoji was getting cleared.

This was happening because when we pressed enter the browser tried to
submit the form, because we had two buttons inside that form one for
clearing uploaded emoji and one for uploading emoji they were being
treated as "submit" button and hence their callback ran which in result
was responsible for the bug.

Fixed this by explicitly setting the `type` attribute for those buttons
to `type=button` so that they will not be treated as "submit" button.
Also added the `form_id` option for `dialog_widget` which is needed if
we do want to correctly submit the form by pressing enter.

Fixes: #24972
2023-06-29 10:16:28 -07:00
Sahil Batra db825ad202 settings: Remove settings_text_input class from url type inputs.
This commit removes settings_text_input class from url type inputs
and we instead add the width property to settings_url_input.

Note that we might instead have a single class for all type of inputs
instead of having different classes for url, password and text type
inputs in further commits.
2023-06-23 11:53:38 -07:00