<!--
Author 		  : Tagor
Last update   : 05/08/2014
Revision      : 1) Hasan | 11/02/2015 | Design UI
-->

<style>
.td_warehousesinput{
	width:950px;
}
</style>

<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 align="left" valign="middle">
                    <a href="#" class="easyui-linkbutton" iconCls="icon-document" plain="true" onclick="location.reload()">New</a>
                </td>							
                <td height="25" align="right" valign="middle">								
                    <span class="form-title">
                        <?=$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_warehouse" name="fm_warehouse" method="post">
                <table width="100%" border="0" cellspacing="1" cellpadding="1">
                <tr>
                    <td width="300px"><b>Warehouse Name</b></td>
                    <td>
                        <input type="text" name="txt_warehousename" class="easyui-validatebox" style="width:850px;" data-options="required:true" />
                    </td>									   
                </tr>
                <tr>
                    <td valign="top"><b>Description</b></td>
                    <td>
                        <textarea name="txt_description" id="txt_description" style="width:846px;resize:none;" rows="4"></textarea>
                    </td>
                </tr>
                <tr>
                    <td valign="top"><b>Address</b></td>
                    <td>
                        <textarea name="txt_address" id="txt_address" style="width:846px;resize:none;" rows="4"></textarea>
                    </td>
                </tr>
                <tr>
                    <td valign="top"><b>Country</b></td>
                    <td>
                        <select name="cmb_country" class="easyui-combogrid" 
                            id="cmb_country" required="required" 
                            style="width:852px; height:20px;" 
                            data-options="
                                panelWidth: 460,
                                idField: 'CountryCode',
                                textField: 'CountryName',
                                url: '<?php echo base_url(); ?><?php echo"$menu_link"; ?>/get_country',                
                                columns: [[
                                {field:'CountryCode',title:'Country Code',width:110},
                                {field:'CountryName',title:'Country Name',width:190}
                                ]],
                                fitColumns: true
                            "
                        >
                        </select>
                    </td>
                </tr>
                <tr>
                    <td valign="top"><b>State</b></td>
                    <td>
                       	<select name="cmb_state" class="easyui-combogrid" 
                            id="cmb_state" required="required" 
                            style="width:852px;height:20px;" 
                            data-options="
                                panelWidth: 460,
                                idField: 'StateCode',
                                textField: 'StateName',
                                url: '<?php echo base_url(); ?><?php echo"$menu_link"; ?>/get_state',                
                                columns: [[
                                {field:'StateCode',title:'State Code',width:110},
                                {field:'StateName',title:'State Name',width:190}
                                ]],
                                fitColumns: true
                            "
                        >
                        </select>
                    </td>
                </tr>
                <tr>
                    <td valign="top"><b>City</b></td>
                    <td>
                        <select name="cmb_city" class="easyui-combogrid" 
                            id="cmb_city" required="required" 
                            style="width:852px;height:20px;" 
                            data-options="
                                panelWidth: 460,
                                idField: 'CityCode',
                                textField: 'CityName',
                                url: '<?php echo base_url(); ?><?php echo"$menu_link"; ?>/get_city',               
                                columns: [[
                                {field:'CityCode',title:'City Code',width:110},
                                {field:'CityName',title:'City Name',width:190}
                                ]],
                                fitColumns: true
                            "
                        >
                        </select>
                    </td>
                </tr>
                <tr>
                    <td valign="top"><b>Contact Person</b></td>
                    <td>
                        <select name="txt_contact_person" class="easyui-combogrid" 
                        	id="txt_contact_person" required="required" 
                            style="width:852px;height:20px;" 
                            data-options="
                                panelWidth: 460,
                                idField: 'EmployeeCode',
                                textField: 'EmployeeName',
                                url: '<?php echo base_url(); ?><?php echo"$menu_link"; ?>/get_employee',              
                                columns: [[
                                {field:'EmployeeCode',title:'State Code',width:110},
                                {field:'EmployeeName',title:'State Name',width:190}
                                ]],
                                fitColumns: true
                       		"
                        >
                        </select>
                    </td>
                </tr>
                </table>
            </form>
        </div>
    
        <div id="form-footer">
            <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" id="save_data">Save</a> 								
            <a href="javascript:void(0)" class="easyui-linkbutton form-button" iconCls="icon-print" onclick="" disabled>Preview & Print</a>   
            <a href="javascript:void(0)" class="easyui-linkbutton form-button" iconCls="icon-cancel" onclick="" disabled>Cancel</a>	
		</div>		
    </div>
</div>

<script>
$(document).ready(function(){
	$('#save_data').click(function(){
		save_data('<?=$menu_link?>','#fm_warehouse','1');
	});
});
</script>