Commit Graph

22 Commits

Author SHA1 Message Date
sahil839 544760daa7 retention: Add link to message-retention-policy docs next to the heading.
This commit adds link to the message-retention-policy docs next to the
heading for both realm-level and stream-level settings.
2020-06-26 14:43:47 -07:00
Clara Dantas ddbde66af5 realm: Remove Google Hangouts integration.
Google  has removed the Google Hangouts brand, thus we are removing
them as video chat provider option.
This commit removes Google Hangouts integration and make a migration
that sets all realms that are using Hangouts as their video chat
provider to the default, jitsi.

With changes by tabbott to improve the overall video call documentation.

Fixes: #15298.
2020-06-16 17:02:27 -07:00
sahil839 18429cfd29 realm: Allow only owners to set message retention policy for a realm.
This commits adds restriction on admins to set message retention policy.
We now only allow only organization owners to set message retention
policy.

Dropdown for changing retention policy is disabled in UI for admins also.
2020-06-14 21:23:53 -07:00
Anders Kaseorg 4d04fa3118 compose: Rewrite Zoom video call integration to use OAuth.
This reimplements our Zoom video call integration to use an OAuth
application.  In addition to providing a cleaner setup experience,
especially on zulipchat.com where the server administrators can have
done the app registration already, it also fixes the limitation of the
previous integration that it could only have one call active at a time
when set up with typical Zoom API keys.

Fixes #11672.

Co-authored-by: Marco Burstein <marco@marco.how>
Co-authored-by: Tim Abbott <tabbott@zulipchat.com>
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2020-06-03 16:39:12 -07:00
Rohitt Vashishtha 4b47d219db settings: Use correct label for signup notifications stream.
When migrating to dropdown list widget, we incorrectly used the same label
for both realm_notifications_stream and realm_signup_notifications_stream.

This was introduced in b580baf682.
2020-06-03 12:19:08 -07:00
Pragati Agrawal 441f9f43e7 templates: Extract help link widget.
This block of html is used at many places so it's a good idea to create a
template for it.
2020-05-24 16:32:36 -07:00
Rohitt Vashishtha aeb247f528 dropdown-list-widget: Rename setting_name -> widget_name.
This change is another in a series of commits that allows us to use
DLW outside of realm_settings.
2020-05-19 15:13:28 -07:00
Pragati Agrawal bd9b74436c org settings: Enable message_retention_days in org settings UI.
Since production testing of `message_retention_days` is finished, we can
enable this feature in the organization settings page. We already had this
setting in frontend but it was bit rotten and not rendered in templates.

Here we replaced our past text-input based setting with a
dropdown-with-text-input setting approach which is more consistent with our
existing UI.

Along with frontend changes, we also incorporated a backend change to
handle making retention period forever. This change introduces a new
convertor `to_positive_or_allowed_int` which only allows positive integers
and an allowed value for settings like `message_retention_days` which can
be a positive integer or has the value `Realm.RETAIN_MESSAGE_FOREVER` when
we change the setting to retain message forever.

This change made `to_not_negative_int_or_none` redundant so removed it as
well.

Fixes: #14854
2020-05-08 14:09:31 -07:00
Pragati Agrawal fd9b868635 org settings: Use standard "types" in `.get_input_element_value()`.
The reason is to make the hardcoded property type values consistent with
`typeof` operator.
2020-05-08 14:04:21 -07:00
Rohitt Vashishtha b580baf682 settings: Refactor notifications_stream setting to use DropdownListWidget.
This commit removes most of the duplicate logic for the stream selection
dropdowns for the settings: `realm_signup_notifications_stream_id` and
`realm_notifications_stream_id`.

We also make minot changes to DropdownListWidget to accomodate the stream
rendering of the format: `#stream_name`.

We finally switch to using stream_ids instead of stream_name everywhere
which makes reading data from page_params simpler.
2020-04-22 17:57:16 -07:00
Anders Kaseorg 6f55a8b7e5 templates: Fix invalid self-closing tags.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 13:13:14 -07:00
Rohitt Vashishtha cb85763c78 settings: Extract DropdownListWidget from default_code_language_widget.
We extract a general purpose widget to create dropdown lists with
search. This widget is used for default code block language, but can
be easily extended to cover notifications_stream and similar options.
The current usage is:

```js
const widget = DropdownListWidget({
    setting_name: 'realm_alpha_beta',
    data: [{name: 'hello', value: 'world'}, {...}, ...],
    subsection: 'msg-editing',
    default_text: 'Nothing is selected',
});
```

and

```handlebars
{{> dropdown_list_widget
  setting_name="realm_alpha_beta"
  list_placeholder=(t 'Filter the data')
  reset_button_text=(t '[Unset]')
  label=admin_settings_label.realm_alpha_beta }}
```

This can further be refined by shifting more variables from handlebars
to javascript in the future.
2020-04-14 12:50:10 -07:00
Rohitt Vashishtha f9caf522f0 markdown: Allow setting a default language for code blocks.
This adds a new realm setting: default_code_block_language.

This PR also adds a new widget to specify a language, which
behaves somewhat differently from other widgets of the same
kind; instead of exposing methods to the whole module, we
just create a single IIFE that handles all the interactions
with the DOM for the widget.

We also move the code for remapping languages to format_code
function since we want to preserve the original language to
decide if we override it using default_code_clock_language.

Fixes #14404.
2020-04-09 16:02:02 -07:00
Vaibhav Raj Singh 379eed7159 org settings: Minor changes to link icons and documentation.
Changed `help` to `help_link` so as to denote that it's a link to docs.
Also, updated `message feed` to `other settings` in docs.
2020-04-03 11:41:18 -07:00
MariaGkoulta b248b2681c settings: Add link for help near the setting of link previews
Next to the checkbox of "Show previews of linked websites" added a
documentation link in order to help users not confuse its function.
To do this:
- Added the field 'help' which is the link for the documentation in
organization_settings_admin.hbs
- Added the if statement in settings_checkbox.hbs to check if the above
field exists.In case it exists, a help icon which leads to the documentation
link appears.
The specific field was added in order to be able to add a help link in
other settings as well.

Co-authored-by: Katerina Perikou
<44238834+kPerikou@users.noreply.github.com>

Fixes: #13450
2020-04-02 17:38:24 -07:00
Anders Kaseorg 1cd1b5d198 settings_org: Convert time_limit_dropdown_values from object to Map.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-02-25 14:09:39 -08:00
Pragati Agrawal 9a6b3c1cde org settings: De-duplicate template code for notification streams settings. 2020-01-14 17:16:23 -08:00
Pragati Agrawal bde8838d7e org settings: Use id instead of class for a specific element.
This is a preliminary commit to do some deduplication with notification
stream dropdown widget.
2020-01-14 17:16:23 -08:00
Pragati Agrawal e7c40f69de org settings: Remove old method of success status for notification streams.
For "New stream notifications" and "New user notifications" it is more
intuitive to just use the new system for showing success/saving status
feedback.
2020-01-14 17:16:23 -08:00
Sophie 2eba3e7827 org_settings: Change new user 24-hour setting to dropdown.
These should work consistently with how the individual user setting
works; see the last commit.

With changes from tabbott to fix real-time sync.

Fixes #12553.
2019-11-08 17:39:59 -08:00
Anders Kaseorg 0c565f50be templates: Use upstream Handlebars partials syntax.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-12 21:11:14 -07:00
Anders Kaseorg 3c3471b720 templates: Rename *.handlebars ↦ *.hbs and - ↦ _.
Tweaked by tabbott to avoid accidentally disabling the linter for
handlebars templates.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-12 21:11:03 -07:00