<?php echo $header; ?>
<?php echo $column_left; ?>
<div id="content">
    <div class="page-header">
        <div class="container-fluid">
            <div class="pull-right">
                <button type="submit" form="form-manufacturer" data-toggle="tooltip" title="Kayıt" class="btn btn-primary"><i class="fa fa-save"></i></button>
                <a href="<?php echo $cancel; ?>" data-toggle="tooltip" title="İptal" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
            <h1><?php echo $heading_title; ?></h1>
            <ul class="breadcrumb">
                <?php foreach ($breadcrumbs as $breadcrumb) { ?>
                <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
                <?php } ?>
            </ul>
        </div>
    </div>
    <div class="container-fluid">
        <?php if ($error_warning) { ?>
        <div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> <?php echo $error_warning; ?>
            <button type="button" class="close" data-dismiss="alert">&times;</button>
        </div>
        <?php } ?>
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title"><i class="fa fa-pencil"></i> <?php echo $heading_title; ?></h3>
            </div>
            <div class="panel-body">
                <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form-manufacturer" class="form-horizontal">


                    <div class="tab-content">
                        <div class="tab-pane active" id="tab-general">



                            <div class="form-group required">
                                <label class="col-sm-2 control-label" for="input-name-api-url"><b>Api URL</b></label>
                                <div class="col-sm-10">
                                    <input type="text" name="<?=$file_name;?>_api_url" value="<?= $mngkargo_api_url; ?>" placeholder="Api Url" id="input-name-api-url" class="form-control" />
                                </div>
                            </div>

                            <div class="form-group required">
                                <label class="col-sm-2 control-label" for="input-name-client-id"><b>CLIENT ID</b></label>
                                <div class="col-sm-10">
                                    <input type="text" name="<?=$file_name;?>_client_id" value="<?= $mngkargo_client_id; ?>" placeholder="CLIENT ID" id="input-name-client-id" class="form-control" />
                                    
                                </div>
                            </div>

                            <div class="form-group required">
                                <label class="col-sm-2 control-label" for="input-name-secret-id"><b>SECRET ID</b></label>
                                <div class="col-sm-10">
                                    <input type="text" name="<?=$file_name;?>_secret_id" value="<?= $mngkargo_secret_id; ?>" placeholder="SECRET ID" id="input-name-secret-id" class="form-control" />
                                    
                                </div>
                            </div>

                            <div class="form-group required">
                                <label class="col-sm-2 control-label" for="input-name"><b>Customer Number</b></label>
                                <div class="col-sm-10">
                                    <input type="text" name="<?=$file_name;?>_customer_number" value="<?= $mngkargo_customer_number ?>" placeholder="Customer Number" id="input-name-customer-number" class="form-control" />
                                   
                                </div>
                            </div>

                            <div class="form-group required">
                                <label class="col-sm-2 control-label" for="input-name-customer-password"><b>Customer Password</b></label>
                                <div class="col-sm-10">
                                    <input type="text" name="<?=$file_name;?>_customer_password" value="<?= $mngkargo_customer_password; ?>" placeholder="Customer Password" id="input-name-customer-password" class="form-control" />
                    
                                </div>
                            </div>


                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span data-toggle="tooltip" title="" data-original-title="Kapıda Tahsilat durumunda sipariş bedeli kargo kaydına aktarılır">Tahsilatlı kargo Ödeme Metodları</span></label>
                                <div class="col-sm-10">
                                    <div class="well well-sm" style="height: 150px; overflow: auto;">
                                        <?php foreach($payment_methods as $pay){ ?>
                                        <div class="checkbox">
                                            <label> <?php if( in_array($pay['code'], $mngkargo_pays) ){ ?>
                                                <input type="checkbox" name="<?=$file_name;?>_pays[]" value="<?=$pay['code']?>" checked="checked" />
                                                <?=$pay['name']?>
                                                <?php }else{ ?>
                                                <input type="checkbox" name="<?=$file_name;?>_pays[]" value="<?=$pay['code']?>" />
                                                <?=$pay['name']?>
                                                <?php } ?> </label>
                                        </div>
                                        <?php } ?> </div>
                                </div>
                            </div><!-- config_aras_pays -->

                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span data-toggle="tooltip" title="" data-original-title="Kapıda Kartla Ödeme Metodu durumunda sipariş bedeli kargo kaydına aktarılır">Kapıda Kartla Ödeme Metodları</span></label>
                                <div class="col-sm-10">
                                    <div class="well well-sm" style="height: 150px; overflow: auto;">
                                        <?php foreach($payment_methods as $pay){ ?>
                                        <div class="checkbox">
                                            <label> <?php if( in_array($pay['code'], $mngkargo_pays_c) ){ ?>
                                                <input type="checkbox" name="<?=$file_name;?>_pays_c[]" value="<?=$pay['code']?>" checked="checked" />
                                                <?=$pay['name']?>
                                                <?php }else{ ?>
                                                <input type="checkbox" name="<?=$file_name;?>_pays_c[]" value="<?=$pay['code']?>" />
                                                <?=$pay['name']?>
                                                <?php } ?> </label>
                                        </div>
                                        <?php } ?> </div>
                                </div>
                            </div><!-- config_aras_pays_c -->

                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-order-status"><span data-toggle="tooltip" title="Kargolama işleminin ardından sipariş durumunun atanacağı kod">Kargolandı Durum Kodu</span></label>
                                <div class="col-sm-10">
                                    <select name="<?=$file_name;?>_order_status_id" id="input-order-status" class="form-control">
                                        <?php foreach($order_statuses as $order_status){ ?>
                                        <?php if ( $mngkargo_order_status_id == $order_status['order_status_id'] ){ ?>
                                        <option value="<?=$order_status['order_status_id']?>" selected="selected"><?=$order_status['name']?></option>
                                        <?php } else { ?>
                                        <option value="<?=$order_status['order_status_id']?>"><?=$order_status['name']?></option>
                                        <?php } ?>
                                        <?php } ?>
                                    </select>
                                </div>
                            </div><!-- config_aras_status_id -->




                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="input-status">Status</label>
                                <div class="col-sm-10">
                                    <select name="<?=$file_name;?>_status" id="input-status" class="form-control">
                                        <?php if ($mngkargo_status) { ?>
                                        <option value="1" selected="selected">Açık</option>
                                        <option value="0">Kapalı</option>
                                        <?php } else { ?>
                                        <option value="1">Açık</option>
                                        <option value="0" selected="selected">Kapalı</option>
                                        <?php } ?>
                                    </select>
                                </div>
                            </div>

                        </div>



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




<?php echo $footer; ?>