<!-- Main content -->
<section class="content">
    <div class="row">
        <div class="col-sm-12">
            <div class="tabbable">
                <div class="tab-content no-border padding-24">
                    <div class="tab-pane fade in active" id="faq-tab-1">
                        <div class="space-8"></div>
                        <div class="panel-group accordion-style1 accordion-style2" id="faq-list-1">
                            <div class="panel panel-default">
                                <div class="panel-headingnew">License Details</div>
                                <div class="left_panel col-sm-12 padding_margin0 pull-left bg-white" id="add_detail">
                                    <ul class="nav nav-tabs nav-tabs1 tab_ul col-sm-2 paddig-right0 margin-top15px">
                                        <?php echo $this->partial('menu.phtml'); ?>
                                    </ul>
                                    <div class="tab-content tab_editprofile col-sm-10 padding-left0 marginbott10px margintop10px">
                                        <div id="home" class="tab-pane fade in tab_editprofile tab_editprofile1 active">
                                            <div class="change_password tab_editprofile">
                                                <div class="tab-content" id="myTabContent">
                                                    <div id="home" class="tab-pane fade active in">
                                                        <div class="col-sm-col-sm-offset-1 margin-10auto0 paddingRL10px">
                                                            <?php
                                                            $form = $this->form;
                                                            $form->prepare();
                                                            $form->setAttribute('action', $this->url('usermanagement', ['action' => 'license-detail']));
                                                            echo $this->form()->openTag($form);
                                                            echo $this->formHidden($form->get('user_id'));
                                                            echo $this->formHidden($form->get('id'));
                                                            ?>
                                                            <?php if (!empty($msg_class)) { ?><span class="checkbox_error"><div class="alert alert-<?php echo $msg_class; ?> no-border"><button type="button" class="close" data-dismiss="alert"><i class="icon-close2" ></i><span class="sr-only">Close</span></button><span class="text-semibold"><?php echo $msg; ?></span></div></span><?php } ?>
                                                            <div class="row">
                                                                <div class="col-sm-10">
                                                                    <div class="form-group clearfix margintopbottom20">
                                                                        <label class="col-sm-3 control-label labelalign col-sm-3-new" id="Categorie Name">
                                                                            <?php echo $this->translate($this->formLabel($form->get('license_state'))); ?></label>
                                                                        <div class="col-sm-3 col-sm-4-new">
                                                                            <?php echo $this->FormElement($form->get('license_state')); ?>
                                                                            <?php echo $this->formElement($form->get('license_state_value')); ?>
                                                                            <?php echo $this->formElementErrors($form->get('license_state'), ['class' => 'error']); ?>
                                                                        </div>

                                                                        <label class="col-sm-3 control-label labelalign col-sm-3-new" id="point_airport">
                                                                            <?php echo $this->translate($this->formLabel($form->get('license_validity'))); ?>
                                                                        </label>
                                                                        <div class="col-sm-4 col-sm-4-new">
                                                                            <?php echo $this->FormElement($form->get('license_validity')); ?>
                                                                            <?php echo $this->formElementErrors($form->get('license_validity'), ['class' => 'error']); ?>
                                                                        </div>

                                                                    </div>

                                                                    <div class="form-group clearfix margintopbottom20">
                                                                        <label class="col-sm-3 control-label labelalign col-sm-3-new" id="point_airport">
                                                                            <?php echo $this->translate($this->formLabel($form->get('pancard_no'))); ?>
                                                                        </label>
                                                                        <div class="col-sm-3 col-sm-4-new">
                                                                            <?php echo $this->FormElement($form->get('pancard_no')); ?>
                                                                            <?php echo $this->formElementErrors($form->get('pancard_no'), ['class' => 'error']); ?>
                                                                        </div>

                                                                        <label class="col-sm-3 control-label labelalign col-sm-3-new" id="point_airport">
                                                                            <?php echo $this->translate($this->formLabel($form->get('driving_license_no'))); ?>
                                                                        </label>
                                                                        <div class="col-sm-3 col-sm-4-new">
                                                                            <?php echo $this->FormElement($form->get('driving_license_no')); ?>
                                                                            <?php echo $this->formElementErrors($form->get('driving_license_no'), ['class' => 'error']); ?>
                                                                        </div>


                                                                    </div>

                                                                    <div class="form-group clearfix margintopbottom20">

                                                                        <label class="col-sm-3 control-label labelalign col-sm-3-new" id="point_airport">
                                                                            <?php echo $this->translate($this->formLabel($form->get('gps'))); ?>
                                                                        </label>
                                                                        <div class="col-sm-4 col-sm-4-new">
                                                                            <?php echo $this->FormElement($form->get('gps')); ?>
                                                                            <?php echo $this->formElementErrors($form->get('gps'), ['class' => 'error']); ?>
                                                                        </div>
                                                                    </div>

<!--            <div class="form-group clearfix margintopbottom20">
                <label class="col-sm-3 control-label labelalign col-sm-3-new" id="point_airport">
                    <?php echo $this->translate($this->formLabel($form->get('license_proof'))); ?>
                </label>
                <div class="col-sm-3 col-sm-4-new">
                    <?php echo $this->FormElement($form->get('license_proof')); ?>
                    <?php echo $this->formElementErrors($form->get('license_proof'), ['class' => 'error']); ?>
                </div>
            </div>-->

<div class="form-group clearfix margintopbottom20">

<div class="col-sm-6 col-xs-10">
                                                                        <label class="col-sm-6 control-label labelalign col-sm-6-new" id="point_airport">
                                                                                   <?php echo $this->translate($this->formLabel($form->get('license_proof'))); ?>
                                                                               </label>
                                   <a href="#" class="upload_btn btn btn-blue btn-primary" data-toggle="modal" data-target="#imageCrop"  onclick="showcropbox(7)"><i class="fa fa-upload"></i> Upload File</a>
                                   <input name="license_proof" id="license_proof" value="" type="hidden">
                               </div>
    
    
    <div class="col-sm-6 col-xs-10">
                                                                        <label class="col-sm-6 control-label labelalign col-sm-6-new" id="point_airport">
                                                                                   <?php echo $this->translate($this->formLabel($form->get('police_proof'))); ?>
                                                                               </label>
                                   <a href="#" class="upload_btn btn btn-blue btn-primary" data-toggle="modal" data-target="#imageCrop"  onclick="showcropbox(6)"><i class="fa fa-upload"></i> Upload File</a>
                                   <input name="police_proof" id="police_proof" value="" type="hidden">
                               </div>
    
</div>


<div class="form-group clearfix margintopbottom20">

    <div class="col-sm-6 col-xs-10">
                                                                        <label class="col-sm-6 control-label labelalign col-sm-6-new" id="point_airport">
                                                                                   <?php echo $this->translate($this->formLabel($form->get('pancard_proof'))); ?>
                                                                               </label>
                                   <a href="#" class="upload_btn btn btn-blue btn-primary" data-toggle="modal" data-target="#imageCrop"  onclick="showcropbox(3)"><i class="fa fa-upload"></i> Upload File</a>
                                   <input name="pancard_proof" id="pancard_proof" value="" type="hidden">
                               </div>
    
    
    <div class="col-sm-6 col-xs-10">
                                                                        <label class="col-sm-6 control-label labelalign col-sm-6-new" id="point_airport">
                                                                                   <?php echo $this->translate($this->formLabel($form->get('audit_proof'))); ?>
                                                                               </label>
                                   <a href="#" class="upload_btn btn btn-blue btn-primary" data-toggle="modal" data-target="#imageCrop"  onclick="showcropbox(5)"><i class="fa fa-upload"></i> Upload File</a>
                                   <input name="audit_proof" id="audit_proof" value="" type="hidden">
                               </div>


</div>


                                                                    


                                                                    



                                                                    

                                                                    <div class="form-group clearfix margintopbottom20">
                                                                        <label class="col-sm-3 control-label labelalign col-sm-3-new" id="">  </label>
                                                                        <div class="col-sm-4 col-sm-4-new">

                                                                        </div>
                                                                        <label class="col-sm-3 control-label labelalign col-sm-3-new" id="update_profiel"></label>
                                                                        <div class="col-sm-3 col-sm-4-new " align="right">

                                                                            <!--<a class="reset_btn btn btn-success btn-new-vehile" href="#">
                                                                                <i class="fa fa-retweet"></i>
                                                                                Reset
                                                                            </a>
                                                                            <button type="button" class="save_data_btn btn btn-primary btn-new-vehile butoon_save btn-warning" >Save</button>-->


                                                                            <?php echo $this->FormElement($form->get('submit_type')); ?>
                                                                            <a class="reset_btn btn btn-success btn-new-vehile" href="#"><i class="fa fa-retweet"></i> Reset</a>
                                                                            <?php echo $this->FormElement($form->get('license_save')); ?>

                                                                        </div>
                                                                    </div>
                                                                </div>

                                                                <div class="col-sm-12 col-md-8 col-lg-12 clearfix userprofileimg">
                                                                    <div id="crop-avatar">

                                                                        <!-- Current avatar -->
                                                                        <?php
                                                                        if (count($getdoc) > 0) {

                                                                            for ($docid = 0; $docid < count($getdoc); $docid++) {
                                                                                $image_name = isset($getdoc[$docid]['doc_file_upload']) ? $getdoc[$docid]['doc_file_upload'] : '';
                                                                                $image_title = isset($getdoc[$docid]['document_name']) ? $getdoc[$docid]['document_name'] : '';

                                                                                $filepath = getcwd() . "/public/upload/$id/" . $image_name;
                                                                                $imagepath = "/upload/$id/" . $image_name;
                                                                                if (file_exists($filepath)) {
                                                                                    ?>
                                                                                    <div class="avatar-view userimg_byratio preview_img" title="<?php echo $image_title; ?>">
                                                                                        <img src="<?php echo $imagepath; ?>"
                                                                                             id="residential_proof" alt="<?php echo $image_title; ?>"  style="height: 84px;width:150px;">
                                                                                        <h6><center><b><a download href="<?php echo $imagepath; ?>"><?php echo $image_title; ?></a></b></center></h6><br/>
                                                                                        <a download href="<?php echo $imagepath; ?>">Download</a>
                                                                                    </div>

                                                                                <?php }
                                                                            }
                                                                        }
                                                                        ?>

<!--                                                                        <div class="avatar-view userimg_byratio preview_img" title="Residential Address"> <img src="/images/default_user.png" id="residential_proof" alt="Avatar"> <h6><center><b>Residential Address</b></center></h6></div>
                                                                        <div class="avatar-view userimg_byratio preview_img" title="Office Address"> <img src="/images/default_user.png" id="office_proof" alt="Avatar"> <h6><center><b>Office Address</b></center></h6></div>
                                                                        <div class="avatar-view userimg_byratio preview_img" title="Pan Card Details"> <img src="/images/default_user.png" id="pan_card" alt="Avatar"> <h6><center><b>Pan Card Details</b></center></h6></div>
                                                                        <div class="avatar-view userimg_byratio preview_img" title="Vehicle Image"> <img src="/images/default_user.png" id="vehicle_image" alt="Avatar"> <h6><center><b>Vehicle Image</b></center></h6></div>
                                                                        <div class="avatar-view userimg_byratio preview_img" title="Badge / License No"> <img src="/images/default_user.png" id="licence_img" alt="Avatar"> <h6><center><b>Badge / License No</b></center></h6></div>
                                                                        <div class="avatar-view userimg_byratio preview_img" title="Police Verification"> <img src="/images/default_user.png" id="police_verification" alt="Avatar"> <h6><center><b>Police Verification</b></center></h6></div>
                                                                        <div class="avatar-view userimg_byratio preview_img" title="Audit Report"> <img src="/images/default_user.png" id="audit_verification" alt="Avatar"> <h6><center><b>Audit Report</b></center></h6></div>
                                                                        <div class="avatar-view userimg_byratio preview_img" title="Rc Proof"> <img src="/images/default_user.png" id="rcproof_verification" alt="Avatar"> <h6><center><b>Rc Proof</b></center></h6></div>-->
                                                                        <!-- Loading state -->

                                                                    </div>
                                                                </div>
                                                            </div>
<?php echo $this->form()->closeTag(); ?>
                                                            
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <br>
                    <!-- /.widget-box -->
                </div>
                <!-- /.col -->
                </section>

<div class="modal fade" id="imageCrop" tabindex="-1" role="dialog" aria-labelledby="avatar-modal-label" aria-hidden="true">
    <div class="modal-dialog modal-lg">

        <div class="modal-content">

            <form class="cropimage" method="post" enctype="multipart/form-data" action="<?php echo $this->url("usermanagement", ['action' => 'uploadImage']) ?>">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">×</button>
                    <h4 class="modal-title text-center" id="avatar-modal-label" >Post Picture</h4>
                    <h5 class="text-center text-info">Please select image for crop</h5>
                </div>

                <input type="file" name="photoimg" class="photoimg" />
                <input type="hidden" name="hdn-profile-id" class="hdn-profile-id" value="1" />
                <input type="hidden" name="hdn-x1-axis" class="hdn-x1-axis" value="" />
                <input type="hidden" name="hdn-y1-axis" class="hdn-y1-axis" value="" />
                <input type="hidden" name="hdn-x2-axis" value="" class="hdn-x2-axis" />
                <input type="hidden" name="hdn-y2-axis" value="" class="hdn-y2-axis" />
                <input type="hidden" name="hdn-thumb-width" class="hdn-thumb-width" value="" />
                <input type="hidden" name="hdn-thumb-height" class="hdn-thumb-height" value="" />
                <input type="hidden" name="action" value="" id="action" />
                <input type="hidden" name="loc" value="" id="loc" />
                <input type="hidden" name="image_name" value="" class="image_name" />
                <input type="hidden" name="crop_enabled" value="no" class="crop_enabled" />

                <div class='preview-avatar-profile' style="position:relative;">
                </div>
                <div id="thumbs" style="padding:5px; width:600p"></div>
                <div class="modal-footer">
                    <button class="btn btn-default close-modal-btn" type="button" data-dismiss="modal">Close</button>
                    <button type="button" class="btn-crop-user btn btn-primary">Crop & Save</button>
                </div>
            </form>
        </div>
    </div>
</div>