Commit Graph

424 Commits

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