
<!-- NAMA DAN NO PENDAFTARAN -->
<div class="box box-warning">
	<form class="form-vertical" action="<?php echo base_url(); ?>apply/save" method="post" id="form211">
		<input type="hidden" name="category" value="MAIN" />
		<input type="hidden" name="from" value="#tab_2_1" />
		<div class="box-header with-border">
			<h3 class="box-title">Nama dan Nombor Pendaftaran</h3>
			<div class="box-tools pull-right">
				<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
			</div>
		</div>
		
		<div class="box-body">
			<div class="row">
				<div class="col-md-6">
					<!-- COMPANY NAME -->
					<div class="form-group">
						<label for="companyName" class="col-sm-4 control-label"><?php echo $this->lang->line('companyName'); ?></label>
						<div class="col-sm-8">
							<input type="text" class="form-control" id="companyName" name="companyName"
							value="<?php echo ($company['main'] && $company['main']->companyName) ? $company['main']->companyName : NULL; ?>"
							placeholder="<?php echo $this->lang->line('companyName'); ?>" value="">
						</div>
					</div>
				</div>
				
				<div class="col-md-6">
					<!-- COMPANY REGISTRATION NO -->
					<div class="form-group">
						<label for="companyNo" class="col-sm-4 control-label"><?php echo $this->lang->line('companyNo'); ?></label>
						<div class="col-sm-8">
							<input type="text" class="form-control" id="companyNo" name="companyNo"
							value="<?php echo ($company['main'] && $company['main']->companyNo) ? $company['main']->companyNo : NULL; ?>"
							placeholder="<?php echo $this->lang->line('companyNo'); ?>" value="">
						</div>
					</div>
				</div>
			</div>
		</div>

		<div class="box-footer">
			<div class="pull-right box-sm">
				<a href="<?php echo base_url(); ?>" class="btn btn-danger"><i class="fa fa-times"></i>&nbsp;<?php echo $this->lang->line('Cancel'); ?></a>
				<button type="submit" class="btn btn-md bg-green"><i class="fa fa-check"></i>&nbsp;<?php echo $this->lang->line('SaveAndProceed'); ?></button>
			</div>
		</div>
	</form>
</div>

<!-- AKTIVITI UTAMA SYARIKAT -->
<div class="box box-warning">
	<div class="box-header with-border">
		<h3 class="box-title">Aktiviti Utama Syarikat</h3>
		<div class="box-tools pull-right">
			<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
		</div>
	</div>
	
	<div class="box-body">
		<div style="overflow: auto; padding: 0.25%">
			<button class="btn btn-sm bg-blue pull-right" onclick="javascript:OpenModal('activity',0);">
				<span class="glyphicon glyphicon-plus"></span> <?php echo $this->lang->line('Add'); ?>
			</button>
		</div>
		<table id="compActTable" class="table dtable table-striped">
			<thead><tr><th>Bil</th><th>Keterangan</th><th>Tempoh (Tahun)</th><th>&nbsp;</th></tr></thead>
			<tbody>
				<?php
				if($company['activities']) {
					foreach($company['activities'] as $key=>$value) {
						?>
							<tr>
								<td><?php echo ($key+1); ?></td>
								<td><a href="javascript:OpenModal('activity',<?php echo $value->ID; ?>);"><?php echo $value->description; ?></a></td>
								<td><?php echo $value->year; ?></td>
								<td><a class="btn btn-xs bg-red"
											onclick="return PromptDelete();"
											href="<?php echo base_url(); ?>apply/delete/<?php echo $value->ID; ?>/activity"><i class="fa fa-trash"></i></a></td>
							</tr>
						<?php
					}
				}
				?>
			</tbody>
		</table>
	</div>
</div>

<!-- ALAMAT SURAT MENYURAT -->
<div class="box box-warning">
	<form class="form-vertical" action="<?php echo base_url(); ?>apply/save" method="post" id="form213">
	<input type="hidden" name="category" value="ADDRESS" />
	<input type="hidden" name="corrType" value="CORRES" />
	<input type="hidden" name="from" value="#tab_2_1" />
	<div class="box-header with-border">
		<h3 class="box-title">Alamat Surat Menyurat</h3>
		<div class="box-tools pull-right">
			<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
		</div>
	</div>
	
	<div class="box-body">
		<!-- CORRESPONDENCE ADDRESS -->
		<div class="row">
			<div class="col-md-6">
				<!-- ADDRESS -->
				<div class="form-group">
					<label for="address" class="col-sm-4 control-label"><?php echo $this->lang->line('address'); ?></label>
					<div class="col-sm-8">
						<?php $address = ($company['address']['corres'] && $company['address']['corres']->address) ? $company['address']['corres']->address : NULL; ?>
						<textarea type="text" class="form-control" row="30" id="corrAddress" name="address"><?php echo $address ?></textarea>
					</div>
					<div>&nbsp;</div>
				</div>
				
				<!-- POSTCODE -->
				<div class="form-group">
					<label for="postCode" class="col-sm-4 control-label"><?php echo $this->lang->line('postCode'); ?></label>
					<div class="col-sm-8">
						<?php $postCode = ($company['address']['corres'] && $company['address']['corres']->postCode) ? $company['address']['corres']->postCode : NULL; ?>
						<input type="text" class="form-control" id="corrPostCode" name="postCode"
							placeholder="<?php echo $this->lang->line('postCode'); ?>" value="<?php echo $postCode; ?>">
					</div>
					<div>&nbsp;</div>
				</div>
				
				<!-- CITY -->
				<div class="form-group">
					<label for="city" class="col-sm-4 control-label"><?php echo $this->lang->line('city'); ?></label>
					<div class="col-sm-8">
						<?php $city = ($company['address']['corres'] && $company['address']['corres']->city) ? $company['address']['corres']->city : NULL; ?>
						<input type="text" class="form-control" id="corrCity" name="city"
							placeholder="<?php echo $this->lang->line('city'); ?>" value="<?php echo $city; ?>">
					</div>
					<div>&nbsp;</div>
				</div>
			</div>
			
			<div class="col-md-6">
				<!-- STATE -->
				<div class="form-group">
					<label for="stateID" class="col-sm-4 control-label"><?php echo $this->lang->line('stateID');?></label>
					<div class="col-sm-8">
						<select id="corrState" name="stateID" class="form-control">
						<option disabled selected>---</option>
						<?php
						$stateID = ($company['address']['corres'] && $company['address']['corres']->stateID) ? $company['address']['corres']->stateID : NULL;
						if (isset($states) && $states) {
							foreach($states as $state)  {
							?>
								<option value="<?php echo $state->fldid;?>"
									<?php echo ($state->fldid == $stateID) ? " selected=\"selected\" " : ""; ?>
								><?php echo $state->fldname;?></option>
							<?php
							}
						}
						?>
						</select>
					</div>
					<div>&nbsp;</div>
				</div>
				
				<!-- LATITUDE -->
				<div class="form-group">
					<label for="latitude" class="col-sm-4 control-label"><?php echo $this->lang->line('latitude'); ?></label>
					<div class="col-sm-8">
						<div class="row">
							
							<?php $latitude = ($company['address']['corres'] && $company['address']['corres']->latitude) ? $company['address']['corres']->latitude : NULL; ?>
							<input type="text" class="form-control" id="corrLatitude" name="latitude" placeholder="<?php echo $this->lang->line('latitude'); ?>" value="<?php echo $latitude; ?>">
							
						</div>
					</div>
					<div>&nbsp;</div>
				</div>
				
				<!-- LONGITUDE -->
				<div class="form-group">
					<label for="longitude" class="col-sm-4 control-label"><?php echo $this->lang->line('longitude'); ?></label>
					<div class="col-sm-8">
						<div class="row">
							<?php $longitude = ($company['address']['corres'] && $company['address']['corres']->longitude) ? $company['address']['corres']->longitude : NULL; ?>
							<input type="text" class="form-control" id="corrLongitude" name="longitude" placeholder="<?php echo $this->lang->line('longitude'); ?>" value="<?php echo $longitude; ?>">
							
						</div>
					</div>
					<div>&nbsp;</div>
				</div>
			</div>
		</div>
	</div>
	
	<div class="box-footer">
		<div class="pull-right box-sm">
			<a href="<?php echo base_url(); ?>" class="btn btn-danger"><i class="fa fa-times"></i>&nbsp;<?php echo $this->lang->line('Cancel'); ?></a>
			<button type="submit" class="btn btn-md bg-green"><i class="fa fa-check"></i>&nbsp;<?php echo $this->lang->line('SaveAndProceed'); ?></button>
		</div>
	</div>
	</form>
</div>

<!-- PHONE/FAX/EMAIL/WEBSITE -->
<div class="box box-warning">
	<form class="form-vertical" action="<?php echo base_url(); ?>apply/save" method="post" id="form214">
	<input type="hidden" name="category" value="MAIN" />
	<input type="hidden" name="from" value="#tab_2_1" />
	<div class="box-header with-border">
		<h3 class="box-title">Telefon, Fax, Emel dan Laman Web</h3>
		<div class="box-tools pull-right">
			<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
		</div>
	</div>
	
	<div class="box-body">
		<div class="row">
			<div class="col-md-6">
				<!-- PHONE NO -->
				<div class="form-group">
					<label for="phoneNo" class="col-sm-4 control-label"><?php echo $this->lang->line('phoneNo'); ?></label>
					<div class="col-sm-8">
						<?php $phoneNo = ($company['main'] && $company['main']->phoneNo) ? $company['main']->phoneNo : NULL; ?>
						<input type="text" class="form-control" id="phoneNo" name="phoneNo" placeholder="<?php echo $this->lang->line('phoneNo'); ?>" value="<?php echo $phoneNo; ?>">
					</div>
					<div>&nbsp;</div>
				</div>
				<!-- EMAIL -->
				<div class="form-group">
					<label for="email" class="col-sm-4 control-label"><?php echo $this->lang->line('email'); ?></label>
					<div class="col-sm-8">
						<?php $email = ($company['main'] && $company['main']->email) ? $company['main']->email : NULL; ?>
						<input type="text" class="form-control" id="email" name="email" placeholder="<?php echo $this->lang->line('email'); ?>" value="<?php echo $email; ?>">
					</div>
					<div>&nbsp;</div>
				</div>
			</div>
			
			<div class="col-md-6">
				<!-- FAX NO -->
				<div class="form-group">
					<label for="faxNo" class="col-sm-4 control-label"><?php echo $this->lang->line('faxNo'); ?></label>
					<div class="col-sm-8">
						<?php $faxNo = ($company['main'] && $company['main']->faxNo) ? $company['main']->faxNo : NULL; ?>
						<input type="text" class="form-control" id="faxNo" name="faxNo" placeholder="<?php echo $this->lang->line('faxNo'); ?>" value="<?php echo $faxNo; ?>">
					</div>
					<div>&nbsp;</div>
				</div>
				<!-- WEBSITE -->
				<div class="form-group">
					<label for="website" class="col-sm-4 control-label"><?php echo $this->lang->line('website'); ?></label>
					<div class="col-sm-8">
						<?php $website = ($company['main'] && $company['main']->website) ? $company['main']->website : NULL; ?>
						<input type="text" class="form-control" id="website" name="website" placeholder="<?php echo $this->lang->line('website'); ?>" value="<?php echo $website; ?>">
					</div>
					<div>&nbsp;</div>
				</div>
			</div>
		</div>
	</div>
	
	<div class="box-footer">
		<div class="pull-right box-sm">
			<a href="<?php echo base_url(); ?>" class="btn btn-danger"><i class="fa fa-times"></i>&nbsp;<?php echo $this->lang->line('Cancel'); ?></a>
			<button type="submit" class="btn btn-md bg-green"><i class="fa fa-check"></i>&nbsp;<?php echo $this->lang->line('SaveAndProceed'); ?></button>
		</div>
	</div>
	</form>
</div>