<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"><?php echo $this->translate('Share'); ?> </div>
                                <div class="left_panel col-sm-12 padding_margin0 pull-left bgwhite">
                                    <?php echo $this->partial('menu-sidebar.phtml'); ?>
                                    <div class="tab-content tab_editprofile col-sm-10 padding-left0 marginbott10px margintop10px">
                                        <div id="common-tab" class="tab-pane fade in tab_editprofile tab_editprofile1 active">
                                            <div class="col-sm-col-sm-offset-1 margin-10auto0 paddingRL10px">

                                                <?php
$shareFare    =   isset($fareDetails['share_fare'])?$fareDetails['share_fare']:'';
//echo '<pre>';print_r($shareFare);die();
//echo $shareFare[0]['share_type_id'];
?>
<?php
$form = $this->form;
$form->setAttribute('action', $this->url('setting', ['action' => 'add-price-share']));
$form->setAttribute('method', 'post');
echo $this->form()->openTag($form);
echo $this->formHidden($form->get('comp_share_id')->setValue(isset($shareFare[0]['id'])?$shareFare[0]['id']:''));
?>

<div class="row">
    <div class="col-sm-12 margin20auto5 padding10px">
        <div class="col-sm-12 col-md-12">
            <div class="portlet-body">

                <h4 class="different_share"><?php echo $this->translate('Different Shares'); ?></h4>
                <br>

                <div class="row form-group">
                            <div class="col-sm-4 margin-left15 form-group">
                                <label class="nightRateBegin_premium"><?php echo $this->translate($form->get('booking_type')->getLabel()); ?></label>
<?php echo $this->FormElement($form->get('booking_type')->setValue(isset($shareFare[0]['booking_type']) ? $shareFare[0]['booking_type'] : '')); ?>
                                <?php echo $this->formElementErrors($form->get('booking_type'), ['class' => 'error']); ?>
                            </div>
                        </div>
                        <hr>

                <div class="form-inline form-group">

                    <h5 class="company_share"><?php echo $this->translate($form->get('company_share')->getLabel()); ?></h5>

                    <div class="col-sm-2 no-padding margin-top10px">
                        <div class="carbooking">
                            <input type="radio" value="1" name="company_share_type" id="company-share-per" <?php if(isset($shareFare[0]['company_share_type']) && $shareFare[0]['company_share_type'] =='1'){ ?>  <?php echo 'checked="checked"';}else {echo 'checked="checked"'; }?>/>
                            <label for="company-share-per"><span class="radio">%</span></label>
                        </div>

                    </div>

                    <div class="col-sm-2 no-padding margin-top10px">
                        <div class="carbooking">
                            <input type="radio" value="2" name="company_share_type" id="company-share-rs" <?php if(isset($shareFare[0]['company_share_type']) && $shareFare[0]['company_share_type'] =='2'){ ?>  <?php echo 'checked="checked"';}?>/>
                            <label for="company-share-rs"><span class="radio">Rs</span></label>
                        </div>

                    </div>

                    <div class="input-group">
                        <?php echo $this->FormElement($form->get('company_share')->setValue(isset($shareFare[0]['company_share_value'])?$shareFare[0]['company_share_value']:'')); ?>
                        <?php echo $this->FormElement($form->get('company_share_type_id')); ?>
                         <?php echo $this->formElementErrors($form->get('company_share'), ['class' => 'error']); ?>
                    </div>

                </div>

                <hr>


                <div class="form-inline form-group">

                    <h5 class="company_share"><?php echo $this->translate($form->get('partner_share')->getLabel()); ?></h5>

                    <div class="col-sm-2 no-padding margin-top10px">
                        <div class="carbooking">
                            <input type="radio" value="1" name="partner_share_type" id="partner-share-per"  <?php if(isset($shareFare[0]['partner_share_type']) && $shareFare[0]['partner_share_type'] =='1'){ ?>  <?php echo 'checked="checked"';}else {echo 'checked="checked"'; }?>/>
                            <label for="partner-share-per"><span class="radio">%</span></label>
                        </div>

                    </div>

                    <div class="col-sm-2 no-padding margin-top10px">
                        <div class="carbooking">
                            <input type="radio" value="2" name="partner_share_type" id="partner-share-rs" <?php if(isset($shareFare[0]['partner_share_type']) && $shareFare[0]['partner_share_type'] =='2'){ ?>  <?php echo 'checked="checked"';}?>/>
                            <label for="partner-share-rs"><span class="radio">Rs</span></label>
                        </div>

                    </div>

                    <div class="input-group">
                        <?php echo $this->FormElement($form->get('partner_share')->setValue(isset($shareFare[0]['partner_share_value'])?$shareFare[0]['partner_share_value']:'')); ?>
                        <?php echo $this->FormElement($form->get('partner_share_type_id')); ?>
                        <?php echo $this->formElementErrors($form->get('partner_share'), ['class' => 'error']); ?>
                    </div>

                </div>

                <hr>

                <div class="form-inline form-group">

                    <h5 class="company_share"><?php echo $this->translate($form->get('driver_share')->getLabel()); ?></h5>

                    <div class="col-sm-2 no-padding margin-top10px">
                        <div class="carbooking">
                            <input type="radio" value="1" name="driver_share_type" id="driver-share-per" <?php if(isset($shareFare[0]['driver_share_type']) && $shareFare[0]['driver_share_type'] =='1'){ ?>  <?php echo 'checked="checked"';}else {echo 'checked="checked"'; }?>/>
                            <label for="driver-share-per"><span class="radio">%</span></label>
                        </div>

                    </div>

                    <div class="col-sm-2 no-padding margin-top10px">
                        <div class="carbooking">
                            <input type="radio" value="2" name="driver_share_type" id="driver-share-rs" <?php if(isset($shareFare[0]['driver_share_type']) && $shareFare[0]['driver_share_type'] =='2'){ ?>  <?php echo 'checked="checked"';}?>/>
                            <label for="driver-share-rs"><span class="radio">Rs</span></label>
                        </div>

                    </div>

                    <div class="input-group">
                        <?php echo $this->FormElement($form->get('driver_share')->setValue(isset($shareFare[0]['driver_share_value'])?$shareFare[0]['driver_share_value']:'')); ?>
                        <?php echo $this->FormElement($form->get('driver_share_type_id')); ?>
                        <?php echo $this->formElementErrors($form->get('driver_share'), ['class' => 'error']); ?>
                    </div>

                </div>

                <hr>




                <div class="row ">
                    <div class="col-sm-3"></div>
                    <div class="col-sm-3"></div>
                    <div class="col-sm-2 pull-right margin-bttom10px">
                            <?php echo $this->formElement($form->get('save')); ?>
                    </div>

                </div>
            </div>
        </div>
        <div class="col-sm-4 col-md-4"></div>
    </div>
</div>
<?php echo $this->form()->closeTag(); ?>

<span class="checkbox_error"></span>                                             
                                                <div class="panel panel-default">
                                                    <div class="panel-headingnew"> View/Update Records </div>
                                                    <div id="faq-1-3" class="panel-collapse collapse in" aria-expanded="false">
                                                        <div class="box">
                                                            <!-- /.box-header -->
                                                            <div class="box-body table-responsive listing-data">
                                                                <?php echo $this->partial('share-fare-listing.phtml'); ?>
                                                            </div>
                                                            <!-- /.box-body -->
                                                        </div>
                                                    </div>
                                                </div>

                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <br>
        <!-- /.widget-box -->
    </div>
    <!-- /.col -->
</section>



