<?php echo $header; ?>
<style>
    @media (min-width: 768px) {
        .ml--250__d {
            margin-left: -250px !important;
        }
    }
</style>
<div class="container">
    <ul class="breadcrumb">
        <?php foreach ($breadcrumbs as $breadcrumb) { ?>
        <li><a href="<?php echo $breadcrumb['href']; ?>"> <?php echo $breadcrumb['text']; ?></a></li>
        <?php } ?>
    </ul>
    <?php if ($error_warning) { ?>
    <div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> <?php echo $error_warning; ?></div>
    <?php } ?>
    <div class="row"><?php echo $column_left; ?>
        <?php if ($column_left && $column_right) { ?>
        <?php $class = 'col-sm-6'; ?>
        <?php } elseif ($column_left || $column_right) { ?>
        <?php $class = 'col-sm-9'; ?>
        <?php } else { ?>
        <?php $class = 'col-sm-12'; ?>
        <?php } ?>
        <div id="content" class="<?php echo $class; ?>"><?php echo $content_top; ?>
<h1><?php echo $heading_title; ?></h1>
<div class="col-sm-10 col-sm-offset-1 col-xs-12">
<form action="<?= $action; ?>" method="POST" enctype="multipart/form-data" class="form-horizontal">
<!-- . -->
                    <style>
                        .SiparisDetaylari {
                            display: inline-block;
                            margin-top: 20px;
                            width: 100%;
                        }
                        .SiparisDetaylari h3 {
                            font-family: Quicksand;
                            font-style: normal;
                            font-weight: 600;
                            font-size: 18px;
                            color: #000;
                        }
                        .SiparisDetaylari ul {
                            border: 1px solid #BDBDBD;
                            background-color: #F2F2F2;
                            box-sizing: border-box;
                            font-family: Quicksand;
                            display: inline-block;
                            font-style: normal;
                            border-radius: 3px;
                            padding: 15px 20px;
                            font-size: 14px;
                            color: #4F4F4F;
                            width: 100%;
                        }
                        .SiparisDetaylari ul li {
                            border-bottom: solid 1px #BDBDBD;
                            font-family: Quicksand;
                            list-style-type: none;
                            padding: 15px 0;
                            color: #000;
                        }
                        .SiparisDetaylari ul li:last-child {
                            border-bottom: none;
                        }
                        .SiparisDetaylari ul li span {
                            float: right;
                        }
                    </style>
                    <span class="SiparisDetaylari">
                        <h3><?= $text_order; ?></h3>
                        <ul>
                            <li><b>Sipariş No:</b> #<?= $order_detail ['order_id']; ?></li>
                            <li><b>Ad Soyad:</b> <?= $order_detail ['firstname']; ?> <?= $order_detail ['lastname']; ?></li>
                            <li><b>Mail:</b> <?= $order_detail ['email']; ?></li>
                            <li><b>Telefon:</b> <?= $order_detail ['telephone']; ?></li>
                            <li><b>Fatura Adresi:</b> <?= $order_detail ['payment_address']; ?></li>
                            <li><b>Kargo Adresi:</b> <?= $order_detail ['shipping_address']; ?></li>
                            <li><b>İl - İlçe:</b> <?= $order_detail ['shipping_zone']; ?> / <?= $order_detail ['shipping_city']; ?></li>
                            <li><b>Tutar:</b> <?= $return_total; ?></li>
                            <li><b>Tarih:</b> <?= $order_detail ['date'];?></li>
                        </ul>
                  </span>
                  <input type="hidden" value="<?= $order_detail ['order_id']; ?>" name="order_id" />
                  <input type="hidden" value="<?= $order_detail ['firstname']; ?>" name="firstname" />
                  <input type="hidden" value="<?= $order_detail ['lastname']; ?>" name="lastname" />
                  <input type="hidden" value="<?= $order_detail ['email']; ?>" name="email" />
                  <input type="hidden" value="<?= $order_detail ['telephone']; ?>" name="telephone" />
                  <input type="hidden" value="<?= @date('Y-m-d'); ?>" name="date_ordered" />
                  <!-- . -->
<!-- . -->
                    <style>
                        h3.Urunler--Baslik {
                            border-bottom: solid 2px #DDD;
                            font-family: Quicksand;
                            padding-bottom: 10px;
                            margin-bottom: 10px;
                            font-style: normal;
                            font-weight: 600;
                            text-align: left;
                            font-size: 18px;
                            width: 100%;
                            color: #000;
                        }
                        .Urunler {
                            width: 100%;
                        }
                            .Urunler .Urun {
                                border-bottom: solid 1px #BDBDBD;
                                justify-content: space-between;
                                align-items: center;
                                padding: 20px 0;
                                display: flex;
                                width: 100%;
                            }
                            .Urunler .Urun:last-child {
                                border-bottom: none;
                            }
                                .Urunler .Urun .FotografKutusu {
                                    margin-right: 30px;
                                }
                                .Urunler .Urun .AciklamaKutusu {
}
                                    .Urunler .Urun .AciklamaKutusu > .Fiyat {
                                        font-family: Quicksand;
                                        font-style: normal;
                                        font-weight: bold;
                                        font-size: 18px;
                                        color: #828282;
                                    }
                                        .Urunler .Urun .AciklamaKutusu > .Fiyat > b {
                                            color: #333;
                                        }
                                    .Urunler .Urun .AciklamaKutusu > .Baslik {
                                        font-family: Quicksand;
                                        font-style: normal;
                                        font-weight: bold;
                                        font-size: 16px;
                                        color: #333;
                                    }
                    </style>
                    <h3 class="Urunler--Baslik"><?= $text_product; ?></h3>
                    <div class="table-responsive" style="width: 100%;">
                        <table class="Urunler">
                            <tr>
                                <td>
                                    <? foreach ($order_products as $product): ?>
                                        <input type="hidden" value="<?= $product ['product_name']; ?>" name="product[]" />
                                        <input type="hidden" value="<?= $product ['model']; ?>" name="model[]" />
                                        <input type="hidden" value="<?= $product ['quantity']; ?>" name="quantity[]" />
                                        <input type="hidden" value="<?= $product ['product_id']; ?>" name="product_id[]" />
                                        <input type="hidden" value="<?= $product ['order_product_id']; ?>" name="order_product_id[]" />
                                        <div class="Urun">
                                            <div class="FotografKutusu">
                                                <? if ($product ['image']): ?>
                                                    <img src="<?= $product ['image']; ?>" alt="" />
                                                <? endif; ?>
                                            </div>
                                            <div class="AciklamaKutusu">
                                                <span class="Fiyat"><b><?= $product ['quantity']; ?> x</b> <?= $product ['price']; ?></span>
                                                <br />
                                                <span class="Baslik"><?= $product ['product_name']; ?></span>
                                            </div>
                                        </div>
                                    <? endforeach; ?>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <!-- . -->
<!-- . -->
                    <style>
                        h3.DegisimIade--Baslik {
                            border-bottom: solid 2px #DDD;
                            font-family: Quicksand;
                            padding-bottom: 10px;
                            margin-bottom: 10px;
                            font-style: normal;
                            font-weight: 600;
                            text-align: left;
                            font-size: 18px;
                            width: 100%;
                            color: #000;
                        }
                        .DegisimIade {
                            width: 100%;
                        }
                            .DegisimIade .Str {
                                border-bottom: solid 1px #BDBDBD;
                                justify-content: space-evenly;
                                align-items: center;
                                padding: 15px 0;
                                display: flex;
                                width: 100%;
                            }
                            .DegisimIade .Str:last-child {
                                border-bottom: none;
                            }
                                .DegisimIade .Str > td.w-100 {
                                    width: 100%;
                                }
                                    .DegisimIade .Str > td label {
                                        font-family: Quicksand;
                                        font-style: normal;
                                        font-weight: bold;
                                        font-size: 14px;
                                        color: #828282;
                                        padding: 3px 0;
                                    }
                                    .DegisimIade .Str > td label.c-000 {
                                        color: #000;
                                    }
                                    .DegisimIade .Str > td textarea {
                                        border: 1px solid #828282;
                                        resize: none;
                                    }
@media (max-width: 768px)
                        {
                            .DegisimIade {
                            }
                                .DegisimIade .Str {
                                    padding: 15px;
                                }
                                    .DegisimIade .Str > td label {
                                        font-size: 12px;
                                    }
                        }
                    </style>
                    <br />
                    <h3 class="DegisimIade--Baslik">İade / Değişim Nedeni</h3>
                    <div class="table-responsive" style="width: 100%;">
                        <table class="DegisimIade">
                            <tr class="Str">
                                <td colspan="2">
                                    <? foreach ($return_reasons as $return_reason): ?>
                                        <? if ($return_reason ['return_reason_id'] == $return_reason_id): ?>
                                            <div class="radio">
                                                <label>
                                                    <input type="radio" name="return_reason_id" value="<?= $return_reason ['return_reason_id']; ?>" checked="checked" /> <?= $return_reason ['name']; ?>
                                                </label>
                                            </div>
                                        <? else: ?>
                                            <div class="radio">
                                                <label>
                                                    <input type="radio" name="return_reason_id" value="<?= $return_reason ['return_reason_id']; ?>" /> <?= $return_reason['name']; ?>
                                                </label>
                                            </div>
                                        <? endif; ?>
                                    <? endforeach; ?>
                                    <? if ($error_reason): ?>
                                        <div class="text-danger"><?= $error_reason; ?></div>
                                    <? endif; ?>
                                </td>
                            </tr>
                            <tr class="Str">
                                <td class="w-100">
                                    <label class="control-label c-000">Değişim / İade Seçimi</label>
                                </td>
                                <td class="w-100 ml--250__d">
                                    <? if ($change_status == 0){ ?>
                                        <label class="radio-inline">
                                            <input type="radio" name="return_or_change" value="Değişim" checked="checked" /> Değişim
                                        </label>
                                    <?php }else if($change_status == 1){ ?>
                                        <label class="radio-inline">
                                            <input type="radio" name="return_or_change" value="İade" checked="checked" /> İade
                                        </label>
                                    <?php }else if($change_status == 2){ ?>
                                        <label class="radio-inline">
                                            <input type="radio" name="return_or_change" value="İptal" checked="checked" /> İptal
                                        </label>
                                    <?php } ?>
                                </td>
                            </tr>
                            <tr class="Str">
                                <td class="w-100">
                                    <label class="control-label c-000"><?= $entry_opened; ?></label>
                                </td>
                                <td class="w-100 ml--250__d">
                                    <label class="radio-inline">
                                        <? if ($opened): ?>
                                            <input type="radio" name="opened" value="1" checked="checked" />
                                        <? else: ?>
                                            <input type="radio" name="opened" value="1" />
                                        <? endif; ?>
                                        <?= $text_yes; ?>
                                    </label>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <label class="radio-inline">
                                        <? if (! $opened): ?>
                                            <input type="radio" name="opened" value="0" checked="checked" />
                                        <? else: ?>
                                            <input type="radio" name="opened" value="0" />
                                        <? endif; ?>
                                        <?= $text_no; ?>
                                    </label>
                                </td>
                            </tr>
                            <tr class="Str">
                                <td class="w-100">
                                    <label class="control-label c-000">Detay</label>
                                    <br />
                                    <textarea name="comment" rows="7" placeholder="" id="input-comment" class="form-control"><?= $comment; ?></textarea>
                                    <? if ($error_comment): ?>
                                        <div class="text-danger"><?= $error_comment; ?></div>
                                    <? endif; ?>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <!-- . -->
<!-- . -->
                    <style>
                        .Dogrulama {
                            display: inline-block;
                            margin-top: 20px;
                            width: 100%;
                        }
                            .Dogrulama legend {
                                font-family: Quicksand;
                                font-style: normal;
                                font-weight: 600;
                                font-size: 18px;
                                color: #000;
                            }
                            .Dogrulama label[for="input-captcha"] {
                                display: none;
                            }
                            .Dogrulama .col-sm-10 {
                                width: 100%;
                            }
                            .Dogrulama .col-sm-2 {
                                width: 43.666667% !important
                            }
                                .Dogrulama .col-sm-10 img {
                                    margin-top: 10px;
                                }
                    </style>
                    <span class="Dogrulama">
                        <?= $captcha; ?>
                    </span>
                    <!-- . -->
<!-- . -->
                    <style>
                        .Dugmeler {
                            display: inline-block;
                            margin-top: -10px;
                            width: 100%;
                        }
                            .Dugmeler .btn {
                                background-color: #EB5757 !important;
                                font-family: Quicksand !important;
                                letter-spacing: .7px !important;
                                font-style: normal !important;
                                font-weight: bold !important;
                                border-radius: 0 !important;
                                font-size: 18px !important;
                                padding: 12px 0 !important;
                                border: none !important;
                                width: 100% !important;
                                color: #FFF !important;
                            }
                    </style>
                    <span class="Dugmeler">
                        <? if ($text_agree): ?>
                            <div class="buttons clearfix">
                                <? if ($agree): ?>
                                <input type="checkbox" name="agree" value="1" checked="checked" />
                                <? else: ?>
                                <input type="checkbox" name="agree" value="1" />
                                <? endif; ?>
                                <?= $text_agree; ?>
                            </div>
                        <? endif; ?>
                        <input style="margin-left: 0 !important;" type="submit" value="<?php echo $button_submit; ?>" class="btn btn-primary" />
                    </span>
                    <!-- . -->
</form>
<?php echo $content_bottom; ?>
</div>
</div>
<?php echo $column_right; ?>
</div>
</div>
<script type="text/javascript"><!--
    $('.date').datetimepicker({
        pickTime: false
    });
    //--></script>
<?php echo $footer; ?>
