<div class="col-sm-col-sm-offset-1 margin-10auto0 paddingRL10px">
    <?php
        $form = $this->form;
        $form->prepare();
        //$form->setAttribute('action', $this->url('local-hire', ['action' => 'index']));
        $form->setAttribute('method', 'post');
        $form->setAttribute('id', 'license-detail-form');
        $form->setAttributes(['name'=>'license_detail_form', 'id'=>'license-detail-form',
        'onsubmit'=>"return formSubmit13('license-detail-form', '/vehicle-details/license-detail')"]);
        echo $this->form()->openTag($form);
    ?>
    <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('License State');?> <span  class="defaultcolor">*</span></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')); ?>
                </div>
                <label class="col-sm-3 control-label labelalign col-sm-3-new" id="point_airport">
                   <?php echo $this->translate('Badge / License No');?> <span  class="defaultcolor">*</span>
                </label>
                <div class="col-sm-3 col-sm-4-new">
                    <?php echo $this->FormElement($form->get('badge_license_number')); ?>
                </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('License Proof');?> <span  class="defaultcolor">*</span> </label>
                <div class="col-sm-3 col-sm-4-new">
                    <?php echo $this->FormElement($form->get('license_proof')); ?>
                </div>

                <label class="col-sm-3 control-label labelalign col-sm-3-new" id="point_airport"><?php echo $this->translate('License Validity');?>  </label>
                <div class="col-sm-4 col-sm-4-new">
                    <?php echo $this->FormElement($form->get('license_validity')); ?>
                </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('Insurance Validity');?> <span  class="defaultcolor">*</span> </label>
                <div class="col-sm-3 col-sm-4-new">
                    <?php echo $this->FormElement($form->get('insurance_validity')); ?>
                </div>

                <label class="col-sm-3 control-label labelalign col-sm-3-new" id="point_airport"><?php echo $this->translate('GPS Device No');?>  </label>
                <div class="col-sm-4 col-sm-4-new">
                    <?php echo $this->FormElement($form->get('gps_device_number')); ?>
                </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('Pancard');?> <span  class="defaultcolor">*</span> </label>
                <div class="col-sm-3 col-sm-4-new">
                    <?php echo $this->FormElement($form->get('pancard')); ?>
                </div>

                <label class="col-sm-3 control-label labelalign col-sm-3-new" id="point_airport"><?php echo $this->translate('Pancard Proof');?> </label>
                <div class="col-sm-4 col-sm-4-new">
                    <?php echo $this->FormElement($form->get('pancard_proof')); ?>
                </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('Police Report');?> <span  class="defaultcolor">*</span> </label>
                <div class="col-sm-3 col-sm-4-new">
                    <?php echo $this->FormElement($form->get('police_report')); ?>
                </div>

                <label class="col-sm-3 control-label labelalign col-sm-3-new" id="point_airport"><?php echo $this->translate('Audit Report');?> </label>
                <div class="col-sm-4 col-sm-4-new">
                    <?php echo $this->FormElement($form->get('audit_report')); ?>
                </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('lecense_save')); ?>

                </div>
            </div>
        </div>
    </div>
    <?php echo $this->form()->closeTag(); ?>
</div>

<script>
//state name called...
$("#license-state").autocomplete({
    source: function (request, response) {
        $.ajax({
            url: '/profile/state-list',
            dataType: "json",
            type: "POST",
            data: {
                term: request.term
            },
            success: function (data) {
                response(data);
            }
        });
    },
    min_length: 3,
    delay: 300,

    focus: function (event, ui) {
        $("#state-aa").val(ui.item.label);
        return false;
    },
    select: function (event, ui) {
        $("#license-state").val(ui.item.label);
        $("#license-state-value").val(ui.item.value);

        return false;
    }
});
</script>