Commit Graph

1251 Commits

Author SHA1 Message Date
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