From fb2022fb1cb3c8023efd22316d570d9b26facbd1 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Fri, 4 Aug 2017 14:05:33 -0400 Subject: PLT-6924 Added ability to disable file uploads/downloads on old mobile apps (#7117) --- .../components/admin_console/storage_settings.jsx | 84 ++++++++++++---------- 1 file changed, 48 insertions(+), 36 deletions(-) (limited to 'webapp/components/admin_console/storage_settings.jsx') diff --git a/webapp/components/admin_console/storage_settings.jsx b/webapp/components/admin_console/storage_settings.jsx index 934a82f8f..4e0d9d19b 100644 --- a/webapp/components/admin_console/storage_settings.jsx +++ b/webapp/components/admin_console/storage_settings.jsx @@ -66,6 +66,53 @@ export default class StorageSettings extends AdminSettings { } renderSettings() { + const mobileUploadDownloadSettings = []; + if (window.mm_license.IsLicensed === 'true' && window.mm_license.Compliance === 'true') { + mobileUploadDownloadSettings.push( + + } + helpText={ + + } + value={this.state.enableMobileUpload} + onChange={this.handleChange} + disabled={!this.state.enableFileAttachments} + /> + ); + + mobileUploadDownloadSettings.push( + + } + helpText={ + + } + value={this.state.enableMobileDownload} + onChange={this.handleChange} + disabled={!this.state.enableFileAttachments} + /> + ); + } + return ( - - } - helpText={ - - } - value={this.state.enableMobileUpload} - onChange={this.handleChange} - disabled={!this.state.enableFileAttachments} - /> - - } - helpText={ - - } - value={this.state.enableMobileDownload} - onChange={this.handleChange} - disabled={!this.state.enableFileAttachments} - /> + {mobileUploadDownloadSettings}