Move remaining client functions in components to actions (#5171)
Этот коммит содержится в:
коммит произвёл
George Goldberg
родитель
49c677f6b4
Коммит
d72547433a
@@ -4,7 +4,8 @@
|
||||
import $ from 'jquery';
|
||||
import ReactDOM from 'react-dom';
|
||||
import * as Utils from 'utils/utils.jsx';
|
||||
import Client from 'client/web_client.jsx';
|
||||
|
||||
import {uploadLicenseFile, removeLicenseFile} from 'actions/admin_actions.jsx';
|
||||
|
||||
import {injectIntl, intlShape, defineMessages, FormattedMessage, FormattedHTMLMessage} from 'react-intl';
|
||||
|
||||
@@ -54,7 +55,8 @@ class LicenseSettings extends React.Component {
|
||||
|
||||
$('#upload-button').button('loading');
|
||||
|
||||
Client.uploadLicenseFile(file,
|
||||
uploadLicenseFile(
|
||||
file,
|
||||
() => {
|
||||
Utils.clearFileInput(element[0]);
|
||||
$('#upload-button').button('reset');
|
||||
@@ -74,7 +76,7 @@ class LicenseSettings extends React.Component {
|
||||
|
||||
$('#remove-button').button('loading');
|
||||
|
||||
Client.removeLicenseFile(
|
||||
removeLicenseFile(
|
||||
() => {
|
||||
$('#remove-button').button('reset');
|
||||
this.setState({fileSelected: false, fileName: null, serverError: null});
|
||||
|
||||
Ссылка в новой задаче
Block a user