<style>

	<?php foreach ($data ['menu_items'] as $slug => $item):?>

		<?php echo '.fa-' . $slug . '-account-ulp:before';?>{

			content: '\<?php echo $item['icon'];?>';

			font-size: 20px;

		}

	<?php endforeach;?>

<?php if ($data ['font_awesome']):?>

		<?php foreach ($data ['font_awesome'] as $base_class => $code):?>

			<?php echo '.' . $base_class . ':before';?>{

				content: '\<?php echo $code;?>'

			}

		<?php endforeach;?>

<?php endif;?>

</style>

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

	<div class="ulp-stuffbox">

		<h3 class="ulp-h3"><?php _e('Account custom Tabs', 'ulp');?></h3>

		<div class="inside">

    		<div class="ulp-inside-item">

		          <div class="row">

		              <div class="col-xs-6">

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

		            					<h2><?php _e('Activate account custom Tabs', 'ulp');?></h2>

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

		            					<?php $checked = ($data['metas']['ulp_student_account_custom_tabs_enabled']) ? 'checked' : '';?>

		            					<input type="checkbox" class="ulp-switch" onClick="UltimateLearningPro.checkAndH(this, '#ulp_student_account_custom_tabs_enabled');" <?php echo $checked;?> />

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

		            				</label>

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

		            			</div>



		            			<div class="ulp-submit-form" style="margin-top: 30px;">

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

		            			</div>

		        			</div>



		        </div>

				</div>

		</div>

	</div>

		<div class="ulp-stuffbox">

			<h3 class="ulp-h3"><?php _e('Add new Menu Item', 'ulp');?></h3>

			<div class="inside">

					<div class="ulp-inside-item">

								<div class="row">

										<div class="col-xs-6">

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

														<div class="inside">



														  				<div class="input-group" style="  max-width: 400px;">

															  					<span class="input-group-addon" id="basic-addon1"><?php _e('Slug:', 'ulp');?></span>

															  					<input type="text" class="form-control" value="" name="slug" />

														  				</div>



														  				<div class="input-group" style="  max-width: 400px; margin-top:20px; margin-bottom:30px;">

															  					<span class="input-group-addon" id="basic-addon1"><?php _e('Label:', 'ulp');?></span>

															  					<input type="text" class="form-control" value="" name="label" />

														  				</div>



																			<div class="input-group" style="  max-width: 400px; margin-top:20px;">

															  					<span class="input-group-addon" id="basic-addon1"><?php _e('Link:', 'ulp');?></span>

															  					<input type="text" class="form-control" value="" name="url" />

														  				</div>

																			<span style="display: block;  margin-bottom:30px;"><?php _e('(optional)', 'ulp');?></span>



																			<label><?php _e('Icon', 'ulp');?></label>

																			<div class="ulp-icon-select-wrapper">

																					<div class="ulp-icon-input">

																						<div id="indeed_shiny_select" class="ulp-shiny-select-html"></div>

																					</div>

																					<div class="ulp-icon-arrow"><i class="fa-ulp fa-arrow-ulp"></i></div>

																				<div class="ulp-clear"></div>

																			</div>



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

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

														  				</div>

														 </div>

												</div>

									</div>

			    		  </div>

							</div>

						</div>

		</div>



		<div class="ulp-stuffbox">

			<h3 class="ulp-h3"><?php _e('ReOrder Menu Items', 'ulp');?></h3>

			<div class="inside">

				<div class="ulp-sortable-table-wrapp">

					<table class="wp-list-table widefat fixed tags ulp-admin-tables" id="ulp_reorder_menu_items" style="width:100%;position:relative;">

						<thead>

							<tr>

								<th class="manage-column"><?php _e('Slug', 'ulp');?></th>

								<th class="manage-column"><?php _e('Label', 'ulp');?></th>

								<th class="manage-column"><?php _e('Icon', 'ulp');?></th>

								<th class="manage-column"><?php _e('Link', 'ulp');?></th>

								<th class="manage-column" style="width: 70px;"><?php _e('Delete', 'ulp');?></th>

							</tr>

						</thead>

						<tfoot>

							<tr>

								<th class="manage-column"><?php _e('Slug', 'ulp');?></th>

								<th class="manage-column"><?php _e('Label', 'ulp');?></th>

								<th class="manage-column"><?php _e('Icon', 'ulp');?></th>

								<th class="manage-column"><?php _e('Link', 'ulp');?></th>

								<th class="manage-column" style="width: 70px;"><?php _e('Delete', 'ulp');?></th>

							</tr>

						</tfoot>

						<tbody style="width:100%;">

							<?php $k = 0;?>

							<?php foreach ($data ['menu_items'] as $slug=>$item):?>

								<tr class="<?php if($k%2==0) echo 'alternate';?>" id="tr_<?php echo $slug;?>" style="width:100%;">



									<td style="position:relative; width:30%; min-width:200px;"><input type="hidden" value="<?php echo $k;?>" name="ulp_account_page_menu_order[<?php echo $slug;?>]" class="ulp_account_page_menu_order" /><?php echo $slug;?></td>

									<td style="position:relative; min-width:200px; width:30%;color: #21759b; font-weight:bold;font-family: 'Oswald', arial, sans-serif !important;font-size: 14px;font-weight: 400;"><?php echo $item['label'];?></td>

									<td style="position:relative; width:20%; min-width:100px;"><i class="<?php echo 'fa-ulp fa-' . $slug . '-account-ulp';?>"></i></td>

									<td>

											<?php if (!empty($item ['url'])):?>

													<?php echo $item ['url'];?>

											<?php else :?>

													-

											<?php endif;?>

									</td>

									<td style="position:relative; width:20%; min-width:100px;">

										<?php

											if (isset($data ['standard_tabs'][$slug])){

												echo '-';

											} else {

												?>

												<a href="<?php echo admin_url('admin.php?page=ultimate_learning_pro&tab=student_account_custom_tabs&delete=') . $slug;?>">

													<i class="fa-ulp fa-remove-ulp"></i>

												<?php

											}

										?>

									</a></td>

								</tr>

								<?php $k++;?>

							<?php endforeach;?>

						</tbody>

					</table>

				</div>



				<div class="ulp-submit-form" style="margin-top: 20px;">

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

				</div>



			</div>

		</div>



</form>





<script>



jQuery(document).ready(function(){

		jQuery('#ulp_reorder_menu_items tbody').sortable({

			 update: function(e, ui) {

							jQuery('#ulp_reorder_menu_items tbody tr').each(function (i, row) {

								var id = jQuery(this).attr('id');

								jQuery('#'+id+' .ulp_account_page_menu_order').val(i);

							});

			 }

		});

		ulpShinySelect({

					selector: '#indeed_shiny_select',

					item_selector: '.ulp-font-awesome-popup-item',

					option_name_code: 'ulp_account_page_menu_add_new-the_icon_code',

					option_name_icon: 'ulp_account_page_menu_add_new-the_icon_class',

					default_icon: '',

					default_code: '',

					init_default: false,

					second_selector: '.ulp-icon-arrow'

		});

});

</script>

<?php

