Commit Graph

8 Commits

Author SHA1 Message Date
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
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
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
Pragati Agrawal dd13136371 settings: Migrate notification checkboxes to table format.
Here we have migrated checkboxes of all general notifications to the table.
By general notifications we mean, Mobile, Email, Desktop audio, and visual
notifications.

This is a part of a bigger migration to simply our notifications setting
changing infrastructure for all streams and individual streams. Later we
will add more row to this for different categories of notifications in
addition to the current ones ("Streams" and "PMs, mentions, alerts").

Fixes: #12182.
2020-03-25 17:45:59 -07:00
Pragati Agrawal 53294928c4 settings: Fix toggling push notification checkbox when disabled.
We know that by default the value of `enable_stream_push_notifications` is
true, so on some server if push notifications are disabled then due to
```
{{#unless show_push_notifications_tooltip}}
```
the `enable_stream_push_notifications` checkbox is rendered as unchecked
and when we update any other setting in the "Stream notifications" section,
due to `settings_notifications.update_page()` all checkboxes are changed to
current values which means above checkbox get checked.

We can deal with this bug either making changes in
`settings_notifications.update_page()` but we should show check/uncheck
state of checkboxes anyway so removing this `unless` condition fixes this
bug.
2020-03-24 16:06:45 -07:00
Pragati Agrawal 83933034a4 settings: Simplify logic to show push notification tooltip in templates.
Instead of having logical expressions in templates, it's always preferred
to calculating them in javascript and pass the results as a context. It
also enhances the readability of templates and testing of such logic is
easier in js over templates.
2020-03-24 16:06:45 -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