<?php
if(!empty($tpl['employee_arr']))
{
    ?>
    <form action="" method="post" class="frm-item-add-apprentices">
    	<input type="hidden" name="item_add" value="1" />
    	<input type="hidden" name="booking_id" value="<?php echo $tpl['be_arr']['booking_id']; ?>" />
    	<input type="hidden" name="booking_service_id" value="<?php echo $tpl['be_arr']['id']; ?>" />
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
    
            <h3 class="modal-title" id="myModalLabel"><?php __('booking_service_add_apprentices_title'); ?></h3>
        </div>
    
        <div class="container-fluid">
            <div class="row m-t-sm">
				<div class="col-xs-12">
                    <div class="form-group">
                        <select name="employee_id" id="employee_id" class="select-item form-control" data-msg-required="<?php __('plugin_base_this_field_is_required', false, true);?>">
							<option value="">-- <?php __('lblChoose');?> --</option>
							<?php
							foreach ($tpl['employee_arr'] as $v)
							{
								?><option value="<?php echo $v['id']; ?>" <?php echo $tpl['be_arr'] && $tpl['be_arr']['apprentices_id'] == $v['id'] ? 'selected="selected"' : '';?>><?php echo pjSanitize::html($v['name']); ?></option><?php
							}
							?>
						</select>
                    </div>
                </div>
            </div>
    
        </div>
        
        <div class="item_details" style="display: none"></div>
        
        <div class="modal-footer">
        	<button type="button" class="btn btn-primary btnAddApprentices"><i class="fa fa-floppy-o m-r-xs"></i> <?php __('btnUpdate'); ?></button>
            <button type="button" class="btn btn-default" data-dismiss="modal"><?php __('btnCancel'); ?></button>
        </div>
    </form>
    <?php
}else{
    ?>
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>

        <h3 class="modal-title" id="myModalLabel"><?php __('booking_service_add_apprentices_title'); ?></h3>
    </div>
    <div class="item_details">
    	<div class="service-table">
    		<p class="alert alert-info alert-with-icon m-t-xs"><i class="fa fa-info-circle"></i> <?php echo @$bodies['ABK14']; ?></p>
    	</div>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal"><?php __('btnCancel'); ?></button>
    </div>
    <?php
}
?>