<script>
$(document).ready(function(){
	$('select').select2();
});
</script>
<div id="content">                        
<div class="wrap">
                  
<div class="head">
	<div class="info">
		<h1><?php echo element('compName', $this->session->userdata('logged_in')) ?> [ 
		<?php echo element('compNo', $this->session->userdata('logged_in')) ?> ]</h1>
			<ul class="breadcrumb">
            	<li><a href="<?php echo base_url()?>home"><?php echo $this->lang->line('dashboard') ?></a> <span class="divider">-</span></li>
                <li><a href="zakat/home"><?php echo $this->lang->line('module') ?></a> <span class="divider">-</span></li>
                <li class="active"><?php echo $this->lang->line('title') ?></li>
            </ul>
	</div>
                          
	<div class="search">
		<form action="<?php echo base_url() ?>admin/search" method="post">
			<input name="search_text" type="text" placeholder="search..."/>                                
            <button type="submit"><span class="i-magnifier"></span></button>
		</form>
	</div>                        
</div>  <!-- Head -->
<div class="content">
	<div class="row-fluid">
		<div class="span12">
			<?php 
				$hidden = array('order_time' => date('Y-m-d H-i-s'));
				$attrib = array('id'=>'validate'); 
				echo form_open('', $attrib, $hidden);?>
            <div class="block">
               	<div class="head">
                   	<h2><?php echo $this->lang->line('title') ?></h2>
                    <div class="side fr">
                       <button class="btn" onClick="clear_form('#validate');" type="button">Clear form</button>
                    </div>
				</div>
				<div class="content np">    
                  <div class="controls-row">
                  	<div class="span2"><?php echo $this->lang->line('name') ?></div>
                   	<div class="span10">
						<?php
							$data = array(
									'name'=>'name',
									'id'=>'name',								
									'class'=>'span5 validate[required,maxSize[50]]',); 
							echo form_input($data, set_value('name')); ?>                       
                  	</div>                            
                  </div>    
                  <div class="controls-row">
                    	<div class="span2"><?php echo $this->lang->line('description') ?></div>
                   		<div class="span10">
                            	<?php 								
								$data = array(
									'name'=>'description', 
									'id'=>'description', 
									'class'=>'span12 validate[required,maxSize[255]]',); 
								echo form_input($data, set_value('description')); ?>
                  		</div>
                  </div>
                      <div class="controls-row"> <!-- row 1 -->
                   	<div class="span2"><?php echo $this->lang->line('parent') ?></div>
                   		<div class="span4">
						<?php
							$preselgroup = '0';
							$options='';
							$options[] = '--Please Select--';
							if($zakatGroup != ''){
								foreach($zakatGroup as $row){
								$options[$row->ID] = $row->name . " [" . $row->description . "]";
								}
							}
							//$js='style="width: 250px;"';
							$js='id="parent" name="parent" style="width: 250px;"';
							echo form_dropdown('parentID', $options, $preselgroup, $js);
						?>       
                         </div>                
                  </div><!-- End Row 1 -->
                  <div class="controls-row">
                  	<div class="span2"><?php echo $this->lang->line('sequence') ?></div>
                   	<div class="span10">
						<?php
							$data = array(
									'name'=>'sequence',
									'id'=>'sequence',								
									'class'=>'span1 validate[required,custom[integer],maxSize[3]]',); 
							echo form_input($data, set_value('sequence')); ?>                       
                  	</div>                            
                  </div>    
            	  <div class="footer">
            		<div class="side fr">
                		<div class="btn-group">
                        <?php 
							$data = array(
									'name'=>'validat', 
									'class'=>'btn',
									'onClick'=>"$('#validate').validationEngine('hide');"); 
							echo form_button($data,'Hide prompts');
							$data = array(
									'name'=>'mysubmit', 
									'class'=>'btn btn-primary');
							$js='onclick="return confirm(\''.$this->lang->line('message3').'\')"';
							echo form_submit($data,'Submit',$js);
							?>
                    	</div>
                		</div>
            		</div>                                    
				</div>  <!-- content -->
    </form>
		</div>  <!-- block -->
		</div>  <!-- span12 -->
	</div>  <!-- row-fluid -->
</div>  <!-- content -->
</div>  <!-- wrap -->
</div>  <!-- content -->
