<!---- 
    Author 	: Herpan
    Tanggal : 12-08-2014	
    Revisi 	:
-->

<?php
	if($group_user->SavePrivillage == 1){
		$cek_autority_save 		= "";
	}
	else{
		$cek_autority_save 		= "disabled";
	}
	
	if($group_user->DeletePrivillage == 1){
		$cek_autority_delete 		= "";
	}
	else{
		$cek_autority_delete 		= "disabled";
	}
	//-------------end----------------------------
?>

<?php foreach($detail as $row) : ?>
<div class="easyui-layout" data-options="fit:true,border:false">
    <!-- top view-->
    <div id="form-header" data-options="region:'north',border:false" >
        <div id="form-header-wrapper">
            <table cellpadding="0" cellspacing="0" width="100%" height="100%" border="0">
                <tr>
                    <td height="26" align="left" valign="middle">
						<input type="checkbox" id="chk_suspended" name="chk_suspended" value="1" onClick="suspend(1)" style="margin-right:0px;margin-top:1px;<?=($row->TransStatus==3)?'opacity:0.7;':''?>" <?=($row->TransStatus==3)?'checked disabled':''?>  <?php echo $cek_autority_delete;?>/>
                        <span style="<?=($row->TransStatus==3)?'color:gray;':''?>">Suspend</span>
                    </td>
                    <td align="right" valign="middle">								
                        <span class="form-title">
                            <?php echo $menu_label; ?>
                        </span>
                    </td>
                </tr>
            </table>		     	
        </div>			
   </div>
   <!-- end top view -->	

   <!-- center view -->
    <div id="form-body-grey" data-options="region:'center',border:false">
        <div id="form-wrapper" class="easyui-panel" style="width:auto;padding:5px;height:524px;">
        	<form id="fm_shipment" name="fm_shipment" method="post">
            	<input type="hidden" name="id" id="txt_id" class="easyui-validatebox td_input" value="<?php echo $row->ShipmentID; ?>" />
                
            	<table class="form-detail" width="100%" cellspacing="0" cellpadding="0">
                    <tr>
                        <td><b>Shipment Name</b></td>
                        <td width="850" style="padding:1px 0px 2px;">
                            <input type="text" name="txt_name" class="easyui-validatebox" value="<?php echo $row->ShipmentName; ?>" style="width:850px;text-transform:uppercase" required <?=($row->TransStatus==3)?'readonly':''?> autocomplete="off" />
                    	</td>
                    </tr>
                    <tr>
                        <td valign="top" style="padding-top:4px;"><b>Descriptin</b></td>
                        <td style="padding:1px 0px 2px;">
							<textarea name="txt_desc" rows="4" style="width:846px;resize:none;" <?=($row->TransStatus==3)?'readonly':''?>><?php echo $row->ShipmentDesc; ?></textarea>
                        </td>
                    </tr>
                    </table>
            </form>
        </div>
        
        <div id="form-footer" data-options="region:'south',border:false">
            <table width="100%" cellpadding="0" cellspacing="0">
                <tr>
                    <td align="right">
                        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-help" onclick="" plain="true">Help</a>			
                        <a href="javascript:void(0)" class="easyui-linkbutton form-button" iconCls="icon-save" onclick="edit_data('<?php echo $menu_link?>','#fm_shipment');" <?=($row->TransStatus==3)?'disabled':''?> <?php echo $cek_autority_save;?>>Save</a>
                        <a href="javascript:void(0)" class="easyui-linkbutton form-button" iconCls="icon-cancel" onclick="">Cancel</a>
                    </td>
                </tr>
        </div>
	</div>
</div>

<script type="text/javascript">
function suspend(type){
	suspend_data_new('F',type,'<?=$menu_link?>',$('#txt_id').val(),'Shipments');
}
</script>
<?php endforeach; ?><strong></strong>
