<?php /* Smarty version 2.6.22, created on 2016-11-22 20:24:30
         compiled from /data/vhosts/orders.eurojaponautosupply.com/httpdocs/ultimate_support_chat/modules/settings/views/global.html */ ?>
<div class="usc_app_page_wrap" style="min-height:710px">
	
<h1>Global Settings</h1>

<form role="form" method="post" id="global_settings_submit">

        <div class="box-body">

            <div class="form-group" style="max-width:648px">
                <label>Widget code</label>
                    <div id="chat_widget_snippet" class="form-control">	
					&#60;script type="text/javascript"&#62;
					(function(d)&#123;
					    var s = d.getElementsByTagName('script'),f = s[s.length-1], p = d.createElement('script'); 
					    window.WidgetId = "USC_WIDGET";   
					    p.type = 'text/javascript';
					    p.setAttribute('charset','utf-8');
					    p.async = 1;
					    p.id = "ultimate_support_chat";
					    p.src = "<?php echo $this->_tpl_vars['protocol']; ?>
<?php echo $this->_tpl_vars['application_path']; ?>
widget/ultimate_chat_widget.js";    
					    f.parentNode.insertBefore(p, f);
					&#125;(document));
					&#60;/script&#62;
					</div>
					<i>Paste this code snippet just before the closing &#60;/body&#62; tag in the pages where you want the chat widget to appear.</i>
            </div>

            <div class="checkbox">
                <label>
                    <input type="checkbox" name="offline_hide" value="true" <?php if ($_POST['offline_hide'] == 'true'): ?>checked<?php endif; ?>>Hide widget when operators are offline
                </label>
            </div>
			
            <div class="checkbox">
                <label>
                    <input type="checkbox" name="allow_chat_invite" value="true" <?php if ($_POST['allow_chat_invite'] == 'true'): ?>checked<?php endif; ?>>Allow operators to invite visitors to chat
                </label>
            </div>
			
			
            <div class="checkbox">
                <label>
                    <input type="checkbox" name="admin_desktop_notifications" value="true" <?php if ($_POST['admin_desktop_notifications'] == 'true'): ?>checked<?php endif; ?>>Show admin desktop notifications
                </label>
            </div>

            <div class="checkbox">
                <label>
                    <input type="checkbox" name="admin_incoming_chat_request_audio" id="admin_incoming_chat_request_audio" value="true" <?php if ($_POST['admin_incoming_chat_request_audio'] == 'true'): ?>checked<?php endif; ?>>Incoming chat request sound notification
                </label>
            </div>

            <div id="admin_incoming_chat_request_audio_options" <?php if ($_POST['admin_incoming_chat_request_audio'] !== 'true'): ?>style="display:none"<?php endif; ?>>
                <div class="global_audio_wrapper">
                    <label>
                    <select id="incoming_chat_audio" name="incoming_chat_audio">
                        <option value="9" <?php if ($_POST['incoming_chat_audio'] == '9'): ?>selected<?php endif; ?>>Default</option>
                        <option value="0" <?php if ($_POST['incoming_chat_audio'] == '0'): ?>selected<?php endif; ?>>0</option>
                        <option value="1" <?php if ($_POST['incoming_chat_audio'] == '1'): ?>selected<?php endif; ?>>1</option>
                        <option value="2" <?php if ($_POST['incoming_chat_audio'] == '2'): ?>selected<?php endif; ?>>2</option>
                        <option value="3" <?php if ($_POST['incoming_chat_audio'] == '3'): ?>selected<?php endif; ?>>3</option>
                        <option value="4" <?php if ($_POST['incoming_chat_audio'] == '4'): ?>selected<?php endif; ?>>4</option>
                        <option value="5" <?php if ($_POST['incoming_chat_audio'] == '5'): ?>selected<?php endif; ?>>5</option>
                        <option value="6" <?php if ($_POST['incoming_chat_audio'] == '6'): ?>selected<?php endif; ?>>6</option>
                        <option value="7" <?php if ($_POST['incoming_chat_audio'] == '7'): ?>selected<?php endif; ?>>7</option>
                        <option value="8" <?php if ($_POST['incoming_chat_audio'] == '8'): ?>selected<?php endif; ?>>8</option>
                    </select>
                    </label>
                </div>
                <audio id="audio_player"></audio>
                <div id="play_pause" class="global_play_pause"><i class="play_pause_icon fa fa-play"></i></div>
                <br/>
            </div>

            <div class="form-group">
                <div class="radio">
                    <label>
                        <input type="radio" name="track_users" id="track_users" value="all" <?php if ($_POST['track_users'] == 'all'): ?>checked<?php endif; ?>>
                        Track all website users
                    </label>
                </div>
                <div class="radio">
                    <label>
                        <input type="radio" name="track_users" id="track_users" value="chats" <?php if ($_POST['track_users'] == 'chats'): ?>checked<?php endif; ?>>
                        Track only chat requests
                    </label>
                </div>

            </div>
			
			
			<h3>Security settings</h3>
			
			
            <div class="form-group">
				
                <div class="radio">
                    <label>
                         <input type="radio" name="allowedDomains" id="allowedDomains" value="all" onchange="allowedDomainsPanel()" <?php if ($_POST['allowedDomains'] == 'all'): ?>checked<?php endif; ?>>
                        Communicate with any website / domain containing the widget code
                    </label>
                </div>
				
                <div class="radio">
                    <label>
                       <input type="radio" name="allowedDomains" id="allowedDomains" value="limited" onchange="allowedDomainsPanel()" <?php if ($_POST['allowedDomains'] == 'limited'): ?>checked<?php endif; ?>>
                       Limit communication to the following website / domains:
                    </label>
					
					<div class="allowed_domains_wrap" style="width:100%;height:auto; margin:20px 0; display:none">
					   <small>Enter a list of allowed domains separeted by a comma, e.g. http://yoursite1.com, https://yousite2.com etc.</small>
					   <br/>
					   <textarea type="text" style="width:100%; max-width:648px" name="allowedDommainsList"><?php echo $_POST['allowedDommainsList']; ?>
</textarea>	
					</div>	
                </div>
				
            </div>
			
			
			<h3>Map API Key</h3><small><a target="_blank" href="https://developers.google.com/maps/documentation/javascript/get-api-key#get-an-api-key">Get your Free API Key</a></small>	
						
            <div class="form-group">
				
				<input type="text" style="min-width:300px; max-width:648px" name="google_maps_api_key" placeholder="Enter your API Key" 
						value="<?php echo $_POST['google_maps_api_key']; ?>
" /><br/>	
										               			
            </div>
				
        </div>

        <div class="box-footer">
            <button type="submit" name="submit" value="true" class="btn btn-primary">Save</button>
        </div>
		<br/><br/>

</form>
</div>

<script src="<?php echo $this->_tpl_vars['data_server']; ?>
js/global_settings.min.js" type="text/javascript"></script>

<?php if ($_POST['allowedDomains'] == 'limited'): ?><?php echo '<script>allowedDomainsPanel();</script>'; ?>
<?php endif; ?>