<div class="wo_settings_page sun_sett_page">
	<h3><?php echo $wo['lang']['privileges'];?></h3>

	<form class="setting-general-form form-horizontal" method="post">
		<div class="setting-general-alert setting-update-alert"></div>
		
		<div class="setting-panel row">

			<?php 
				$selected_e_settings   = ($wo['admin_info']['general'] == 1)   ? ' checked' : '';
			?>
			<div class="col-md-12 round-check">
				<input type="checkbox" name="general" id="general" value="1" <?php echo $selected_e_settings; ?>>
				<label for="general"><?php echo $wo['lang']['access_to_general_settings']; ?></label>
			</div>

			<?php 
				$selected_e_settings   = ($wo['admin_info']['privacy'] == 1)   ? ' checked' : '';
			?>
			<div class="col-md-12 round-check">
				<input type="checkbox" name="privacy" id="privacy" value="1" <?php echo $selected_e_settings; ?>>
				<label for="privacy"><?php echo $wo['lang']['access_to_privacy_settings']; ?></label>
			</div>

			<?php 
				$selected_e_settings   = ($wo['admin_info']['avatar'] == 1)   ? ' checked' : '';
			?>
			<div class="col-md-12 round-check">
				<input type="checkbox" name="avatar" id="avatar" value="1" <?php echo $selected_e_settings; ?>>
				<label for="avatar"><?php echo $wo['lang']['access_to_avatar_settings']; ?></label>
			</div>
			
			<?php 
				$selected_e_settings   = ($wo['admin_info']['members'] == 1)   ? ' checked' : '';
			?>
			<div class="col-md-12 round-check">
				<input type="checkbox" name="members" id="members" value="1" <?php echo $selected_e_settings; ?>>
				<label for="members"><?php echo $wo['lang']['access_to_members_settings']; ?></label>
			</div>

			<?php 
				$selected_e_settings   = ($wo['admin_info']['analytics'] == 1)   ? ' checked' : '';
			?>
			<div class="col-md-12 round-check">
				<input type="checkbox" name="analytics" id="analytics" value="1" <?php echo $selected_e_settings; ?>>
				<label for="analytics"><?php echo $wo['lang']['access_to_analytics_settings']; ?></label>
			</div>
			
			<?php 
				$selected_e_settings   = ($wo['admin_info']['delete_group'] == 1)   ? ' checked' : '';
			?>
			<div class="col-md-12 round-check">
				<input type="checkbox" name="delete_group" id="delete_group" value="1" <?php echo $selected_e_settings; ?>>
				<label for="delete_group"><?php echo $wo['lang']['access_to_delete_group_settings']; ?></label>
			</div>

		</div>
		
		<div class="form-group last-sett-btn modal-footer">
			<div class="ball-pulse"><div></div><div></div><div></div></div>
			<button type="submit" class="btn btn-main setting-panel-mdbtn"><?php echo $wo['lang']['save']; ?></button>
		</div>
		<input type="hidden" name="group_id" value="<?php echo $wo['setting']['id'];?>">
		<input type="hidden" name="user_id" value="<?php echo $wo['admin_info']['user_id'];?>">
		<input type="hidden" name="hash_id" value="<?php echo Wo_CreateSession();?>">
	</form>
</div>
<script type="text/javascript">
$(function() {
  $('form.setting-general-form').ajaxForm({
    url: Wo_Ajax_Requests_File() + '?f=groups&s=privileges',
    beforeSend: function() {
      $('.wo_settings_page').find('.last-sett-btn .ball-pulse').fadeIn(100);
    },
    success: function(data) {
      scrollToTop();
      if (data.status == 200) {
        $('.setting-general-alert').html('<div class="alert alert-success">' + data.message + '</div>');
        $('.alert-success').fadeIn('fast', function() {
           $(this).delay(2500).slideUp(500, function() {
              $(this).remove();
            });
        });
      } else {
          var errors = data.errors.join("<br>");
          $('.setting-general-alert').html('<div class="alert alert-danger">' + errors + '</div>');
          $('.alert-danger').fadeIn(300);
      }
      $('.wo_settings_page').find('.last-sett-btn .ball-pulse').fadeOut(100);
    }
  });
});
</script>