Commit Graph

1360 Commits

Author SHA1 Message Date
Aditya Bansal 975ab6ac16 user_presence_row.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal 65eaf92acd user_profile_modal.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
Anupam Dagar 88ddf2bf5d settings UI: Add copy zuliprc button to bot information box.
Fixes: #9510
2018-07-10 15:19:05 +05:30
Shubham Padia e5f28e8960 pills: Add basic support for images in input pills.
Allow passing image link in the item passed to appendValidatedData.
When passing image link via any of the append* functions, make sure
that create_item_from_text for that pill also adds the image link to
the item created.
This commit does not make any visual change to the current app.
Changes to user_pill.js are necessary to enable user avatars for
pills.
2018-07-10 15:07:56 +05:30
Rhea Parekh fe4cad15a4 widgets: Add todo widget. 2018-07-10 11:18:05 +05:30
Cynthia Lin 642111b6fa settings UI: Expand bot card width in narrow windows.
Fixes #9513
2018-07-05 12:29:52 +02:00
Aditya Bansal 4f090861e7 admin_streams_list.handlebars: Remove since its dead.
This was killed when the "Deleted Streams" feature was dropped
in commit 7bbe44d7 but we forgot to deal with it at the time.

squash to admin_streams_list
2018-07-04 23:51:45 +05:30
Steve Howell d90d1a04bb bot settings: Clean up error handling.
The error handling for delete/reactivate was broken.
The old code related to appending id_suffix to the ids of
the per-bot error divs did not have corresponding
selectors in the actual error handling.

Things still aren't great, but there's a bit more
encapsulation now, and you'll see errors for the
delete/reactivate cases.
2018-07-03 06:02:49 -07:00
Steve Howell fef98c932b bot settings: Fix reactivation feature.
The reactivation feature was broken, because the
template was still using email when we were looking
for user_id.
2018-07-03 06:02:49 -07:00
Rhea Parekh 784e7249a5 widgets: Add question in the poll widget itself.
The user can also edit the question after adding it.

The question in the poll can only be added/edited
by the user who started the poll.

The input bar will be disabled for the other users
if the question is not yet added. If the question is
added, the input bar will not be visible to the other
users.
2018-07-01 19:56:19 -04:00
Rhea Parekh 19725b74d5 widgets: Add basic styling for poll widget. 2018-07-01 19:56:19 -04:00
Rhea Parekh 2673a7f71f widgets: Add basic styling for tictactoe widget. 2018-07-01 15:09:18 -04:00
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 aa39b1e28e custom field: Allow admin to change custom fields order using drag & drop.
Using sortablejs library, allow admin to modify custom fields order
in admin settings using drag and drop of custom field list element.

Fixes #9351
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
Shubham Padia 2977a4cb6f right-sidebar: Narrow pm/group-pm on clicking unread count badge.
Fixes #9797.
Clicking on the unread count badge on the right sidebar did not
narrow the selected pm/group-pm. This commit moves the count div
inside selectable_sidebar_block. Also uses flexbox instead of
inline-blocks for user presences selectable_sidebar_block.
2018-06-27 11:26:24 -04:00
Rishi Gupta c0751c0644 stream settings: Rename stream accessibility section heading.
The content of this section has recently changed to include posting
restrictions. "Stream accessibility" was sort of an awkward name anyway.
2018-06-23 18:40:42 -07:00
Rishi Gupta d5c48af365 stream settings: Fix link to stream-permissions user doc. 2018-06-23 18:40:42 -07:00
Rishi Gupta c6048527bf stream settings: Rename average messages to estimated messages. 2018-06-23 12:48:15 -07:00
Cynthia Lin 71e3f778cc right sidebar: Expand sidebar block width for greater click area.
Fixes #9797
2018-06-22 08:57:01 -04:00
Rishi Gupta d466f3fffc org settings: Update labels for organization profile. 2018-06-21 12:47:19 -07:00
Shubham Dhama 8e032376f9 guest: Restrict guest access to user group creation and updation. 2018-06-19 11:04:14 -07:00
Tim Abbott b0db90648a topic_edit_form: Disable autocomplete for topic editing.
Browser autocomplete is just annoying for this context.
2018-06-16 09:06:34 -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 Padia 3a742d8ae4 popovers: Fix keyboard navigation for user profiles except their own.
For other users' profile, keyboard navigation worked only upto 2
items as the third item with '.mention_user' could not be focused.
This was due to href missing from the anchor tag. $.focus() requires
href to be defined, even if it is '#' to focus the anchor tag.
2018-06-13 05:57:14 -04:00
Eeshan Garg 0a43e5e257 Replace all user-facing references to "invite-only" with "private".
Fixes #9611.
2018-06-12 13:37:45 -04:00
Cynthia Lin 88795898a2 message edit: Fix edit author text overflow on images.
Fixes #9175.
2018-06-08 07:49:28 -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
Max Nussenbaum ca18c635e7 User profile: Style the custom user profile fields.
This restyles the user profile modal so that the custom fields
look nice.
2018-06-04 16:15:24 -07:00
Yashashvi Dave 3422766c25 create stream: Fix widget for changing privacy doesn't render initially.
When admin user create new private stream, widget for changing privacy
of stream doesn't render. Because we render subscription-settings
template partially on subscription-add event, so this case wasn't
handled.

Fixes #9469
2018-06-01 12:09:50 -07:00
Shubham Dhama ceae1a1c5f streams: Improve 'is-announcement-only' checkbox. 2018-06-01 10:05:13 -07:00
Shubham Dhama c03acaa078 streams: Improve and make stream_privacy_modal consistent with others.
Previously weren't registering modal properly, which gets fixed by
using open_modal. It further fixes closing of modal by using escape
and positioning of modal.

Fixes: #9590.
2018-06-01 10:05:13 -07:00
Max Nussenbaum eddcec5e86 hotspots: Style "How to reply" hotspot.
Styles the "How to reply" hotstop that shows for new users to
match the rest of the hotspots.
2018-05-31 12:56:37 -07:00
Steve Howell d67c323c01 poll widget: Add very basic styling.
These styles aren't great, but they're hopefully
better than none at all and inspire a follow up
commit from somebody else (so it starts to look
like a "real" feature instead of feeling completely
proof-of-concept).
2018-05-30 18:10:59 -07:00
Tim Abbott d947ada4da stream_creation: Improve documentation link pointing to help center. 2018-05-30 14:46:31 -07:00
Tim Abbott 984da1f3b1 stream creation: Remove the bullhorn symbol for announcement.
It felt a bit awkward with the adjacent content.
2018-05-30 14:41:44 -07:00
Tim Abbott 555d3128d8 templates: Rename the stream creation form template.
"subscription creation" was a pretty confusing name for this.
2018-05-30 14:29:37 -07:00
Shubham Padia 214ce1ccca streams: Add create and edit ui for is_announcement_only.
The user can now specify the value while creating a stream.
An admin can later change it via `Change stream permissions`
modal. Add is_announcement_only to subscription type text.
2018-05-30 14:22:15 -07:00
Shubham Padia 518764b843 streams: Change stream-privacy-model save button text to `Save changes`. 2018-05-30 14:18:41 -07:00
Tim Abbott bab09a6579 stream_types: Suggest private, shared history before protected history.
This feels like the more common use case for most users.
2018-05-30 14:17:32 -07:00
Tim Abbott ee45125f82 stream_types: Change descriptions of stream privacy models. 2018-05-30 14:17:00 -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
Cynthia Lin 818611ac4e user groups: Sanitize pill_container selector to avoid escaped strings.
Fixes #9325.
2018-05-25 12:02:34 -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
Steve Howell 1b57e568ff Add "zform" functionality to the web client.
A "zform" knows how to render data that follows our
schema for widget messages with form elements like
buttons and choices.

This code won't be triggered until a subsequent
server-side commit takes widget_content from
API callers such as the trivial chat bot and
creates submessages for us.
2018-05-24 09:30:22 -07:00
Shubham Dhama 1c5147c46c stream: Deduplicate template code for stream privacy types.
Follow-up of #9243.
2018-05-24 07:34:37 -07:00
Umair Khan adaeaccd20 2FA: Add link in settings to setup two-factor. 2018-05-23 15:49:41 -07:00
Joshua Pan dcee398622 onboarding: Redesign intro_reply hotspot in bottom whitespace.
This is a trial to have the first reply hotspot in the bottom
whitespace (and stick there until "Got it!"  is pressed).

Tweaked by tabbott to clean it up a bit.  Still needs more work on the
visuals.
2018-05-23 14:22:19 -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
Tim Abbott 106d06b235 streams: Rename change_change_subscription_type to reference permissions.
This is a preparatory refactor for when we start having other
permissions options available in this UI (e.g. announcement-only streams).
2018-05-21 16:14:18 -07:00
Tim Abbott 9df3480263 streams: Remove now-obsolete can_make_public and can_make_private.
Now that we've moved it into a bulleted set of options inside a modal,
there's no good reason to have separate variables for the corner cases
around who can manage a stream.
2018-05-21 16:12:50 -07:00
Eeshan Garg 9c8865ba76 frontend: Add UI to create/edit private streams with public history.
This completes the effort of making this a user-facing feature.
2018-05-21 16:03:06 -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
Aditya Bansal e41d32a15a reminders: Add various design improvements for the UI/reminder msg. 2018-05-21 09:07:37 -07:00
Steve Howell aa7c031f36 Add tictactoe widget.
Thanks to @amanagr for a few refinements to my original
version, which was really raw.  (It's still raw.)
2018-05-16 15:13:33 -07:00
Steve Howell d0e70a9700 Add poll widget. 2018-05-16 15:13:33 -07:00
Yashashvi Dave b949d10592 /json/bots: Replace email with user_id in API to generate bot_api_key.
Fixes #3643.
2018-05-15 16:37:06 -07:00
Yashashvi Dave d6e2f9fc88 /json/bots: Replace email with user_id in API to update bots. 2018-05-15 16:34:17 -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
Yashashvi Dave 0554e68528 static/templates/edit_bot.handlebars: Fix undefined bot_id.
Template was rendering undefined value of `bot_id` instead of
`user_id`.

Fix this by replacing `bot_id` with `user_id` and changing
template data variable to `data-user-id` to avoid
future confusion.
2018-05-15 10:35:19 -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
Yago González 184bd8304e i18n: Tag missing strings for translation. 2018-05-12 16:44:56 -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
Yashashvi Dave 512ab5dbaf js/settings_account.js: Remove hard-coded field no, clean template context. 2018-05-05 11:59:08 -07:00
Tim Abbott 02ad498aa2 attachments: Use data-attachment-id to refer to attachments.
This may fix an issue with the delete button not actually sending the
right data to the server; I'm not sure.  Extracted from a patch by
Aastha Gupta.
2018-05-04 16:22:27 -07:00
Tim Abbott 69c4645bd2 attachments: Stop fetching attachments in / endpoint.
We only use this data in a rarely-used settings screen, and it can be
large after years of posting screenshots.

So optimize the performance of / by just loading these data when we
actually visit the page.

This saves about 300ms of runtime for loading the home view for my
user account on chat.zulip.org.
2018-05-04 16:22:26 -07:00
Shubham Dhama 9f78540bd0 org settings: Make save-discard widget look better.
This fixes some minor glitches with buttons:
* Movement of the organization-settings-parent block on the
  appearance of widgets.
* Large and odd look of save button.
* Use of fadeIn and fadeOut rather than changing opacity as
  opacity don't actually remove them.
2018-05-03 10:32:34 -07:00
Aditya Bansal 898c281692 public_archives: Add styling to the public topics. 2018-05-02 15:23:33 -07:00
LuisFSilva a072b2a153 right-sidebar: Fix group PMs online indicator.
People found it confusing that it would show up at light-green when
the users in the thread were idle.

Fixes #8242.
2018-05-02 12:41:01 -07:00
Shubham Dhama 093c212b0c org settings: Change realm_org_join_restrictions label text.
This change with label text is done to make things similar the one for
realm_user_invite_restriction.
2018-05-02 11:42:28 -07:00
Shubham Dhama c293bb82c4 org settings: Change user joining invitation setting to dropdown. 2018-05-02 11:42:26 -07:00
Angelika Serwa f4f64243dd custom_profile_fields: Support changing the sort order of the fields.
Tweaked by tabbott for variable naming and the URL.

Closes #8879.
2018-04-30 18:17:41 -07:00
Yashashvi Dave dbd24c5c93 create stream: Fix preview btn not showing on private stream creation.
Fixes #9028
2018-04-30 11:15:07 -07:00
Yashashvi Dave 576920bf8c custom fields: Add frontend validations in textual custom fields.
Add validations for short and long textual custom fields in
frontend.
2018-04-30 23:04:25 +05:30
Yashashvi Dave 5e63e6061b custom fields: Add UI for custom field hint.
Fixes #8876
2018-04-30 10:14:50 -07:00
Yashashvi Dave 66759358e2 create stream: Add maxlength restriction on name and description. 2018-04-30 10:11:25 -07:00
Yashashvi Dave 7bbe44d7a0 org settings: Remove "Delete streams" administrative tab from settings.
Fixes #9227
2018-04-30 17:47:34 +05:30
Tim Abbott 7d6bb3dcb4 settings: Remove obsolete default_desktop_notifications setting.
This actually hasn't been hooked up to do anything in years.

While we're at it, we remove the entire "Zulip Labs" settings page.
2018-04-28 13:46:07 -07:00
Shubham Dhama 7f9cfab15a org settings: Add frontend for allow_community_topic_editing. 2018-04-28 13:00:29 -07:00
guaca 3c01ea78b0 settings: Add modal fade.
This implements the modal fade idea suggested here:

https://chat.zulip.org/#narrow/stream/6-frontend/subject/Visual.20Design.20Strategy.20for.20Settings.20UI/near/559763
2018-04-28 12:55:15 -07:00
Steve Howell 068e4bf32b buddy list: Populate user-fade via templates.
When we populate the buddy list or update it for activity, we now
have buddy_data set a faded flag that is rendered in the template.
This avoids some re-rendering overhead and is on the eventual path
to having our widget be more data-oriented (and all rendering happens
"behind" the widget).

We still do direct DOM updates when the compose state changes or
when we get peer subscription events.
2018-04-28 11:15:14 -07:00
Tim Abbott 955ef3b18c bot settings: Fix spelling of data-user-id. 2018-04-28 10:23:46 -07:00
YJDave 6bef44a9fa org setting: Add time limits for message deleting.
Add realm setting to set time limit for message deleitng.
Set default value of message_content_delete_limit_seconds
to 600 seconds(10 min).

Thanks to Shubham Dhama for rebasing and reworking this.  Some final
edits also done by Tim Abbott.

Fixes #7344.
2018-04-27 19:22:28 -07:00
Shubham Dhama 790a9fd0b9 settings: Fix escaping of HTML in checkbox labels.
Some labels like one for `translate_emoticons` which contains HTML
get escaped because of use of `{{ label }}` syntax, which escapes
the string for XSS security purpose but since labels aren't any
threat to any such security cases, we can use triple curly brackets
`{{{ label }}}` syntax.

Fixes: #9231.
2018-04-26 00:36:34 -07:00
Umair Khan 93bb3e8d6e profile: Add UI for Choice field. 2018-04-26 00:35:54 -07:00
Shubham Dhama b411bc050e org settings: Change join org permissions to dropdown. 2018-04-25 16:00:55 -07:00
Tim Abbott dcadded1a4 emoji settings: Remove emoji style indentation.
We got rid of that indentation everywhere else in these settings.
2018-04-25 11:44:16 -07:00
Shubham Dhama f19b0b3254 org settings: Change message_edit settings to dropdown.
This coverts the "checkbox" for `realm_allow_message_editing`  and
"input" for `realm_message_content_edit_limit_seconds` into a
dropdown with the option for custom time limit option.
2018-04-23 18:22:35 -07:00
Vishnu Ks 7533796ea9 popover: Add an option to show user profile.
Fixes #8880
2018-04-23 16:56:24 -07:00
Vishnu Ks c9e932a7ce settings: Add support for Hangouts as the video chat provider.
The only thing that's annoying about this feature is that you need to
be a paying G Suite customer to use it.
2018-04-23 09:39:47 -07:00
Natalie Totonchy bc7c3df621 drafts: Fix confusing disconnect between focused element and enter hotkey.
The enter hotkey targets the focused message, not the one the user is
hovering over.

Fixes #9093.
2018-04-19 12:44:03 -07:00
Tim Abbott e539e966c9 profile field settings: Disable autocomplete. 2018-04-19 11:37:15 -07:00
Umair Khan 79ff89ed8b profile: Add hint field in the settings UI.
We still don't actually display it in the "Edit your profile" UI.
2018-04-19 11:32:45 -07:00
Shubham Dhama 6a11ff5b28 settings: Deduplicate the template code for checkboxes. 2018-04-19 11:02:30 -07:00
Shubham Dhama a3ba484c99 settings: Wrap subsections into seperate divs.
Following templates are affected: display-settings.handlebars and
ui-settings.handlebars.
There will be no UI change, it is just to make code more readable.
2018-04-19 11:02:30 -07:00
Shubham Dhama 50545a3571 settings: Revert checkmark icon to fontawesome and checkbox-green.
In 7b8da9b we have introduced some other checkmark icons
which aren't necessary as old icons still make sense there.

So removing them as they don't add any extra value.

Fixes: #8995.
2018-04-12 11:06:43 -07:00
YJDave 92a04b31a0 custom fields: Clean custom fields to use existing defined function. 2018-04-12 09:40:09 -07:00
guaca a19daf0ab2 Settings: Fix vertical spacing.
Removed the top margin of input-group css
 to prevent the double margins. Also fixed the
 default-language positioning, and maintained
margin consistency in organization settings.

Fixes #8890.
2018-04-12 09:38:24 -07:00
Marco Burstein 7c66d11781 compose: Show avatars for people in typeahead autocompletes.
`@everone` and `@all` will have a megaphone icon from FontAwesome in
place of the avatar.

Also, fix the `composebox_typeahead` tests to account for the images.

Fix #6635.
2018-04-09 15:47:11 -07:00
YJDave f15ddc93e0 create stream: Fix stream email not rendering on stream creation.
Fixes #8817
2018-04-07 20:10:45 -07:00
Aditya Bansal b9f1acb300 linter: Enforce 2 space indents on tags spread over multiple lines.
We make some specific cases of tags use 2 space indents.
The case description:
* A tag with opening tag spread over multiple lines and closing tag
on the same line as of the closing angle bracket of the opening tag.
* A tag with opening tag spread over multiple lines and closing tag
not on the same line as of the closing angle bracket of the opening
tag.

Example:
Case 1:

Not linted:
<button type="button"
class="btn btn-primary btn-small">{{t "Yes" }}</button>

After linting:
<button type="button"
  class="btn btn-primary btn-small">{{t "Yes" }}</button>

Case 2:

Before linting:
<div class = "foo"
     id = "bar"
     role = "whatever">
     {{ bla }}
</div>

After linting:
<div class = "foo"
  id = "bar"
  role = "whatever">
    {{ bla }}
</div>
2018-04-07 20:08:44 -07:00
Aditya Bansal 550222dede linter: Make multiline handlebar singleton tags use 2 space indentation. 2018-04-07 20:08:38 -07:00
Aditya Bansal 2fe012ffff linter: Make html singleton tags use 2 space indentation. 2018-04-07 20:08:31 -07:00
Shubham Dhama 4b7ce531c3 settings: Revert "loader" indicator from fontawesome to SVG.
This reverts loader indicator from the new fontawesome
`icon-button-loading` to previous SVG one, this change is only reflected
to those loaders which use `loader.handlebars` template for
loading indication(because there are some indicators like "Save changes"
in org settings which don't use loader.handlebars).

This main problem with this indicator is that it is bit
inconsistent with other places where we use `loader.handlebars` like
loading Zulip icon which appears while fetching old messages.
2018-04-06 12:32:45 -07:00
Armaan Ahluwalia 7b8da9b6c0 settings: Changed checkbox and close icons on settings.
Introduced a new checkmark icon in the settings page
from entypo ( www.entypo.com )  to make icons more
consistent between user and organization settings.
2018-04-05 21:49:13 -07:00
Armaan Ahluwalia 58d07fabef settings: Change save and discard button look and feel.
This commit changes the way the save and discard buttons on the
organization profile, settings and permissions tabs look and fades
them out after a delay. It also cleans up the code a bit in the
settings_org.js file. It introduces changes to the css in
settings.css as well as the template for save-discard buttons.

It also fixes a bug on the user settings whereby if an option
that requires reload is clicked before clicking an option that does
not require reload, the reload message is erased. This could create
an issue where the user is not aware that a reload is required.
The loader is also changed to using fa-icon as loading spinner on
user settings and the colors are tweaked a little bit.
2018-04-05 21:49:12 -07:00
Tarun Kumar c53458c9c0 user-groups: Add template for non-editable groups. 2018-04-05 17:40:12 -07:00
Balaji2198 605916f6d7 compose: Add subscribe button to the not subscribed stream error message.
Before that, we needed to go the stream settings to subscribe to a
particular stream.

Fixes #3877.
2018-04-05 17:15:18 -07:00
Shubham Dhama 2aaad502b4 org settings: Hide "disable" option when setting already disabled.
Fixes: #8942.
2018-04-04 11:40:35 -07:00
Balaji2198 591e152e38 org settings: Fix error handling for upload custom emoji. 2018-04-03 13:18:53 -07:00
Tim Abbott f6a355ec14 user settings: Disable autocomplete for name-change form. 2018-04-02 18:37:16 -07:00
Shubham Dhama 85077fbc9c org settings: De-duplicate template content for checkboxes. 2018-04-01 15:02:13 +05:30
Shubham Dhama 07af13ccb3 org settings: Extend settings checkbox template for label & prefixed id.
(It is a preliminary change for deduplication of org settings template.)
This is done because of some settings like organization-settings
has ids which match the pattern of having a prefix `id_`
before the property name.

For those settings which don't have any prefix, there will be no
effect.
Here obsolete `t` in the label is removed since we do
label translations in JS files.
2018-04-01 14:44:24 +05:30
Shubham Dhama b7aae89029 org settings: Add realm level default time format setting. 2018-03-31 16:23:26 -07:00
Shubham Dhama f4d6b2a853 org settings: Split "Language and notifications" section.
This splits "Language and notifications" section into "Default user
settings" and "Notifications".
With this, we can easily add other default user settings in the
same place.
2018-03-31 16:22:52 -07:00
Steve Howell cd8c15f1cf pills: Use a template to render the pills. 2018-03-31 09:32:52 -07:00
Tim Abbott 5c1dd162be settings: Eliminate remaining NEW_USER_BOT code.
I somehow missed this when removing the rest of the custom
NEW_USER_BOT logic.

This may fix a Casper test that has been failing.
2018-03-30 09:16:22 -07:00
Umair Khan c14cefc24c settings: Add support for adding/removing custom profile fields.
Now that we have support for displaying custom profile fields, this
adds administrator-level support for creating them.

Tweaked by tabbott to fix a few small bugs and clean up the commit message.

Fixes #1760.
2018-03-29 13:59:16 -07:00
Shubham Dhama f5a57dc614 settings notification: De-duplicate template content for checkboxes.
This creates a new template `settings_checkbox.handlebars` to de-duplicate
the checkboxes in notification settings page.
2018-03-28 16:17:45 -07:00
Balaji2198 a583733723 settings: Fix error handling for uploading an invalid file for Upload icon.
Fixes #8842.
2018-03-28 10:52:16 -07:00
Shubham Dhama 6427afec43 settings notification: Wrap subsections in seperate divs.
This wraps each subsection in notification settings in a parent div.
This is done just to make the code more readable and clean.
There will be no UI change.
2018-03-27 18:01:03 -07:00
Shubham Dhama 1d88eb5d6a org permissions: Remove redundant status elements. 2018-03-27 18:01:03 -07:00
Shubham Dhama 2f496ffe1f org profile: Use new org setting changes saving framework.
With this we have the same way to save changes done in org profile
subsection, i.e. show "Save" button beside header of subsection,
add "Discard changes" button for org profile subsection and
show "Save" and "Discard" button only when needed.

Also, there is so much code which become obsolete which is removed
in this commit.
2018-03-27 16:48:28 -07:00
Shubham Dhama 034eaf0aa1 org settings: Restructure org-profile-admin template. 2018-03-27 16:45:32 -07:00
Marco Burstein 6279a9ef09 message view: Hide "view source" and "quote" for deleted messages.
Fix #8839.
2018-03-27 16:43:24 -07:00
Steve Howell cb54acf120 stream create: Make docs open in another tab.
We really don't want to make the user hit the back button right in
the middle of creating a stream.
2018-03-25 10:21:44 -07:00
Steve Howell e30b619ad5 Fix leaky O(N) email hint handler.
We only have one possible email hint, so there's no reason
to create one for each stream row, especially since we don't
clean them out when we close stream settings.
2018-03-25 08:28:04 -07:00
Tarun Kumar 5ac767149c user-groups: Update UI to mention only members can edit a user group.
Also, we remove unnecessary tips regarding modification settings.

Remove 'Only organization administrators can edit these settings'.
Remove 'Anyone in this organization can add user groups'.
2018-03-23 14:44:47 -07:00
Tim Abbott b637cc68ad display-settings: Fix indentation of emoticons checkbox.
This didn't look good indented.
2018-03-23 14:38:26 -07:00
Tim Abbott 4b8dda24d0 display-settings: Move emoticons option after emoji style.
This new position is clearer about its role.
2018-03-23 14:38:00 -07:00
YJDave 917b214411 subscription: Improve email-hint popover style. 2018-03-23 09:55:44 -07:00
Tim Abbott dfb364ecb7 settings: De-duplicate template content for save/discard widgets.
This just uses a simple handlebars template for this repeated block.
2018-03-23 08:25:05 -07:00
Shubham Dhama c50117418e org settings: Fix unexpected saving of input-text fields on "Enter".
Before this commit when we press enter in the text-input field the
first subsection get saved because a click event is triggered for
the first save button (of first subsection) irrespective of the
location of text input field in the whole form which is expected
as a default behavior of the forms.

The simple fix is to make the button of type "button" and override
action of "enter" in an input field.

More info at https://stackoverflow.com/a/12914700/7418550 and
https://stackoverflow.com/a/7060762/7418550
2018-03-23 07:28:46 -07:00
Shubham Dhama 8304c37dfb org settings: Make each subsection of org-permissions independent.
This makes each subsection of org-permissions independent from the
perspective of saving changes.
All the behavior we have for org-settings are also ultimately
reflected here as well like individual "Save" button for each
subsection, "Discard" button for discarding changes done in a
subsection and appearance of this button only when required.
2018-03-23 07:28:46 -07:00
Aastha Gupta f900f955c0 message edit: show spinner on topic change.
On clicking the checkbox in topic edit form, display a spinner and
hide the cancel icon.  Also, do not display any success message.

Fixes #8793.
2018-03-23 07:21:22 -07:00
YJDave ea8af14a44 custom profile data: Remove placeholder for input fields. 2018-03-23 16:27:52 +05:30
Shubham Dhama 42ee40d1bc org settings: Refactor failed status element to use class.
This changes failed status element to use class
`.admin-realm-failed-change-status` rather than id so that we can use
the same code in `save_organization_settings()` in future to refer to
failed-status element of that section.
2018-03-22 23:17:13 +05:30
Shubham Dhama c5696f8008 org permissions: Restructure org-permissions-admin template.
We restructured template to make org-permissions-template have more
separated subsections and so that we can easily apply event handlers
and selectors to their corresponding subsections (there will
be no change in UI).
(This is similar to 8b54b08)
2018-03-22 23:17:13 +05:30
YJDave 66f80441ce custom profile data: Add template for custom user profile fields. 2018-03-21 16:08:12 -07:00
YJDave 14fba1b9ed user settings: Move deactivate account setting to the bottom of page. 2018-03-21 16:08:11 -07:00
Shubham Dhama 9ca335bcb2 org settings: Add discard button to discard changes for a subsection.
This will reset the changes done in a subsection to the current ones
in page_params.

It will only appear when there are some user-provided changes to be reset.
2018-03-20 14:48:59 -07:00
Shubham Dhama 62f646816d org settings: Show "save" button only when setting is changed.
With this "Save" button is only shown when there are changes in a
subsection. This means if we changed a setting and reverted it back to
original ones, then, "Save" button will get disappear. Hence, we're shown
"Save" when there are some property changes to send to the server.
2018-03-20 14:48:12 -07:00
Shubham Dhama be0298314a org settings: Make each subsection independent for saving changes.
This makes each subsection(like "Message feed") independent of changes
done in any other subsection and the save button of each subsection
saves the changes done in that subsection only.
2018-03-20 14:48:10 -07:00
Cynthia Lin 333b8b095c subscriptions: Use tooltips for stream info hover content.
Fixes #8718.
2018-03-18 19:44:53 -07:00
Shubham Padia 4fb1704e6e settings: Add save instructions below pill container on changes.
Fixes #8088.
2018-03-15 17:29:12 -07:00
Shubham Padia dd5ce49ce0 settings: Add button to cancel user group auto save on blur.
Clicking the cancel button removes all the changes and the user
group returns back to the original state. Saved button is showed
once the changes are saved on blur.
2018-03-15 17:29:12 -07:00
Shubham Padia 40d6ee54ca settings: Move user group delete button to top right corner.
Also replaces trash icon with "Delete" for the button.
2018-03-15 17:29:12 -07:00
Shubham Dhama 8b54b08064 org settings: Restructure org-settings-admin template.
This restructures the organization-settings-admin template into
different subsections. With this, we can easily limit the scope of
event handlers and selectors within their subsection to which
are applied.
There will be no change in UI because of this.
2018-03-15 17:06:45 -07:00
Tim Abbott c89ae4ef39 stream settings: Improve strings in traffic level section. 2018-03-15 16:47:09 -07:00
Tim Abbott 242f6d67b3 stream settings: Show subscriber counts unconditionally. 2018-03-15 16:47:09 -07:00
Nikhil Kumar Mishra ae7fe85ec5 stream settings: Improves visual appearance of "subscriber counts".
Fixes #8660.
2018-03-15 16:47:08 -07:00
Vishnu Ks c385fcefa8 templates: Fix translation tag for disposable email tooltip. 2018-03-15 14:35:24 -07:00
Shubham Dhama 8f4523e8dd compose typeahead: Add all public streams including unsubscribed streams.
This makes it convenient to mention a stream you're not subscribed to,
which can be useful for communicating about where a topic is
discussed, for example.

Fixes: #5757.
2018-03-14 11:10:43 -07:00
Shubham Dhama 7aeae688e7 compose: Remove draft older than 30 days.
This removes drafts older than 30 days as they become irrelevant
for the user. Those drafts are removed before populating them.

Fixes: #7602.
2018-03-14 10:57:11 -07:00
YJDave efffc07351 stream settings: Don't show add-subs-btn if user can't add subscribers.
Even if realm admin can access unsubscribed private stream subscribers,
admin can't add subscriber to stream. Hide the option to add subs to
stream in UI.
2018-03-14 09:21:14 -07:00
YJDave 2031118545 stream settings: Allow realm admins to access all private stream subs.
This will allow realm admins to access subscribers of unsubscribed
private stream.  This is a preparatory commit for letting realm admins
remove those users.
2018-03-13 14:59:09 -07:00
Brock Whittaker 1cb06cb359 organization-settings: Fix organization description textarea style.
This makes the textarea responsive by making the width 100% and
the max-width 500px so that it doesn't get *too* wide.

Please close #8511 when this is merged.

Fixes: #8504.
2018-03-13 09:51:33 -07:00
Tim Abbott 4ae1418831 popovers: Rename confusing my_email to user_popover_email. 2018-03-12 12:24:50 -07:00
Priyank Patel 29c6d23043 user profiles: Add copy-to-clipboard btn for long emails.
Implements copy to clipboard btn that shows up if email is too long.
Making it easier for user to copy long emails.
2018-03-12 12:06:40 -07:00
Vishnu Ks 3da2a1e18d admin: Add a realm setting to disallow signups using disposable emails.
Fixes #2955
2018-03-11 22:05:58 -07:00
Harshit Bansal e3c09e0308 settings: Prevent multiple requests while adding custom emoji.
This commit fixes a hard to reproduce issue which was causing
multiple requests while creating a realm emoji.

Fixes: #8475.
2018-03-11 16:17:47 -07:00
YJDave 158f0f3297 stream settings: Fix display of stream subscribers count. 2018-03-11 15:58:18 -07:00
YJDave b6408a0383 stream settings: Fix sub-unsub btn not showing on private stream creation. 2018-03-11 15:58:18 -07:00
YJDave ff6d83b2f2 stream settings: Fix subscribers not showing on private stream creation.
Previously, stream subscribers were not rendering correctly. Due to
following reasons:
- Subscribers list didn't get initialized
- Subscriber members template add subscriber-list-table DOM element
  conditionally, which doesn't handle case if user have access to
  subscribers later.

Fix this by cleaning subscriber member template to hide the
elements, instead of conditionally adding DOM elements and
initialize subscribers list even if user can't access subscribers.
2018-03-11 15:58:18 -07:00
Archana BS f876fd1423 streams page: Show weekly stream traffic. 2018-03-11 15:26:06 -07:00
YJDave 32407b4dc0 stream settings: Hide stream members immediately on unsub, if can't access.
If user unsubscribe from private stream, then user can't
access unsubscribed stream members.
After subscription removal, immediately render subscription members
template in case of user can't access stream subscriber.
2018-03-10 09:32:45 -08:00
YJDave c94b21e9ac settings: Add setting to disable message content in missed message emails.
Fixes #6938.
2018-03-09 21:16:02 -08:00
YJDave 9183d59426 create stream: Restrict non-admin to create stream without subscribing.
Only allow realm admins to create stream without subscribing
themselves, restrict non realm admin users.

This new restriction is only for the UI; we don't actually block it at
the backend/API level (one could always create and then remove oneself
anyway).
2018-03-09 18:20:14 -08:00
YJDave e9e6b126ec create stream: Don't allow creating stream with zero subscribers.
Restrict users(even realm admins) from creating stream with zero
subscribers only in UI.
In backend, if subscribers are zero, we automatically subscribe
current user to stream.
2018-03-09 18:09:38 -08:00
YJDave c3a289b473 create stream: Add div element indicating stream creation result.
Add div element to inform user whether stream is successfully
created or not. This will help to inform user in case if current
user is not subscribed to created stream.
2018-03-09 18:09:38 -08:00
YJDave 3280135a4c stream settings: Update subscription count on subscription event.
On subscription add or removal event, render subscription count
template in case of user can't access subscribers.
2018-03-09 18:00:49 -08:00
YJDave 777841781f stream settings: Hide stream membership part, if can't access subs.
Do not display stream membership section in stream settings,
if user not allowed to access stream subscribers.
2018-03-09 16:24:05 -08:00
YJDave c1f9b04435 stream settings: Don't show never subscribed private stream's preview-link.
For public stream, always show stream preview link.
For private stream, only show stream preview link if user is currently
subscribed or previously subscribed to private stream.
2018-03-09 16:24:05 -08:00
Tim Abbott f3413d3b59 org settings: Fix confusing label for custom emoji settings.
Adding custom emoji is very different from just adding emoji.
2018-03-09 13:25:40 -08:00
Shubham Dhama 7fdf5e67e2 org settings: Remove redundant `create-stream-dropdown` class.
This removes `create-stream-dropdown` class from the template and css
because it is causing irregularity in size of other permissions dropdown
because of `right-margin` and removing it makes all the dropdown
regularly sized.
2018-03-09 13:21:55 -08:00
Shubham Dhama 777b6de689 org settings: Add setting to prevent users from adding bots.
Fixes: #7908.
2018-03-09 13:21:55 -08:00
Robert Hönig 35c7428490 frontend: Add create-bot loading indicator.
The former "the-bot-is-being-created" indicator was useless,
since it only edited the value attribute of the "create-bot" button;
that attribute only sets the text of a button when it is initially created.

This commit replaces the old code with a spinning loading indicator,
like the one used for editing bots.
2018-03-08 15:05:00 -08:00
Yago González 3186b09e43 i18n: Remove unnecessary string. 2018-03-07 16:19:44 -08:00
Shubham Dhama 2782a5d8dc settings: Update notification settings to new feedback style.
This split notification settings to separate settings for streams,
PM/mention and other notifications settings.
Previously we have to treat them combined, but with this refactor,
we can treat them separately for future changes.

Fixes #8587.
2018-03-07 15:21:17 -08:00
Cynthia Lin 5e251e5ca0 compose: Improve line wrapping for multiline compose box alerts. 2018-03-06 13:01:41 -08:00
Cynthia Lin f0f6bdf077 compose: Improve error message for mentioning unsubcribed users.
Previously, some users were confused as to whether or not they needed
to hit the subscribe button here.

Fixes #8550.
2018-03-06 13:00:45 -08:00
Xavier Cooney 769052d9c7 css: Allow the bot API key to be selected on all browsers.
The problem that prompted this PR is that I couldn't select the API
key of a bot in chrome to copy it, but I could on Firefox.

Using the `auto` proerty value to override the `user-select`
property  of a parent does not seem to be compatible
with all browsers.
2018-03-06 12:55:53 -08:00
YJDave a059247398 message editing: Fix bugs in `recipient-row` template rendering.
In `recipient-row` template, if conditions to add/hide/show edit
icon for message topic is incorrect.
In some cases, we only want to just hide the edit icon, but icon
should be in DOM, cause in future if organization settings are
changed we want to show edit icon in message row.

If user can edit topic of message, surely add edit icon element to
DOM regardless of user is allowed to edit or not. If user is
allowed to edit then show edit icon otherwise hide edit icon element.
2018-03-06 07:17:28 -08:00
Tommy Ip 5ee6c608c0 message edit: Allow uploading files.
Fixes: #198.
2018-03-05 10:42:38 -08:00
Anupam-dagar f531d37e4f Reorder "create bot UI" for embedded bots.
Fixes: #8580
2018-03-05 10:22:00 -08:00
Rhea Parekh 416f11030f user settings: Display avatar source.
This makes it easier for users to tell how Zulip ended up with an
avatar for them without them uploading one: through the Gravatar
service used across many Wordpress blogs.

Fixes #8225.
2018-03-05 09:12:59 -08:00
YJDave d36ec962bb deactivation-stream-modal: Make stream name a template variable.
In stream deactivation modal, make "stream_name" a template variable,
rather than patching stream name to modal header in javascript.
Add tests for deactivation stream modal.
2018-03-04 19:26:50 -08:00
YJDave 8ba91e48c1 stream settings: Add delete stream button.
Add option to delete stream in stream setting page for
realm admins only.
2018-03-04 19:26:50 -08:00
Tim Abbott 14f1f10662 display_settings: Mark night mode as no longer experimental.
It's now been tested enough to be a solid feature.
2018-03-04 19:24:11 -08:00
Tim Abbott fb340811a4 display_settings: Fix pencil being lost updating default language.
The HTML was just done sloppily in the first version of this feature.
2018-03-04 19:23:58 -08:00
Balaji2198 5aa7098c81 display_settings: Change success/failure feedback interface.
This replaces the cumbersome system we had for giving users feedback
on settings state changes in the display settings UI.

We expect this new system to be what we will attempt to migrate other
settings widgets to match over the coming weeks and months.  It also
provides the opportunity to significant refactor away a lot of the
code duplication in settings_display.js.

Thanks to Brock Whittaker for redoing the styling and improving the
code simplicity.

Fixes #7622.
2018-03-04 17:47:05 -08:00
Yago González c8ad1cf209 settings: Improve warning in signup notifications. 2018-03-04 15:44:12 -08:00
Marco Burstein bdb86f1b5e emoji: Add support for translating emoticons.
Add `translate_emoticons` to `prop_types` and `expected_keys`.
Furthermore, create a emoji-translating Markdown inline pattern.

Also use a JavaScript version of `translate_emoticons` and then use
this function during Markdown previews and as a preprocessor. This
is only needed for previews, because usually emoticon translation
happens on the backend after sending.

Add tests for emoticon translation, a settings UI, and a /help/ page
as well.

Tweaked by tabbott to fix various test failurse as well as how this
handles whitespace, requiring emoticons to not have adjacent
characters.

Fixes #1768.
2018-03-04 15:37:24 -08:00
Vishnu Ks 385ee95038 streams: Show subscriber count icon before count. 2018-03-04 13:20:06 -08:00
YJDave ce46cd914a settings: Allow admin to change email/name even if it is disabled in realm.
Allow realm admin users to change their email or name even,
changing name or email is disabled in realm.
2018-03-02 12:17:00 -08:00
Tim Abbott 50d8a24368 styling: Fix red styling for message edit close button. 2018-03-02 09:39:17 -08:00
Utkarsh Patil 0dde559cf7 Uniform color styling for all 'Cancel' buttons.
Change the color of all red Cancel buttons to black. Fixes #8548.
2018-03-02 09:38:13 -08:00
Tim Abbott 14764d015a settings: Tag cookie bot placeholder short name for translation. 2018-03-02 09:33:16 -08:00
Tim Abbott e18537d842 emoji: Add a translation tag for new_emoji placeholder. 2018-03-02 09:32:09 -08:00
Tim Abbott f9210bace8 lint: Add a translation tag for marketing. 2018-03-02 09:28:57 -08:00
Vishwesh Jainkuniya aae11bf88d setting: Fix password label is even shown when email auth is disabled. 2018-03-01 12:38:07 -08:00
Tim Abbott 6b31752f82 user_groups: Change placeholder group to "Marketing team".
This is much more something that would apply to likely customer
organizations.
2018-03-01 11:28:24 -08:00
Vishnu Ks 36f6ad76b4 admin ui: Set usergroup name input maxlength to 100.
Same as that of the maxlength defined in backend.
2018-03-01 11:27:26 -08:00
Vishnu Ks ed4fbcfd73 admin ui: Set usergroup description input maxlength to 300. 2018-03-01 11:27:26 -08:00
Robert Hönig 695b3e48e8 frontend: Add embedded bot config data editing. 2018-03-01 08:25:43 -08:00
Robert Hönig 7b7f4cc62d bot settings: Generate embedded bot selector in handlebars.
It's better to do stuff like this in HTML templates like
handlebars instead of JS.
2018-03-01 08:25:43 -08:00
Shubham Dhama c995c1a36a popovers: Fix two click handler attached to (rightbar) user_popovers.
No need to have separate click handler for user_popovers and
message_info_popovers as the same user-id can be extracted similarly
from the target of both the click events.

Another refactor, `sender_info_popover` was confusing as it doesn't
fix into the context of rightbar user popovers so changed it to
`info_popover_actions` since that section of popovers contains popover
actions.
2018-03-01 08:00:42 -08:00
Aastha Gupta d124597f4b org-settings: Add setting to turn off welcome emails.
This adds an organization-level setting to provide an option to turn
off the welcome emails.

Fixes #8000.
2018-02-28 12:39:01 -08:00
Aastha Gupta 2f99e6b7b2 settings: Add loading indicator for account deactivation.
Fixes #8175.
2018-02-23 08:20:45 -08:00
Shubham Dhama b17d4e193c popovers: Show hotkey reminder for sender info popovers only.
Hotkey reminders in user popovers( i.e. `@` and `R`) should be present
only for sender info popovers, hence for user-mention and user-presence
popovers it will show no such reminders.

Fixes: #8313.
2018-02-21 13:06:22 -08:00
Harshit Bansal 31baf25783 emoji picker: Change the delimiter used in `emoji_id`.
We were using underscore as a delimiter in `emoji_id` in emoji picker
but since `emoji_type` also contains underscores, it seems wrong to
use underscore as a delimiter. This commit switches `emoji_id` to use
comma as a delimiter instead of underscore.
2018-02-21 12:48:27 -08:00
YJDave 87a5cd306e org settings: Fix bug of reloading page on Enter in active user setting.
In active user section, while editing user's full name,
if we press enter it reloads the whole page, rather than
submitting the form.
Change button type of user-name-form to submit.
2018-02-21 09:23:41 -08:00
YJDave 4119eb342d org settings: Display error message on top of active user setting page.
Currently, an error message on active user setting is showing at
the row of edited user profile in user-profiles-list-table.
Instead, show error message on top of setting page.

Tweaked by tabbott to also remove the HTML element.
2018-02-21 09:11:53 -08:00
Vaida Plankyte 80ff3d8da5 frontend: Reduce opacity of hotkey hints.
This helps these draw a bit less attention.
2018-02-19 11:53:37 -08:00
Vaida Plankyte 0e17d7763b frontend: Replace collapse hotkey (-) with em-dash (–) for readability. 2018-02-19 11:50:46 -08:00
Shubham Dhama 804a5f3306 drafts: Add timestamps showing when last modified.
Fixes: #3790.
2018-02-19 09:55:50 -08:00
Shubham Dhama 9feae472f8 org settings: Add button to deactivate organization.
This adds button under "Organization profile" settings, which
deactivates the organization and sends an "event" to all the
active user and log out them.

Fixes: #8212.
2018-02-18 10:20:38 -08:00
ryan dea7d1d1b6 profile menu: Show profile-edit option when a user clicks on self-profile.
This removes some options when a user clicks on their own profile, and
replaces them with an option to edit their own profile settings.

Front end test adjusted because it was testing an option that does not
appear if a user clicks on their own profile.

Fixes #5075.
2018-02-16 16:59:45 -08:00
ihsavru 4103996a22 org-settings: Fix styling of Allowed Domains modal.
Fixes: #7628.

Cleaned up by Brock Whittaker and Node tests fixed by Steve Howell.
2018-02-16 16:00:21 -08:00
Eric Eslinger 786bda674c popovers: Add a popover for group mentions.
This adds a click handler to `.user-group-mention` which works in a
fashion that is quite similar to `.user-mention`. It generates and
displays a popover.

The popover has a list of members, their online status (if they are
not bots) or their bot status if they are bots (it's not clear whether
ultimately bots should be able to be members of usergroups, but I'm
able to add one, so I thought it would be worth supporting).

The popover's `UL` element has max-height and overflow-y atttributes
so large groups will grow a scrollbar.

Fixes #8300.
2018-02-16 13:37:02 -08:00
Brock Whittaker d30a6c64c3 Revert "Make recipient bar styling more compact and clean."
This reverts commit 8e2d9b8f68.

This adds the arrows back to the recipient bars because even though
it's not our end state, it looks better than the boxy design that we
had in between.
2018-02-16 11:55:00 -08:00
Vishnu Ks a46e21ee3e bankruptcy: Add UI widget to mark all messages as read.
This is the natural analog of the similar streams UI feature.

Fixes #7585.
2018-02-15 18:01:03 -08:00
Aditya Bansal 6fce1d7834 template_parser: Add parsing support for self closing tags as per HTML5.
In this commit we add support for some tags which are also called
void-elements according to
http://w3c.github.io/html/syntax.html#void-elements to be parsed by
our template parser and get tagged as singleton_html_tags.

Fixes: #8387.
2018-02-15 17:47:43 -05:00
Shubham Dhama adfc905c3f bots: Handle exception on changing bot owner to invalid user.
It catches the `UserProfile.DoesNotExist` exception and
hence prevent internal server error.
Also remove option to select empty bot owner.
Fixes: #8334.
2018-02-13 09:23:13 -08:00
Priyank Patel dcec2e3a4d dark-mode: Make all modals compatible with night mode.
This should cover the remaining modals that didn't already support this.
2018-02-09 14:21:13 -08:00
Robert Hönig 3e1b817376 bot settings: Move config item generation from js to handlebars. 2018-02-09 12:30:24 -08:00
Robert Hönig f371c79c22 settings-bots.js: Fully generate bot owner list in handlebars. 2018-02-09 12:30:03 -08:00
Robert Hönig f57d592d88 edit-outgoing-webhook-service.handlebars: Fix typo. 2018-02-09 12:30:03 -08:00
Robert Hönig 338bba7a0f edit_bot.handlebars: Extract outgoing webhook form.
This removes ugly .show() .hide() constructions that
were previously used to dynamically display the form.
2018-02-09 12:30:03 -08:00
Robert Hönig 1ec9932aec settings_bots.js: Clean up bot edit event handler.
This is done by rewriting JS manipulations of the DOM tree
in the bot-settings.handlebars template. Dead code involving
the affected JS variables is removed.
2018-02-09 12:30:03 -08:00
Robert Hönig 032cc8497f settings sidebar: Extract bot edit form.
This is the first step in cleaning up the bot edit code.
Since the bot edit form appears dynamically, we remove
it from the static HTML scaffold, of which settings_sidebar
is a part of.
2018-02-09 12:30:03 -08:00
YJDave 08533ba787 stream settings: Show message in case of no stream description.
Show "No description." message if stream doesn't have any
description in stream settings.
2018-02-09 12:00:45 -08:00
Greg Price 3c1349b199 stream settings: Clean up a permissions message. 2018-02-06 16:37:18 -08:00
Rishi Gupta 77817410a1 settings: Change wordings of a few notification settings.
The last bit of #8059 (merged as b875fe07) didn't get merged, so just adding
it as a followup.

The "Other notification settings" section will also eventually house the
"pick your notification sound" setting, which is why it isn't called "Other
email settings" or similar.
2018-02-06 08:58:52 -08:00
Roman Godov b875fe07eb settings: Added setting to turn on and off realm name in email subject.
Users having only account in one realm will not be distracted by realm
name in subject lines of every email.  Users who have multiple
accounts in realms can turn this setting on and receive a
corresponding realm name in email's subject.

Tweaked by tabbott to rebase and address a few small issues.

Fixes #5489.
2018-02-05 18:01:54 -08:00
Tim Abbott 16162b75b8 settings: Move "High contrast mode" later.
Night mode should be the top item here.
2018-02-05 13:39:21 -08:00
Brock Whittaker 659b533126 settings: Remove indent from checkboxes groups.
This removes the indent we put on checkbox groups and now has them
line up with their respective headers above.
2018-02-05 13:39:17 -08:00