<?php 
$selected_google_yes     = ($wo['config']['googleLogin'] != 0)     ? ' checked' : '';
$selected_google_no      = ($wo['config']['googleLogin'] == 0)     ? ' checked' : '';
$active_google_yes       = ($wo['config']['googleLogin'] != 0)     ? ' active'  : '';
$active_google_no        = ($wo['config']['googleLogin'] == 0)     ? ' active'  : '';
  
$selected_facebook_yes   = ($wo['config']['facebookLogin'] != 0)   ? ' checked' : '';
$selected_facebook_no    = ($wo['config']['facebookLogin'] == 0)   ? ' checked' : '';
$active_facebook_yes     = ($wo['config']['facebookLogin'] != 0)   ? ' active'  : '';
$active_facebook_no      = ($wo['config']['facebookLogin'] == 0)   ? ' active'  : '';
  
$selected_twitter_yes    = ($wo['config']['twitterLogin'] != 0)    ? ' checked' : '';
$selected_twitter_no     = ($wo['config']['twitterLogin'] == 0)    ? ' checked' : '';
$active_twitter_yes      = ($wo['config']['twitterLogin'] != 0)    ? ' active'  : '';
$active_twitter_no       = ($wo['config']['twitterLogin'] == 0)    ? ' active'  : '';
  
$selected_linkedin_yes   = ($wo['config']['linkedinLogin'] != 0)   ? ' checked' : '';
$selected_linkedin_no    = ($wo['config']['linkedinLogin'] == 0)   ? ' checked' : '';
$active_linkedin_yes     = ($wo['config']['linkedinLogin'] != 0)   ? ' active'  : '';
$active_linkedin_no      = ($wo['config']['linkedinLogin'] == 0)   ? ' active'  : '';

$selected_Vkontakte_yes   = ($wo['config']['VkontakteLogin'] != 0)   ? ' checked' : '';
$selected_Vkontakte_no    = ($wo['config']['VkontakteLogin'] == 0)   ? ' checked' : '';
$active_Vkontakte_yes     = ($wo['config']['VkontakteLogin'] != 0)   ? ' active'  : '';
$active_Vkontakte_no      = ($wo['config']['VkontakteLogin'] == 0)   ? ' active'  : '';
?>
<div class="tab-container">
   <div class="row">
      <form action="#" method="post" class="update-api-setting-form">
         <div class="col-lg-2">
            
            <h5><?php echo $wo['lang']['facebook']; ?></h5>
            <div class="form-group inner-addon  <?php echo Wo_RightToLeft('left-addon');?> ">
               <div class="btn-group" data-toggle="buttons">
                  <label class="btn btn-default btn-onoff <?php echo  $active_facebook_yes;?>">
                  <input type="radio" name="facebookLogin" value="1" <?php echo $selected_facebook_yes;?> />
                  <i class=" fa fa-power-off on"></i> <?php echo $wo['lang']['on']; ?>
                  </label> 
                  <label class="btn btn-default btn-onoff <?php echo  $active_facebook_no;?>">
                  <input type="radio" name="facebookLogin" value="0" <?php echo $selected_facebook_no;?> />
                  <i class=" fa fa-power-off off"></i> <?php echo $wo['lang']['off']; ?>
                  </label> 
               </div>
            </div>
            <h5><?php echo $wo['lang']['google']; ?></h5>
            <div class="form-group inner-addon  <?php echo Wo_RightToLeft('left-addon');?> ">
               <div class="btn-group" data-toggle="buttons">
                  <label class="btn btn-default btn-onoff <?php echo  $active_google_yes;?>">
                  <input type="radio" name="googleLogin" value="1" <?php echo $selected_google_yes;?> />
                  <i class=" fa fa-power-off on"></i> <?php echo $wo['lang']['on']; ?>
                  </label> 
                  <label class="btn btn-default btn-onoff <?php echo  $active_google_no;?>">
                  <input type="radio" name="googleLogin" value="0" <?php echo $selected_google_no;?> />
                  <i class=" fa fa-power-off off"></i> <?php echo $wo['lang']['off']; ?>
                  </label> 
               </div>
            </div>
            <h5><?php echo $wo['lang']['twitter']; ?></h5>
            <div class="form-group inner-addon  <?php echo Wo_RightToLeft('left-addon');?> ">
               <div class="btn-group" data-toggle="buttons">
                  <label class="btn btn-default btn-onoff <?php echo  $active_twitter_yes;?>">
                  <input type="radio" name="twitterLogin" value="1" <?php echo $selected_twitter_yes;?> />
                  <i class=" fa fa-power-off on"></i> <?php echo $wo['lang']['on']; ?>
                  </label> 
                  <label class="btn btn-default btn-onoff <?php echo $active_twitter_no;?>">
                  <input type="radio" name="twitterLogin" value="0" <?php echo $selected_twitter_no;?> />
                  <i class=" fa fa-power-off off"></i> <?php echo $wo['lang']['off']; ?>
                  </label> 
               </div>
            </div>
             <h5><?php echo $wo['lang']['vkontakte']; ?></h5>
            <div class="form-group inner-addon  <?php echo Wo_RightToLeft('left-addon');?> ">
               <div class="btn-group" data-toggle="buttons">
                  <label class="btn btn-default btn-onoff <?php echo  $active_Vkontakte_yes;?>">
                  <input type="radio" name="VkontakteLogin" value="1" <?php echo $selected_Vkontakte_yes;?> />
                  <i class=" fa fa-power-off on"></i> <?php echo $wo['lang']['on']; ?>
                  </label> 
                  <label class="btn btn-default btn-onoff <?php echo $active_Vkontakte_no;?>">
                  <input type="radio" name="VkontakteLogin" value="0" <?php echo $selected_Vkontakte_no;?> />
                  <i class=" fa fa-power-off off"></i> <?php echo $wo['lang']['off']; ?>
                  </label> 
               </div>
            </div>
            <h5><?php echo $wo['lang']['linkedin']; ?></h5>
            <div class="form-group inner-addon  <?php echo Wo_RightToLeft('left-addon');?> ">
               <div class="btn-group" data-toggle="buttons">
                  <label class="btn btn-default btn-onoff <?php echo  $active_linkedin_yes;?>">
                  <input type="radio" name="linkedinLogin" value="1" <?php echo $selected_linkedin_yes;?> />
                  <i class=" fa fa-power-off on"></i> <?php echo $wo['lang']['on']; ?>
                  </label> 
                  <label class="btn btn-default btn-onoff <?php echo  $active_linkedin_no;?>">
                  <input type="radio" name="linkedinLogin" value="0" <?php echo $selected_linkedin_no;?> />
                  <i class=" fa fa-power-off off"></i> <?php echo $wo['lang']['off']; ?>
                  </label> 
               </div>
            </div>
         </div>
         <div class="col-lg-10">
            
            <div class="row">
               <div class="col-md-6">
                  <h5><i class="fa fa-facebook" style="color:#395B9A"></i> <?php echo $wo['lang']['facebook']; ?></h5>
                  <div class="form-group">
                     <input type="text" name="facebookAppId" id="facebookAppId" class="form-control" placeholder="<?php echo $wo['lang']['app_id']; ?>" value="<?php echo $wo['config']['facebookAppId'];?>">
                  </div>
                  <div class="form-group">
                     <input type="text" name="facebookAppKey" class="form-control" placeholder="<?php echo $wo['lang']['app_secret_key']; ?>" value="<?php echo $wo['config']['facebookAppKey'];?>">
                  </div>
               </div>
               <div class="col-md-6">
                  <h5><i class="fa fa-twitter" style="color:#659FCB"></i> <?php echo $wo['lang']['twitter']; ?></h5>
                  <div class="form-group ">
                     <input type="text" name="twitterAppId" class="form-control" placeholder="<?php echo $wo['lang']['app_id']; ?>" value="<?php echo $wo['config']['twitterAppId'];?>">
                  </div>
                  <div class="form-group">
                     <input type="text" name="twitterAppKey" class="form-control" placeholder="<?php echo $wo['lang']['app_secret_key']; ?>" value="<?php echo $wo['config']['twitterAppKey'];?>">
                  </div>
               </div>
               <div class="col-md-6">
                  <hr>
                  <h5><i class="fa fa-google-plus" style="color:#DC493C"></i> <?php echo $wo['lang']['google']; ?></h5>
                  <div class="form-group">
                     <input type="text" name="googleAppId" class="form-control" placeholder="<?php echo $wo['lang']['app_id']; ?>" value="<?php echo $wo['config']['googleAppId'];?>">
                  </div>
                  <div class="form-group">
                     <input type="text" name="googleAppKey" class="form-control" placeholder="<?php echo $wo['lang']['app_secret_key']; ?>" value="<?php echo $wo['config']['googleAppKey'];?>">
                  </div>
               </div>
               <div class="col-md-6">
                  <hr>
                  <h5><i class="fa fa-linkedin" style="color:#0177B5"></i> <?php echo $wo['lang']['linkedin']; ?></h5>
                  <div class="form-group">
                     <input type="text" name="linkedinAppId" class="form-control" placeholder="<?php echo $wo['lang']['app_id']; ?>" value="<?php echo $wo['config']['linkedinAppId'];?>">
                  </div>
                  <div class="form-group">
                     <input type="text" name="linkedinAppKey" class="form-control" placeholder="<?php echo $wo['lang']['app_secret_key']; ?>" value="<?php echo $wo['config']['linkedinAppKey'];?>">
                  </div>
               </div>
               <div class="col-md-6">
                  <hr>
                  <h5><i class="fa fa-vk" style="color:#4C75A3"></i> <?php echo $wo['lang']['vkontakte']; ?></h5>
                  <div class="form-group">
                     <input type="text" name="VkontakteAppId" class="form-control" placeholder="<?php echo $wo['lang']['app_id']; ?>" value="<?php echo $wo['config']['VkontakteAppId'];?>">
                  </div>
                  <div class="form-group">
                     <input type="text" name="VkontakteAppKey" class="form-control" placeholder="<?php echo $wo['lang']['app_secret_key']; ?>" value="<?php echo $wo['config']['VkontakteAppKey'];?>">
                  </div>
               </div>
            </div>
            <hr>
            <div class="form-group">
               <div class="row">
                  <div class="col-sm-3 pull-left">
                     <button type="submit" name="save_setting" id="save-setting" class="form-control btn-main-color btn-main">
                     <i class="fa fa-floppy-o progress-icon" data-icon="floppy-o"></i> <?php echo $wo['lang']['save']; ?>
                     </button>
                  </div>
                  <div class="setting-saved-update-alert"></div>
               </div>
            </div>
         </div>
      </form>
   </div>
</div>
<!-- JS functions -->
<script type="text/javascript">
$(function() {
  $('form.update-api-setting-form').ajaxForm({
    url: Wo_Ajax_Requests_File() + '?f=admin_setting&s=update_social_login_setting',
      beforeSend: function() {
        Wo_progressIconLoader($('form.update-api-setting-form').find('button'));
      },
      success: function(data) {
        if (data.status == 200) {
          $('.setting-saved-update-alert').hide().fadeIn(200).html('<i class="fa fa-check"></i> <?php echo $wo["lang"]["saved"]; ?>').delay(2000).fadeOut(200);
        } 
        Wo_progressIconLoader($('form.update-api-setting-form').find('button'));
      }
  });
});
</script>