Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

MM-10657 Adding ability for plugin to hook the file upload button. #1488

Merged
merged 5 commits into from
Jul 31, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Tweaks and localization.
  • Loading branch information
crspeller committed Jul 30, 2018
commit f9ef3b019d39249d44592a985121c97f52d83d20
12 changes: 6 additions & 6 deletions components/file_upload/file_upload.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import $ from 'jquery';
import PropTypes from 'prop-types';
import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import {defineMessages, intlShape} from 'react-intl';
import {defineMessages, intlShape, FormattedMessage} from 'react-intl';
import 'jquery-dragster/jquery.dragster.js';
import {Dropdown} from 'react-bootstrap';

Expand Down Expand Up @@ -540,10 +540,7 @@ export default class FileUpload extends Component {
const FileDropdownComponent = (props) => {
return (
<button
onClick={(e) => {
e.preventDefault();
props.onClick();
}}
onClick={props.onClick}
className='style--none'
>
<div
Expand All @@ -568,7 +565,10 @@ export default class FileUpload extends Component {
<li>
<a>
<i className='fa fa-files-o'/>
{'Your Computer'}
<FormattedMessage
id='yourcomputer'
defaultMessage='Your computer'
/>
<input
ref='fileInput'
type='file'
Expand Down
3 changes: 2 additions & 1 deletion i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -3535,5 +3535,6 @@
"webrtc.unmute_audio": "Unmute microphone",
"webrtc.unpause_video": "Turn on camera",
"webrtc.unsupported": "{username} client does not support video calls.",
"yourcomputer": "Your computer",
"youtube_video.notFound": "Video not found"
}
}