diff options
author | Christopher Speller <crspeller@gmail.com> | 2017-09-06 23:04:13 -0700 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2017-09-06 23:11:58 -0700 |
commit | d8bd57901e33a7057e26e782e295099ffcc0da89 (patch) | |
tree | e12dfc8cad42b1576756d19d7fbfd82646a009bf /webapp/components/admin_console/remove_file_setting.jsx | |
parent | 7bc8e9a08dfde56387f946fdf5086252aa4d0491 (diff) | |
download | chat-d8bd57901e33a7057e26e782e295099ffcc0da89.tar.gz chat-d8bd57901e33a7057e26e782e295099ffcc0da89.tar.bz2 chat-d8bd57901e33a7057e26e782e295099ffcc0da89.zip |
Removing webapp
Diffstat (limited to 'webapp/components/admin_console/remove_file_setting.jsx')
-rw-r--r-- | webapp/components/admin_console/remove_file_setting.jsx | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/webapp/components/admin_console/remove_file_setting.jsx b/webapp/components/admin_console/remove_file_setting.jsx deleted file mode 100644 index ff453d9fc..000000000 --- a/webapp/components/admin_console/remove_file_setting.jsx +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved. -// See License.txt for license information. - -import $ from 'jquery'; -import PropTypes from 'prop-types'; -import React from 'react'; - -import Setting from './setting.jsx'; - -export default class RemoveFileSetting extends Setting { - static get propTypes() { - return { - id: PropTypes.string.isRequired, - label: PropTypes.node.isRequired, - helpText: PropTypes.node, - removeButtonText: PropTypes.node.isRequired, - removingText: PropTypes.node, - fileName: PropTypes.string.isRequired, - onSubmit: PropTypes.func.isRequired, - disabled: PropTypes.bool - }; - } - - constructor(props) { - super(props); - this.handleRemove = this.handleRemove.bind(this); - } - - handleRemove(e) { - e.preventDefault(); - - $(this.refs.remove_button).button('loading'); - this.props.onSubmit(this.props.id, () => { - $(this.refs.remove_button).button('reset'); - }); - } - - render() { - return ( - <Setting - label={this.props.label} - helpText={this.props.helpText} - inputId={this.props.id} - > - <div> - <div className='help-text remove-filename'> - {this.props.fileName} - </div> - <button - className='btn btn-danger' - onClick={this.handleRemove} - ref='remove_button' - disabled={this.props.disabled} - data-loading-text={`<span class='glyphicon glyphicon-refresh glyphicon-refresh-animate'></span> ${this.props.removingText}`} - > - {this.props.removeButtonText} - </button> - </div> - </Setting> - ); - } -} |