Commit Graph

1251 Commits

Author SHA1 Message Date
Shubham Dhama 3e0b420423 settings: Extend `settings_checkbox` for dependent checkboxes.
This deduplicate code for the checkboxes which are dependent on other
parameters and it makes no sense changing them when that parameter is
false.  For example, changing `message_content_in_email_notifications`
makes sense only when `enable_offline_email_notifications` is true.
2018-10-16 13:08:55 -07:00
Cynthia Lin c0edcf6fe4 user profiles: Remove empty space under profiles with no set fields.
Fixes #10652.
2018-10-14 09:37:18 -07:00
Steve Howell 3545bc1893 settings: Confirm before deleting user groups.
Fixes #10498.
2018-10-12 10:38:56 -07:00
Steve Howell b7f764aa29 settings: Add confirm_dialog module.
This module makes it really easy to create are-you-sure
dialogs for dangerous operations.

Basically it's one function with five parameters.  You
give three chunks of HTML, a callback function, and
a parent container.

The first use of this will be in settings_user_groups,
coming up in a couple commits.
2018-10-12 10:37:06 -07:00
Pragati Agrawal 749e034863 org settings: Rename "Filter settings" to "Linkifiers".
Fixes: #10551
2018-10-09 08:50:45 -07:00
Pragati Agrawal 8a9959b4be org settings: Remove bolt-icon from active users' list.
Since now we have a "role" column under org settings->active-users, so
this bolt admin icon is redundant,thus removing it.
2018-10-05 15:50:27 -07:00
Pragati Agrawal 8ae008abe4 org settings: Add column for "role" under active-users.
Fixes: #10413
2018-10-05 15:50:27 -07:00
Cynthia Lin 6d0aa68591 custom profile fields: Add and restyle default user profile fields.
Refactor selectors to utilize SCSS features.

Fixes some issues in #10545.
2018-10-04 17:02:09 -07:00
Akash Nimare 138cef0906 hotspots: Change styling of intro to reply hotspot.
Updated the styling so that it looks like other hotspots.
2018-10-02 11:38:26 -07:00
Rishi Gupta 0c7be02b99 user docs: Update stream guidelines link in stream subscriptions modal. 2018-10-01 12:45:59 -07:00
Pragati Agrawal 6adabd20f5 settings: Remove dependency of message_content_in_email_notifications.
Since now we have email notifications for streams messages too, so
there is no direct dependency of
`message_content_in_email_notifications`checkbox on
`enable_offline_email_notifications` setting and neither we can say it's
dependent on `enable_stream_email_notifications` as well because we may
have email notifications set for individual streams. So removing this
checkbox dependency is the best solution here.
2018-09-21 12:46:02 -07:00
Akash Nimare b539dedfcd stream-settings: Remove unnecessary delete text from button.
We are already showing the Delete icon so it's unnecessary to have
the "Delete" text. This PR removes the same.
2018-09-21 12:17:17 -07:00
Harshit Bansal e7311cdf5d emoji: Bring back the feature of changing emojisets.
This is largely inspired by requests from people not liking the
Google's new emojiset. A lot of people were requesting to revert
back to old blobs emojiset so we are re-enabling this feature
after making relevant infrastructure changes for supporting google's
old blob emojiset and re-adding support for twitter emojiset.

Fixes: #10158.
2018-08-31 11:52:24 -07:00
Steve Howell 7b2f5ccabc Rename markdown-help to message-formatting.
This just makes the id match the name of the
menu item.
2018-08-31 11:51:22 -07:00
Pragati Agrawal ba4e4e38ae user settings: Add setting to make login notifications optional.
This adds a feature in the "Notification" section of "Settings" tab,
which lets user enable or disable login emails notification.

Tweaked by tabbott to simplify the test.

Fixes: #5795, progress towards #5854.
2018-08-28 14:02:31 -07:00
Yashashvi Dave 1400a040fd user settings: Improve style of "Preview profile" btn.
This commig update button to show user profile in user
settings. This commit change text in button, add external
link icon and change style of button.
2018-08-28 13:59:45 -07:00
Cynthia Lin e92ec362ca popovers: Show line breaks in Long type fields in user profile popovers. 2018-08-27 17:38:15 -07:00
Yashashvi Dave 9a09513b4d user settings: Add link to user profile popover.
Add button to view current user's profile popover
from user settings page.
2018-08-27 17:26:07 -07:00
Yashashvi Dave 4049a08b88 user popover: Display text as link for URL custom field.
In user profile popover, for URL type custom field
display text as link in popover, so user can easily
click on link directly.
2018-08-27 17:26:07 -07:00
Yashashvi Dave 1c14e0166c user profile popover: Enhance popover style.
This commit make changes in style of exit-sign of modal,
and also remove spacing between fields in modal.
2018-08-27 17:26:07 -07:00
Marco Burstein 76511aeed6 settings: Add a minimum width to "person picker" custom fields.
Empty "person picker" fields appear with a much smaller width than all
other custom fields. Increase the `min-width` of the field that it
matches the widths of other text boxes.

Fix #10414.
2018-08-26 23:05:10 -07:00
Joshua Pan 3ec34eda11 display settings: Implement UI for starred_message_counts. 2018-08-21 13:42:23 -07:00
Yashashvi Dave 4f9ca03c13 user profile popover: Display user pills in custom user field.
Display user pills instead of user names in custom user field
on user profile popover.
2018-08-21 12:10:35 -07:00
Yashashvi Dave 9812b81a1e user pills: Rename class `notmem` to `not-editable` for generalization. 2018-08-21 11:50:01 -07:00
Tim Abbott 5f10fa1692 user_profile_modal: Remove profile_data conditional.
It's no longer possible for profile_data to be empty, and the
conditional was in the wrong place anyway.
2018-08-21 11:49:36 -07:00
Yashashvi Dave 92782e2f89 static/js/popovers.js: Modify structure of user popover template data.
Modify structure of template data used to render
`user_profile_modal.handlebars`.

This is preparatory commit to display user pills in user profile
popover instead of user names in user type custom fields.
2018-08-21 11:42:59 -07:00
Yashashvi Dave 150ea61271 custom profile field: Improve style of user pills in user type field.
Improve style of user pills in user-type-custom-field on
account settings page.
2018-08-21 11:42:59 -07:00
Yashashvi Dave 66c2b6d2a6 custom profile field: Remove unnecessary table header from edit form.
Remove unnecessary table header in edit-choice-field form.
2018-08-21 11:42:58 -07:00
Yashashvi Dave d5f3c9b3bc custom profile field: Rename field types in UI. 2018-08-21 11:37:51 -07:00
Yashashvi Dave 6e65235a6d zerver/lib/events.py: Add FIELD_TYPE_CHOICES_DICT to page_params.
This commit add FIELD_TYPE_CHOICES_DICT to page_params and replace
FIELD_TYPE_CHOICES.

FIELD_TYPE_CHOICES_DICT includes all field types with keyword, id
and display name. Using this field-type-dict, we can access field
type information by it's keyword, and remove all static use of
field-type'a name or id in frontend.
This commit also modifies functions in js where this page_params
field-types is used.
2018-08-21 11:37:51 -07:00
Yago González 6949ce1bad templates: Replace   with normal spaces.
This line full of non-breaking spaces dates back to before Zulip being
open sourced (ca4e6a0ff), so we can assume it was a fix that we don't
need anymore.
2018-08-21 11:13:47 -07:00
Yashashvi Dave 8ef0c6d99a custom profile field: Add length validation on field name and hint.
Add max length validation for custom field name and hint
on create-field and update-field backend views and
frontend forms.

Fixes #10284.
2018-08-17 08:37:27 -07:00
Yashashvi Dave f8b6bb6614 custom profile field: Remove add-btn of choices.
This commit
- Remove `add-btn` in choices, to create new input
  for choice
- Add logic which create blank input for choice at
  the bottom if user start typing into above input choice.
2018-08-14 10:17:57 -07:00
Yashashvi Dave 3c9a2a6d53 custom profile field: Remove logic of choice-field-delete-btn.
Hide `delete-btn` of first choice in create-new-custom-field and
edit-choice-type-field form, so user can not delete all choices
and have to submit at least one choice.
This commit remove this logic of choice-field-delete-btn from
both settings.
This is preparatory commit of adding new logic in `delete-btn`.
2018-08-14 10:17:57 -07:00
Cynthia Lin 300c4c496f user groups: Display error on user group name edit failure.
Fixes #10234.
2018-08-13 16:13:49 -07:00
Cynthia Lin 736388b4df user groups: Improve styling of user groups in admin view. 2018-08-13 16:13:49 -07:00
Shubham Padia e21e8c1bae compose: Hide subscribe button and change text for waiting period users.
Fixes #10124.
Users in the waiting period category cannot subscribe other users to
a stream. When a user tries to mention another unsubscribed user, a
warning message appears with a subscribe button on it to subscribe
the other user.
This commit removes the subscribe button and changes the warning text
for users in the waiting period category.
2018-08-13 10:18:35 -07:00
Shubham Padia 3f019cafb2 compose: Improve error handling when subscribing other users to a stream.
Instead of displaying a fixed error message inside the yellow bar itself,
now the yellow bar disappears on error and a red compose_error is shown.
The error message is the one returned from the server.
2018-08-13 10:18:35 -07:00
Harshit Bansal 9057e543ac emoji: Disable support for letting users switch emojisets.
Due to copyright issues with potentially displaying Apple emojisets on
non-apple devices, as well as iamcal dropping support for the emojione
emojiset (see https://github.com/iamcal/emoji-data/pull/142), we are
dropping (perhaps temporarily) support for allowing users to switch
emojisets in Zulip.

This commit just hides the feature from the user but leaves most of
the infrastructure in place so that in the future if we decide to
re-enable the support we will not need to redo the infrastructure work
(some JS-side code is deleted, mostly because we'll want to re-add the
feature using the do_settings_change infrastructure anyway).

The most likely emoji set to add is the legacy "blobs" Google emoji
set, since it seems popular with some users.

Tweaked by tabbott to remove some additional JS code and update the
changelog.
2018-08-08 15:48:04 -07:00
Yashashvi Dave 4aedc055ce custom profile fields: Fix click handler executed multiple times.
Previously, we incorrectly setup the click handler on
create-custom-field-btn each time settings overlay opens, which
executes handler multiple times results in more than one HTTP request
to server for custom field creation.

This commit creates an ID for create-field-btn and initializes the
click handler on this button, instead of the form; the side effect of
that change is that we're now no longer double-adding this click
handler every time the page is opened.

This isn't a clean solution; ideally, we'd only call the function to
add the click handler once in the first place.

Fixes #10126.
2018-08-08 14:54:37 -07:00
Yashashvi Dave 07959bf18e custom profile field: Reset delete-btn of choices on choice ordering.
Admin user must enter at least one choice for choice type fields
in create new custom field form. Admin can not delete all choice
options in form.
Reset delete-btn of choice inputs on choice reordering so that
admin can delete all choice except first choice input option.
2018-08-08 11:31:15 -07:00
Yashashvi Dave e4bd72ea44 custom profile field: Replace choice-order input with drag-drop rows.
Currently, admin user has to add order of custom-field-choice in
input box to create and edit choice-type custom field.
Remove this input boxes and add drag-drop list of custom-field-choices
using Sortable.js.

Fixes #10129
2018-08-08 11:31:15 -07:00
Marco Burstein 995d073dbf org settings: Fix a bug where the loading spinner was not visible.
In Chrome, the loading spinners on the Bots and Deactivated Users pages
were not visible due to the `filter` elements having duplicate IDs across
the different pages. (There are multiple `filter` elements with the ID
`uil-ring-shadow` on the page.)

To solve this, when generating a new loading SVG element, we append
the container element's ID to the filter's ID, thus preventing any
duplicates.

Fix #8620.
2018-08-08 10:59:23 -07:00
Rohitt Vashishtha c41c82aae0 settings_emoji: Use display_name in handlebars.
This commit fixes two issues with the previous implementation:

1. JavaScript's replace replaces only the first instance,
   thus we need to use a regex.
2. Handlebars was setting the id of the HTML elements with
   spaces in between which broke the delete button; now a
   new variable display_name is passed to the template.

This also makes changes to the casper tests to have an emoji
name with multiple spaces in it to ensure this bug doesn't
appear again.
2018-08-07 10:22:08 -07:00
Abhilash Verma fd9652a9d7 settings_emoji: Make strings more user-friendly. 2018-08-04 09:37:48 -07:00
Shubham Dhama 4a53560106 settings_users: Change users "Make admin" button to dropdown.
This is done taking "Guest user" into account as we're soon
gonna support that.
2018-08-02 15:55:50 -07:00
Shubham Dhama 338acb1008 settings_users: Change class name for "Save changes" button. 2018-08-02 15:55:50 -07:00
Shubham Dhama 7776fa0d05 settings_user: Move "Make admin" button to user-info-form modal. 2018-08-02 15:55:50 -07:00
Shubham Dhama 6d699ff59c settings_user: Add icon for admin users. 2018-08-02 15:55:50 -07:00
Cynthia Lin 0f34e2fe3c subs: Fix broken streams list header/search container in Safari.
Fixes #10064.
2018-08-02 09:55:32 -07:00