<div class="page-content" >
    
    
<div class="row">

    <div class="col-xs-12 col-sm-12">
        <div class="widget-box">
            <div class="widget-header" style="height:70px;">
                <h4  style="text-align:center; color:green;"><b> User registration</b> </h4>
            </div>
            
            <div class="widget-body "> 
            
                 <?php
                                $message = $this->session->userdata('message');
                                if (!empty($message)) {
                                    ?>
                                    <div class="alert alert-block alert-success">
                                        <h6 class="lighter arial green" style="text-align:center;"><b>
                                                <?php echo $message;
                                                $this->session->unset_userdata('message');
                                                ?>
                                            </b></h6>
                                    </div>  
                                    <?php
                                }
                                $errormessage = $this->session->userdata('errormessage');
                                if (!empty($errormessage)) {
                                    ?>
                                    <div class="alert alert-block alert-danger">
                                        <h6 class="lighter arial red" style="text-align:center;"><b>
                                                <?php echo $errormessage;
                                                $this->session->unset_userdata('errormessage');
                                                ?>
                                            </b></h6>
                                    </div> 
                                    <?php
                                }
                                ?>
                <div class="widget-main no-padding ">
                    <form action="<?php echo admin_url()?>/userRegistration/insert_user " method="post" enctype="multipart/form-data">
                        <!-- <legend>Form</legend> -->
                        <fieldset class="col-xs-12 col-sm-12">
                            <label class="col-xs-2 col-sm-2">  Name </label>
                            <?php echo form_error('data[userName]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            <input type="text" name="data[userName]" autocomplete="off" value="<?php echo set_value('data[userName]',false); ?>" placeholder="Name" class="col-xs-4 col-sm-4" />
                           
                        </fieldset>
                        <fieldset class="col-xs-12 col-sm-12">
                            <label class="col-xs-2 col-sm-2"> National Id </label>
                            <?php echo form_error('data[nationalId]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            <input type="text" name="data[nationalId]" autocomplete="off" value="<?php echo set_value('data[nationalId]',false); ?>" placeholder="nationalId" class="col-xs-4 col-sm-4" />
                           
                        </fieldset>

                        <fieldset class="col-xs-12 col-sm-12">
                            <label class="col-xs-2 col-sm-2"> Mobile </label>
                            <?php echo form_error('data[mobile]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            <input type="text" name="data[mobile]" autocomplete="off" value="<?php echo set_value('data[mobile]',false); ?>" placeholder="mobile" class="col-xs-4 col-sm-4" />
                           
                        </fieldset>
                        <fieldset class="col-xs-12 col-sm-12">
                            <label class="col-xs-2 col-sm-2"> Email </label>
                            <?php echo form_error('data[email]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            <input type="email" name="data[email]" autocomplete="off" value="<?php echo set_value('data[email]',false); ?>" placeholder="abc@gmail.com" class="col-xs-4 col-sm-4" />
                           
                        </fieldset>

                        <fieldset class="col-xs-12 col-sm-12">
                            <label class="col-xs-2 col-sm-2">Gender </label>
                            <?php echo form_error('data[gender]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            <select name="data[gender]" class="col-xs-3 col-sm-3">
                                    
                                <?php foreach(getGender() as $key=>$value){?>
                                    <option value="<?php echo $key?>" <?php echo set_select('data[gender]',$key,FALSE);?>>
                                        <?php echo $value;?>
                                    </option>
                                <?php }?>
                            </select>
                           
                        </fieldset>

                        <fieldset class="col-xs-12 col-sm-12">
                            <label class="col-xs-2 col-sm-2"> Religion </label>
                            <?php echo form_error('data[religion]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            <select name="data[religion]" class="col-xs-3 col-sm-3">
                                    
                                <?php foreach(getReligion() as $key=>$value){?>
                                    <option value="<?php echo $key?>" <?php echo set_select('data[religion]',$key,FALSE);?>>
                                        <?php echo $value;?>
                                    </option>
                                <?php }?>
                            </select>
                           
                        </fieldset>

                        <fieldset class="col-xs-12 col-sm-12">
                            <label class="col-xs-2 col-sm-2"> Father's name </label>
                            <?php echo form_error('data[fatherName]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            <input type="text" name="data[fatherName]" autocomplete="off"  value="<?php echo set_value('data[fatherName]',false); ?>" placeholder="fatherName" class="col-xs-4 col-sm-4" />
                           
                        </fieldset>

                        <fieldset class="col-xs-12 col-sm-12">
                            <label class="col-xs-2 col-sm-2"> Mother's name </label>
                            <?php echo form_error('data[motherName]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            <input type="text" name="data[motherName]" autocomplete="off" value="<?php echo set_value('data[motherName]',false); ?>" placeholder="motherName" class="col-xs-4 col-sm-4" />
                           
                        </fieldset>
                        <fieldset class="col-xs-12 col-sm-12">
                            <label class="col-xs-2 col-sm-2"> Present Address </label> 
                            <?php echo form_error('data[presentAddress]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            
                           <textarea rows='3' cols="3" name="data[presentAddress]" class="col-xs-4 col-sm-4" ><?php echo set_value('data[presentAddress]',false); ?></textarea> 
                        </fieldset>
                        <fieldset class="col-xs-12 col-sm-12">
                            <label class="col-xs-2 col-sm-2"> Permanent Address </label>
                            <?php echo form_error('data[parmanentAddress]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            
                           <textarea rows='3' cols="3" name="data[parmanentAddress]" class="col-xs-4 col-sm-4" ><?php echo set_value('data[parmanentAddress]',false); ?></textarea> 
                        </fieldset>
                        <fieldset class="col-xs-12 col-sm-12">
                            <label class="col-xs-2 col-sm-2"> Upload photo </label>
                            <?php echo form_error('data[photo]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            <div class="col-xs-3 col-sm-3">
                           <input type="file"  name="photo" value="<?php echo set_value('data[photo]',false); ?>" class="widget-box col-xs-12 col-sm-12" placeholder="Photo Size (400*400 - 400KB)" id="id-input-file-2"/>
                          </div>
                          <label style="color:red">Maximum 1 MB, 300pxX300px, .jpg/.png/.jpeg</label>
                        </fieldset>
                        <!--<fieldset class="col-xs-12 col-sm-12">
                        <label class="col-xs-2 col-sm-2"> Upload photo </label>
                        <div class="col-xs-3 col-sm-3">
                            <input type="file" id="id-input-file-2" />
                        </div>
                        </fieldset>-->

                        <fieldset class="col-xs-12 col-sm-12">
                            <label class="col-xs-2 col-sm-2">User Type </label>
                            <?php echo form_error('data[userType]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            <select name="data[userType]" class="col-xs-3 col-sm-3">
                                    <option> Select User Type.....</option>>
                                <?php foreach(getUserType() as $key=>$value){?>
                                    <option value="<?php echo $key?>" <?php echo set_select('data[userType]',$key,FALSE);?>>
                                        <?php echo $value;?>
                                    </option>
                                <?php }?>
                            </select>
                           
                        </fieldset>
                        
                        
                       
                        <fieldset class="col-xs-12 col-sm-12">
                                <div class="col-xs-2 col-sm-2"><label>Joining Date</label></div>
                                <?php echo form_error('data[joiningdate]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                                <div class="input-group col-xs-3 col-sm-3">
                                    <input class="form-control date-picker" id="id-date-picker-1" type="text" name="data[joiningdate]" value="<?php echo set_value('data[date]',false); ?>" placeholder="dd-mm-yyyy" data-date-format="dd-mm-yyyy" />
                                    <span class="input-group-addon">
                                        <i class="fa fa-calendar bigger-110"></i>
                                    </span>
                                </div>
                        </fieldset>

                        <div class="clearfix"></div>

                        <div class="form-actions center">
                            <button type="submit" name="btnSave" class="btn btn-sm btn-success">
                                 <i class="ace-icon fa fa-check bigger-110"></i>
                                Submit
                                
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div></div></div>

