Commit Graph

172 Commits

Author SHA1 Message Date
Joshua Pan b7fe2fe7d8 Move maybe_get_stream_name to stream_data.js.
This also gets rid of the unnecessary set_global
in settings_org.js test, which made tests fail after
moving the code.
2017-08-01 16:19:41 -07:00
Sarah 31e47954f7 settings_org: Change update_realm_description to read from page_params.
Also refactor server_events_dispatch, move update_realm_description
into the realm_settings object.

Fixes #5696.
2017-07-24 17:36:50 -07:00
Rishi Gupta ad47d3b651 settings: Update wording in organization-permissions-admin.handlebars. 2017-07-24 17:33:14 -07:00
Cory Lynch d32e89aae4 jQuery: Remove broken use of "removeAttr".
This function no longer sets properties to false, so the supported
way of doing this is to instead use prop(foo, false). Some tests
had to be fixed to accommodate this.
2017-07-24 10:54:47 -07:00
Harshit Bansal c1dc48f41b emoji: Merge the two semantically same tips on the `Custom emoji` page.
In case the user was not allowed to upload an emoji, we were displaying
two different but sematically same tips. This commit merges them and
also updates `update_custom_emoji_ui()` function in settings_emoji.js
to live update tooltip.
2017-07-21 13:29:27 -07:00
Durga Akhil Mundroy 146dfa6f0b org-permissions: Add allow_edit_history organiztion setting.
This new setting controls whether or not users are allowed to see the
edit history in a Zulip organization.  It controls access through 2
key mechanisms:

* For long-ago edited messages, get_messages removes the edit history
  content from messages it sends to clients.

* For newly edited messages, clients are responsible for checking the
  setting and not saving the edit history data.  Since the webapp was
  the only client displaying it before this change, this just required
  some changes in message_events.js.

Significantly modified by tabbott to fix some logic bugs and add a
test.
2017-07-16 10:10:06 -07:00
Vishnu Ks cf2dec539f urls: Use POST for zerver.views.realm_icon.upload_icon.
This upload_icon endpoint is changed from PUT to POST becuase
this endpoint is not idempotent.
2017-07-07 10:31:43 -07:00
Franziska von der Goltz 98847937f4 realm: add mandatory topic setting on org level.
Lets organizations require users to specify a topic the discussion.

Fixes: #5164.
2017-07-04 14:09:21 -07:00
Steve Howell d7c0a7e1cb Clean up settings_org.render_notifications_stream_ui.
The code now handles undefined stream_ids for realms that
don't have a notifications stream.  It also removes unneeded
translation code on the stream name.
2017-06-16 08:47:42 -04:00
Akhil 1bcc0dbd81 org-settings: Add UI for changing the notifications stream.
Added a dropdown in the organization settings page with a search-box and
required styles. Also added an element to disable it. Added a method to
populate the dropdown using list_rendering.js. Also altered response to
the event of deletion of the notifications stream on the frontend. On
selection of a new stream or on clicking 'Disable', a patch request is
made with stream-id to /json/realm.

Fixes: #3708.
2017-06-15 04:08:29 -07:00
Cynthia Lin b561b19d24 settings: Add notice for non-admin users about read-only access.
With contributions from Brock Whittaker and Tim Abbott.

Fixes #5165.
2017-06-05 15:41:36 -07:00
Sarah e304c47970 settings_org: Split out separate forms for orgs settings/permissions/auth.
Steve Howell also contributed to this PR.
2017-05-25 14:18:04 -07:00
Tim Abbott 207c30fc9c Revert "settings: Fix missing status report when waiting period disabled."
This reverts commit a25e7451f6.

This changed the wrong if statement in this file.
2017-05-23 17:02:35 -07:00
Sarah 01cb480b2c settings-org.js: Create property_types object and refactor set_up.
Create property_types object for realm settings. In set_up function,
iterate over property_types to find settings that were updated, send those
new values to the server, and report that the changes were made.
2017-05-23 16:32:36 -07:00
Tim Abbott a25e7451f6 settings: Fix missing status report when waiting period disabled.
Previously, if one set the waiting period threshhold to 0, no
notification would be produced, even though the actual state of the
world was changed.
2017-05-23 16:31:41 -07:00
Steve Howell e00f9f3dcb Split out Organization Permissions page. 2017-05-18 12:37:03 -07:00
Tim Abbott e12d3100db settings: Fix whitespace leak in organization description.
Previously, the way the organization description textarea was
generated, there'd be a newline and ~12 spaces added each time on
reloaded the page and hit "save changes".

This change makes it so that the organization description only changes
when the user actually changes it.
2017-05-17 12:11:10 -07:00
Tim Abbott 6e66495c38 auth: Fix authentication methods checkboxes disabling.
Apparently, there were not correctly disabled if you clicked on
"authentication methods" after opening the settings UI another way.
Everything worked fine if you just clicked them, already.
2017-05-17 11:54:55 -07:00
Tim Abbott 03b7be17a6 settings: Fix unnecessary/ugly exclamations in error messages.
The previous code would produce errors of the form "Failed!: ...".
2017-05-01 14:50:20 -07:00
fionabunny 6d2785c853 home.py: move domains as realm_domains to register_ret.
Part of #3853.
2017-04-28 21:11:56 -07:00
Steve Howell 22e21cddcb admin/settings: Lazy-load Organization sections.
We now wait to load Organization sections until you
click on the section (or virtually click by using arrow
keys).

Some of the sections are coupled in terms of their setup,
so some sections will already be loaded if you had clicked
on a related section.
2017-04-17 20:55:42 -07:00
Steve Howell 0fc7b9907f Extract settings_org.js (and fix live updates).
This is mostly moving code, but we do add short-circuit logic
for some live-updating methods here.

Note that this affects two different sections of the admin app:

    * Organization settings
    * Authentication methods

We really want to move to one module per section, but there is some
legacy coupling that makes this difficult for now.
2017-04-13 10:39:39 -07:00