From 08a3acbb44b043b9bb56f9b96e91432352d06d1a Mon Sep 17 00:00:00 2001
From: =Corey Hulen <corey@hulen.com>
Date: Tue, 22 Sep 2015 01:15:41 -0700
Subject: Adding team settings to admin console

---
 .../components/admin_console/image_settings.jsx    | 34 ++++++++++++++++++++++
 1 file changed, 34 insertions(+)

(limited to 'web/react/components/admin_console/image_settings.jsx')

diff --git a/web/react/components/admin_console/image_settings.jsx b/web/react/components/admin_console/image_settings.jsx
index 9a7de266d..c0cbb5aa6 100644
--- a/web/react/components/admin_console/image_settings.jsx
+++ b/web/react/components/admin_console/image_settings.jsx
@@ -39,6 +39,7 @@ export default class ImageSettings extends React.Component {
         config.ImageSettings.AmazonS3SecretAccessKey = React.findDOMNode(this.refs.AmazonS3SecretAccessKey).value;
         config.ImageSettings.AmazonS3Bucket = React.findDOMNode(this.refs.AmazonS3Bucket).value;
         config.ImageSettings.AmazonS3Region = React.findDOMNode(this.refs.AmazonS3Region).value;
+        config.ImageSettings.EnablePublicLink = React.findDOMNode(this.refs.EnablePublicLink).checked;
 
         var thumbnailWidth = 120;
         if (!isNaN(parseInt(React.findDOMNode(this.refs.ThumbnailWidth).value, 10))) {
@@ -390,6 +391,39 @@ export default class ImageSettings extends React.Component {
                         </div>
                     </div>
 
+                    <div className='form-group'>
+                        <label
+                            className='control-label col-sm-4'
+                            htmlFor='EnablePublicLink'
+                        >
+                            {'Share Public File Link: '}
+                        </label>
+                        <div className='col-sm-8'>
+                            <label className='radio-inline'>
+                                <input
+                                    type='radio'
+                                    name='EnablePublicLink'
+                                    value='true'
+                                    ref='EnablePublicLink'
+                                    defaultChecked={this.props.config.ImageSettings.EnablePublicLink}
+                                    onChange={this.handleChange}
+                                />
+                                    {'true'}
+                            </label>
+                            <label className='radio-inline'>
+                                <input
+                                    type='radio'
+                                    name='EnablePublicLink'
+                                    value='false'
+                                    defaultChecked={!this.props.config.ImageSettings.EnablePublicLink}
+                                    onChange={this.handleChange}
+                                />
+                                    {'false'}
+                            </label>
+                            <p className='help-text'>{'Allow users to share public links to files and images.'}</p>
+                        </div>
+                    </div>
+
                     <div className='form-group'>
                         <div className='col-sm-12'>
                             {serverError}
-- 
cgit v1.2.3-1-g7c22

