<form action="" method="post" role = "form">

	<div class="ulp-stuffbox">



		<h3 class="ulp-h3"><?php _e('Roles allowed to enter into WordPress Admin Dashboard:', 'ulp');?></h3>

		<div class="inside">

			<div style="width: 49%; vertical-align: top; display: inline-block;">

				<div class="ulp-form-line" style="opacity: 0.7;">

					<span style="font-weight:bold; display:inline-block; width: 25%;"><?php _e('Administrator', 'ulp');?></span>

					<label class="ulp_label_shiwtch" style="margin:10px 0 10px -10px;">

						<input type="checkbox" class="ulp-switch" onClick="" checked disabled/>

						<div class="switch" style="display:inline-block;"></div>

					</label>

				</div>

				<?php

					if (!empty($data['roles']['administrator'])){

						      unset($data['roles']['administrator']);

					}

					if (!empty($data['roles']['pending_user'])){

						      unset($data['roles']['pending_user']);

					}

					$count = count($data['roles']) + 1;

					$break = ceil($count/2);

					$i = 1;

					foreach ($data['roles'] as $role=>$arr){

					?>

						<div class="ulp-form-line">

							<span style="font-weight:bold; display:inline-block; width: 25%;"><?php echo $arr['name'];?></span>

							<label class="ulp_label_shiwtch" style="margin:10px 0 10px -10px;">

								<?php $checked = in_array($role, $data['metas']['ulp_dashboard_allowed_roles_as_array']) ? 'checked' : '';?>

								<input type="checkbox" class="ulp-switch" onClick="ulpSecondMakeInputhString(this, '<?php echo $role;?>', '#ulp_dashboard_allowed_roles');" <?php echo $checked;?>/>

								<div class="switch" style="display:inline-block;"></div>

							</label>

						</div>

					<?php

					$i++;

						if ($count>7 && $i==$break){

						?>

						</div>

						<div style="width: 49%; vertical-align: top; display: inline-block;">

						<?php

						}

					}///end of foreach

				?>

			</div>

			<input type="hidden" name="ulp_dashboard_allowed_roles" id="ulp_dashboard_allowed_roles" value="<?php echo $data['metas']['ulp_dashboard_allowed_roles'];?>" />

      <div class="form-group row">

          <div class="col-4">

              <input type="submit" name="submit" value="<?php _e('Save Changes', 'ulp');?>"  class="btn btn-primary pointer" />

          </div>

      </div>



	</div>



</form>

