<?php

$route_id='';
$source_city_name='';
$destination_city_name='';
$fare='';
$vehicle_type='';
$fixed_km='';
$extra_km='';
$start_time='';
$end_time='';
$from_date='';
$end_date='';
$distance_km='';
$city_distance_id='';
$source_city_id='';
$vehicle_type_id='';
$destination_city_id='';


if(isset($getResponse))
{
   $route_id =$getResponse['route_id'];
   $source_city_name =$getResponse['source_city_name'];
   $destination_city_name =$getResponse['destination_city_name'];
   $fare =$getResponse['minimum_charge'];
   $distance_km=$getResponse['distance_km'];
   $city_distance_id=$getResponse['city_distance_id'];
   $source_city_id=$getResponse['source_city_id'];
   $vehicle_type_id=$getResponse['vehicle_type_id'];
   $destination_city_id=$getResponse['destination_city_id'];
   $fixed_km=$getResponse['minimum_distance'];
   $extra_km=$getResponse['per_km_charge'];
   $start_time=$getResponse['start_time'];
   $end_time=$getResponse['end_time'];
   $from_date=date('d-m-Y', strtotime($getResponse['from_date']));
   $end_date=date('d-m-Y', strtotime($getResponse['to_date']));
   $toll=$getResponse['toll'];
   $parking=$getResponse['parking'];

   $driver_allowance=$getResponse['driver_allowance'];

}
?>

<!-- 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" id="search_div">
                                <div class="panel-headingnew"> Bid Management </div>
                                <div id="faq-1-1" class="panel-collapse collapse in" aria-expanded="true">
                                    <div class="panel-body">
                                        <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">

                                                    <div class="row">
                                                        <div class="col-sm-10 no-padding">


                                                            <div class="left_panel col-sm-12 padding_margin0" id="offer_add">

                                                                <?php
                                                                $form = $this->form;
                                                                $form->prepare();
                                                                $form->setAttribute('action', $this->url('bid', ['action' => 'edit-basic']));
                                                                $form->setAttribute('method', 'post');
                                                                $form->setAttribute('id', 'add-bid-form');
                                                                echo $this->form()->openTag($form);
                                                                echo $this->formElement($form->get('route_id')->Setvalue($route_id));
                                                                ?>


                                                                <div class="form-group clearfix margintopbottom20">
                                                                    <label class="col-sm-2">Source Station</label>

                                                                    <div class="col-sm-4 input">
                <!--                                                        <input class="form-control" name="soruce-station" id="soruce-station" placeholder="Source Station" type="text">-->
                                                <?php echo $this->FormElement($form->get('source_station')->Setvalue($source_city_name)); ?>
                                                               <?php echo $this->formElementErrors($form->get('source_station'), ['class' => 'error']); ?>
                                                                        <?php echo $this->formElement($form->get('source_value')->setvalue($source_city_id)); ?>
                                                                    </div>


                                                                    <label class="col-sm-2">Destination</label>
                                                                    <div class="col-sm-4 input">
                <!--                                                        <input class=" form-control" name="destination" id="destination" placeholder="Destination" type="text">-->
                                          <?php echo $this->FormElement($form->get('destination_station')->Setvalue($destination_city_name)); ?>
                                                        <?php echo $this->formElementErrors($form->get('destination_station'), ['class' => 'error']); ?>
                                                                        <?php echo $this->FormElement($form->get('destination_value')->setvalue($destination_city_id)); ?>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group clearfix margintopbottom20">
                                                                    <!--<label class="col-sm-2">Cab No.</label>
                                                                    <div class="col-sm-4 input">
                                                                        <select class="form-control">
                                                                            <option>DL5C6789</option>
                                                                            <option>DL5C6709</option>

                                                                            <option>DL5C6589</option>


                                                                        </select>

                                                                    </div>-->


                                                                    <label class="col-sm-2">Fare</label>
                                                                    <div class="col-sm-4 input">
                <!--                                                        <input class=" form-control" name="fare" id="fare" placeholder="2000" type="text">-->
                                                                        <?php echo $this->FormElement($form->get('fare')->Setvalue($fare)); ?>
                                                         <?php echo $this->formElementErrors($form->get('fare'), ['class' => 'error']); ?>
                                                                  &nbsp;<span id="fare-errmsg" style="color:red"></span>
                                                                    </div>

                                                                    <label class="col-sm-2">Vehicle Type</label>
                                                                    <div class="col-sm-4 input">
                <!--                                                        <input class=" form-control" name="fare" id="fare" placeholder="2000" type="text">-->
                                                           <?php echo $this->FormElement($form->get('vehicle_type')->Setvalue($vehicle_type_id)); ?>
                                                                   <?php echo $this->formElementErrors($form->get('vehicle_type'), ['class' => 'error']); ?>
                                                                    </div>

                                                                </div>

                                                                <div class="form-group clearfix margintopbottom20">
                                                                    <label class="col-sm-2">Extra Charge</label>
                                                                    <div class="col-sm-4 no-padding">
                                                                        <div class="col-sm-4 input">
                                                                            <label> Toll</label>

<!--                                                            <input class=" form-control" name="driver_ignitionType" id="driver_ignitionType" placeholder="100" type="text">-->
                                                                            <?php echo $this->FormElement($form->get('toll')->Setvalue($toll)); ?>
                                                                             &nbsp;<span id="toll-errmsg" style="color:red"></span>
                                                                        </div>
                                                                        <div class="col-sm-4 input">
                                                                            <label> Parking</label>
                <!--                                                            <input class=" form-control" name="driver_ignitionType" id="driver_ignitionType" placeholder="50" type="text">-->
                                                                            <?php echo $this->FormElement($form->get('parking')->Setvalue($parking)); ?>
                                                                            &nbsp;<span id="parking-errmsg" style="color:red"></span>
                                                                        </div>

                                                                        <div class="col-sm-4 input">
                                                                            <label> DA</label>
                <!--                                                            <input class=" form-control" name="driver_ignitionType" id="driver_ignitionType" placeholder="200" type="text">-->
                                                                            <?php echo $this->FormElement($form->get('da')->Setvalue($driver_allowance)); ?>
                                                                            &nbsp;<span id="da-errmsg" style="color:red"></span>

                                                                        </div>

                                                                    </div>


                                                                    <label class="col-sm-2 kilometer">Kilo-Meter
                                                                        <br>
                                                                        <?php echo $this->FormElement($form->get('kilo_metor')->Setvalue($distance_km)); ?>
                                                                        <?php echo $this->formElement($form->get('distance_city_id')->Setvalue($city_distance_id)); ?>
                                                                    </label>
                                                                    <div class="col-sm-4 no-padding">
                                                                        <div class="col-sm-6 ">
                                                                            <label> Fixed KM</label>

<!--                                                            <input class=" form-control" name="driver_ignitionType" id="driver_ignitionType" placeholder="250 km" type="text">-->
                                                                            <?php echo $this->FormElement($form->get('fixed_km')->Setvalue($fixed_km)); ?>
                                                                    <?php // echo $this->formElementErrors($form->get('fixed_km'), ['class' => 'error']); ?>
                                                                             &nbsp;<span id="fixed-km-errmsg" style="color:red"></span>
                                                                        </div>
                                                                        <div class="col-sm-6 input">
                                                                            <label> Extra KM</label>
                <!--                                                            <input class=" form-control" name="driver_ignitionType" id="driver_ignitionType" placeholder="12/km" type="text">-->
                                                                            <?php echo $this->FormElement($form->get('extra_km')->Setvalue($extra_km)); ?>
                                                                       <?php  echo $this->formElementErrors($form->get('extra_km'), ['class' => 'error']); ?>
                                                                             &nbsp;<span id="extra-km-errmsg" style="color:red"></span>
                                                                        </div>

                                                                    </div>

                                                                </div>


                                                                <div class="form-group clearfix margintopbottom20">
                                                                    <label class="col-sm-2"><h4>Journey Date</h4></label>


                                                                </div>


                                                                <div class="clear"></div>

                                                                <div class="form-group">
                                                                    <label class="col-sm-2">From Date</label>
                                                                    <div class="col-sm-4 input">
                <!--                                                        <input class=" form-control text-uppercase" name="driver_ignitionType" id="driver_ignitionType" type="date">-->
                                                             <?php echo $this->FormElement($form->get('journey_start_date')->Setvalue($from_date)); ?>
                                                                         <?php echo $this->formElementErrors($form->get('journey_start_date'), ['class' => 'error']); ?>
                                                                    </div>


                                                                    <label class="col-sm-2">To Date</label>
                                                                    <div class="col-sm-4 input">
                <!--                                                        <input class=" form-control text-uppercase" name="driver_ignitionType" id="driver_ignitionType" type="date">-->
                                                              <?php echo $this->FormElement($form->get('journey_end_date')->Setvalue($end_date)); ?>
                                                                         <?php echo $this->formElementErrors($form->get('journey_end_date'), ['class' => 'error']); ?>
                                                                    </div>

                                                                </div>

                                                                <div class="form-group clearfix margintopbottom20">
                                                                    <label class="col-sm-2"><h4>Availability of Cab</h4></label>


                                                                </div>

                                                                <div class="form-group clearfix margintopbottom20">
                                                                    <label class="col-sm-2">From Time</label>
                                                                    <div class="col-sm-4 input">

                                                             <?php echo $this->FormElement($form->get('journey_start_time')->Setvalue($start_time)); ?>
                                             <?php echo $this->formElementErrors($form->get('journey_start_time'), ['class' => 'error']); ?>
                                                                    </div>


                                                                    <label class="col-sm-2">To Time</label>
                                                                    <div class="col-sm-4 input">
                <!--                                                        <input class=" form-control" name="driver_ignitionType" id="driver_ignitionType" placeholder="12:AM" type="text">-->
                                                          <?php echo $this->FormElement($form->get('journey_end_time')->Setvalue($end_time)); ?>
                                                <?php echo $this->formElementErrors($form->get('journey_end_time'), ['class' => 'error']); ?>
                                                                    </div>

                                                                </div>


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

                                                                    <!--<label class="col-sm-2">Cab Release Time</label>
                                                                    <div class="col-sm-4 input">
                <!--                                                        <input class=" form-control" name="driver_ignitionType" id="driver_ignitionType" placeholder="08:10pm" type="text">-->
                                                                        <?php // echo $this->FormElement($form->get('cab_release_time')); ?>
                                                                    </div>

                                                                    <!--<label class="col-sm-2">Car Type</label>


                                                                    <!--<div class="col-sm-4 no-padding">
                                                                        <div class="col-sm-6">
                                                                            <div class="carbooking">
                                                                                <input type="radio" name="CarType" id="AC" checked/>
                                                                                <label for="AC"><span class="radio">AC</span></label>
                                                                            </div>


                                                                        </div>

                                                                        <div class="col-sm-6">
                                                                            <div class="carbooking">
                                                                                <input type="radio" name="CarType" id="NonAC"/>
                                                                                <label for="NonAC"><span class="radio">Non AC</span></label>
                                                                            </div>

                                                                        </div>

                                                                    </div>-->




                                                                </div>



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

                                                                    <div class="tool-bar">

                                                                        <div class="text-right btn-groups">
           <a class="back_btn_link btn btn-orange btn-default" id="back_offer" href="<?php echo $this->url('bid', array('action' => 'index')); ?>">
                                                                                <i class="fa fa-chevron-left"></i>
                                                                                Back
                                                                            </a>
                                                                            <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('submit')); ?>

                                                                        </div>

                                                                    </div>

                                                                </div>

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

                                                            </div>


                                                        </div>
                                                    </div>


                                                </div>
                                            </div>


                                        </div>

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



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