Commit Graph

463 Commits

Author SHA1 Message Date
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
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
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
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 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 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
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
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
Abhilash Verma fd9652a9d7 settings_emoji: Make strings more user-friendly. 2018-08-04 09:37:48 -07:00
Joshua Pan 6890b98dec settings: Use delivery_email for user settings. 2018-07-23 15:38:41 -07:00
Sarah de2ec8a05c notification settings: Add UI for stream email notifications.
Previous commits have fully implemented the logic for stream email
notifications; this final commit adds support for configuring it to
the UI.

Fixes #6511.
2018-07-14 12:19:33 +05:30
Aditya Bansal 37b1100a2c organization-settings-admin.handlebars: Use fa-4.7 icon prefixes. 2018-07-11 20:31:17 +05:30
Aditya Bansal 4731ad1a1b account-settings.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:31:17 +05:30
Aditya Bansal 44dd01b603 profile-field-choice.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal 880986b9ee invites-list-admin.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal 2e6e331439 bot-settings.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Max Nussenbaum 9be31d2b1b settings: Restyle x that clears date field.
This restyles the x that clears a date field to be more consistent
with the rest of the app, and to appear inside the field.
2018-07-11 19:16:25 +05:30
Cynthia Lin e790f35d0e settings UI: Change user profile pill containers to match input styling.
Previously, commit e5d2e95 attempted to change the styling of the user
profile pill containers to match the inputs above it. However, it used
an incorrect selector (#settings_page), resulting in all other pill
containers on settings pages being changed to match it as well
(example: User groups pill containers in Organization
settings). Additionally, its selector's specified background attribute
resulted in problems in dark mode.

To correctly style the user profile pill containers to match the other
input's styling, we apply the uneditable-input class native to
Bootstrap so that we don't need to create an entirely new selector to
style it.

Note that the .custom_user_field .pill-container selector was added so
that it could match the padding of inputs. Also, the
.custom_user_field .pill-container:focus-within selector was added
with attributes straight from Bootstrap's input:focus selectors so
that .custom_user_field .pill-container would have a blue outline
while users were typing in the input pill, just like the other inputs.
2018-07-11 19:06:04 +05:30
Yashashvi Dave 554a0773dc custom fields: Add icon to delete value of date-type-custom-field. 2018-07-01 02:05:00 -07:00
Yashashvi Dave 52b6d0ce9f custom fields: Add default value choice in choice-type-custom-fields.
Add default choice option in choice type of custom profile field.
2018-07-01 02:05:00 -07:00
Yashashvi Dave a6c03a4738 custom fields: Fix custom fields header not rendering properly.
Even when admin removes all custom fields from org, custom
fields header "Profile" doesn't get removed.
Render header "Profile" whenever custom fields data get changed.
2018-07-01 02:03:56 -07:00
Rishi Gupta d466f3fffc org settings: Update labels for organization profile. 2018-06-21 12:47:19 -07:00
Shubham Dhama 417f01386d bots: Hide UI for adding new bots for guest users. 2018-06-16 06:33:14 -07:00
Shubham Dhama 603139500a settings_bots: Extract logic for ability to create bots.
This is a minor refactor/deduplication and renaming of
'admin_only_bot_creation' to 'can_create_new_bots'
2018-06-16 06:33:14 -07:00
Shubham Dhama d40c2bb166 emoji: Make uploading new realm emoji inaccessible for guest users. 2018-06-16 06:33:14 -07:00
Shubham Dhama f148ed5bbf org settings: Improve error handling status elements.
With styling work by @maxnuss.

Fixes: #9188.
2018-06-06 09:00:35 -07:00
Tim Abbott d5206be969 settings: Fix high contrast mode not being development-only.
This feature is unfinished and doesn't do anything yet.
2018-06-05 10:10:53 -07:00
Yashashvi Dave 3654d4f92d jquery-form: Remove jquery-form use from get-API-key form in user settings. 2018-05-30 03:14:39 +05:30
Robert Hönig 04d68d2570 code: Rename flaskbotrc to botserverrc. 2018-05-29 10:19:17 +02:00
Yashashvi Dave a68ff22aed custom fields: Improve date picker popover for date type fields. 2018-05-27 23:01:22 -07:00
Yashashvi Dave b5cf73ae0c custom fields: Add UI for user type of custom fields. 2018-05-27 23:01:22 -07:00
Robert Hönig bdf79f271d Implement and document new Botserver setup routine.
Previously, the Botserver determined which bot to run for an
outgoing webhook by dispatching on a different URL endpoint
for each bot. Now, instead, the Botserver determines which bot
to run by the section header of the bot in the flaskbotrc.
This commit makes the frontend provide the new flaskbotrc
and updates the setup steps for the Botserver in the docs.
2018-05-25 10:33:40 -07:00
Tim Abbott 6967b6519d settings: Add a development-only setting for less dense mode.
This should make it easier for us to iterate on a less-dense Zulip.

We create two classes on body, less_dense_mode and more_dense_mode, so
that it's easy as we refactor to separate the two concepts from things
like colors that are independent.
2018-05-24 12:31:37 -07:00
Umair Khan adaeaccd20 2FA: Add link in settings to setup two-factor. 2018-05-23 15:49:41 -07:00
Shubham Dhama ec4e5e73ab org settings: Make time limit input elements inline to dropdown.
(To make the capitalization pass we added `N` to ignored phrases.)
2018-05-22 19:32:44 -07:00
Shubham Dhama edcb5f9b1c org settings: Fix the spacing/indentation of dependent input elements. 2018-05-22 19:32:44 -07:00
Shubham Dhama a001424a4b org settings: Use do_settings_change for auth method checkboxes.
Fixes: #9224.
2018-05-22 14:03:20 -07:00
Yashashvi Dave 3b09dda879 edit bot: Fix UI element shows incorrect interface for outgoing webhook.
Dropdown element for outgoing interface type was not showing correct
value, cause the way default value was set to dropdown was incorrect
(it should have been setting the selected parameter on the selected
option if it were going to be selected via the template code).

Fixes #9419.
2018-05-21 10:07:18 -07:00
Yashashvi Dave d66d2445b4 custom fields: Don't ask org admin to enter "value" for choice.
When org admin add choice type of custom profile fields, set
numeric ID for choices instead of asking "value" from org admin.
2018-05-15 12:08:29 -07:00
Tim Abbott dc7f6c8a48 bots: Fix incorrect maximum lengths for outgoing webhook URLs.
2083 is the correct maximum length for a URL.
2018-05-14 10:42:23 -07:00
Tim Abbott 384a8f2e9f custom fields: Clean up template logic for field ID.
This makes a few important cleanup changes:
* Using the more standard data-field-id name for the ID value.
* Using $(e.target).closest() rather than `.parent`, which is more
  robust to future changes in markup.
2018-05-05 15:40:16 -07:00
Yashashvi Dave 06e63af4b4 custom fields: Add UI for choice type custom fields. 2018-05-05 11:59:08 -07:00