<?php
if($staff!=-1){?>
	
	<div class="form-group">
		<label for="vis_firstname" class="col-sm-2 control-label"><? echo $vis_language['TXTCALLFORWARDING']; ?></label>
		<div class="col-sm-10">
			 <div class="radio i-checks m-r-lg pull-left"><label>
			  <input type="radio" name="vis_forward_type<?=$operation['type_id']?>" checked="checked" id="vis_forward_phone<?=$operation['type_id']?>" value="0"><i></i>
			  <?= $vis_language['TXTTOPHONE']; ?></label>  </div>
			  <div class="radio i-checks m-r-lg pull-left"><label>
			  <input type="radio"  name="vis_forward_type<?=$operation['type_id']?>" id="vis_forward_browser<?=$operation['type_id']?>" value="1"><i></i>
			   <?= $vis_language['TXTTOSTAFFBROWSER']; ?></label>  </div>
		</div>
	</div> 
	
	<div class="form-group" id="forward_to_phone<?=$operation['type_id']?>">
		<label for="vis_firstname" class="col-sm-2 control-label"><? echo $vis_language['TXTFORWARDINGNUM']; ?></label>
		<div class="col-sm-9">
			<input class="form-control input-sm" type="text" name="vis_forward_number<?=$operation['type_id']?>" id="vis_forward_number<?=$operation['type_id']?>" placeholder="<?=$vis_language['MSGFORWARNUMBER']; ?>">
		</div>
	</div>
	
	<div class="form-group"  id="forward_to_browser<?=$operation['type_id']?>" style="display:none;" >
		<label class="col-sm-2 control-label"></label>
		<div class="col-sm-9">
			<div class="dept_access_list">

			<?php for($i=0;$i<count($staff);$i++) { ?>
				<label class="checkbox-inline i-checks">
					<input type="checkbox"  value="<? echo $staff[$i]['staff_id']; ?>" id="vis_staff_<?=$i?>_<?=$operation['type_id']?>" name="vis_staff<?=$operation['type_id']?>_<?=$i?>" checked="checked" /> <i></i><? echo $staff[$i]['first_name'].' '.$staff[$i]['last_name'].'    '; ?>
				</label><br/>
	   
			<? }?>
			</div>
			<input type="hidden" name="vis_total_staff<?=$operation['type_id']?>" id="vis_total_staff<?=$operation['type_id']?>" value="<?=count($staff)?>">
		</div>
	</div>
	<script type="text/javascript">
	  $(".selectpicker").selectpicker();

		$("#vis_forward_phone<?=$operation['type_id']?>").click( function(){ 
			$('#forward_to_phone<?=$operation['type_id']?>').show();
			$('#forward_to_browser<?=$operation['type_id']?>').hide();
		});
		$("#vis_forward_browser<?=$operation['type_id']?>").click( function(){ 
			$('#forward_to_phone<?=$operation['type_id']?>').hide();
			$('#forward_to_browser<?=$operation['type_id']?>').show();
		});
	 </script>
<?php
}
?>
